Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intermittent Error "Cannot read properties of null (reading 'length')" when loading CRAM tracks #1726

Open
atruji opened this issue Nov 2, 2023 · 5 comments

Comments

@atruji
Copy link

atruji commented Nov 2, 2023

Hi, Our team is encountering a "Cannot read properties of null (reading 'length')" Error when trying to load and view CRAM data tracks. When controlling for data file and region the error only occurs on some attempts. Providing a pause by adding a breakpoint during runtime at the line that returns the error allows the track data to load successfully. The line in app_bundle-1.13.6.js is 36870 (code block below) and we are using igv-webapp.2.13.5.

if (t.length !== e.refSeqSpan) throw new o.CramArgumentError("seqFetch callback returned a reference sequence of the wrong length"); return { seq: t, start: e.refSeqStart, end: e.refSeqStart + e.refSeqSpan - 1, span: e.refSeqSpan

@atruji atruji changed the title Intermittent Error "Cannot read properties of null (reading 'length') Intermittent Error "Cannot read properties of null (reading 'length')" when loading CRAM tracks Nov 2, 2023
@jrobinso
Copy link
Contributor

Apologies for the delayed response. Without a test case to reproduce this it will be difficult to address. Are you seeing this with multiple CRAM files?

@cmdcolin it looks like the error is here, starting at line 326 of cramFile/slice/index.ts. Its definitely not expecting "null" for seq, and even if it checked for null it would still need to throw an error.

      if (seq.length !== sliceHeader.refSeqSpan) {
        throw new CramArgumentError(
          'seqFetch callback returned a reference sequence of the wrong length',
        )
      }

@cmdcolin
Copy link

could be worth checking the code for the "seqFetcher" that is passed to the CRAM library constructor to see whether there would be any case that it returns null

@jrobinso
Copy link
Contributor

@cmdcolin Ah yes, good point, that's where the problem is.

@jrobinso
Copy link
Contributor

@atruji If you can come up with a repeatable test case please post instructions here.

@jrobinso
Copy link
Contributor

Also, when this happens are there any errors in the console? You can access the console from "View > Developer > Developer Tools" on Chrome. Most other browsers also have some form of developer tools.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants