GMOD / jbrowse

JBrowse 1, a full-featured genome browser built with JavaScript and HTML5. For JBrowse 2, see https://github.com/GMOD/jbrowse-components.
http://jbrowse.org
Other
464 stars 199 forks source link

Error: "failed to retrieve file size" when browsing through indexed vcf tracks #1473

Closed russellmyers closed 4 years ago

russellmyers commented 4 years ago

JBrowse version: JBrowse 1.16.6 Web browser: Chrome (also reproducible in other browsers)

Error encountered "failed to retrieve file size" when browsing through indexed vcf tracks - see attached images.

The issue appears to be very similar to issue #1252 on github (which is marked as closed).

Steps to reproduce:

gen_failed_to_retrieve_file_size

gen_f12_error

cmdcolin commented 4 years ago

Possible fix here https://github.com/rbuels/http-range-fetcher/pull/7

If you are interested in testing, here is a way you can

git clone https://github.com/rbuels/http-range-fetcher
cd http-range-fetcher
git checkout fix_stat_undefined_error
yarn
yarn build
yarn link
cd ..

git clone https://github.com/gmod/jbrowse
cd jbrowse
yarn
yarn link http-range-fetcher
yarn watch
cmdcolin commented 4 years ago

After yarn watch, jbrowse is rebuilt and you can open the index.html or run yarn start in the jbrowse folder

russellmyers commented 4 years ago

Thanks @cmdcolin, will check out the potential fix above and will report back here

russellmyers commented 4 years ago

Hi @cmdcolin - I've installed a test version as per above. It's here: http://pseudobase-test.biology.duke.edu/jb_rf/jbrowse/?data=pse

However, I'm still able to reproduce the error.

NOTE - I tried putting a breakpoint in httpRangeFetcher.js to ensure it was actually reaching the new code, but something is puzzling me - I must have done something wrong, as the source code in the debugger for httpRangeFetcher.js doesn't seem to match the code on Github. (Caveat: I'm no expert on Dojo, or even Javascript - I have Python/Java background).

For example, the definition of the HTTPRangeFetcher class at the start of the source code of httpRangeFetcher.js is defined in "var ... function()" syntax in the debugger (see second pic below) however it is defined with "class" syntax in the actual master souce code on github. So, I seem to have completely the wrong source code for httpRangeFetcher.js somehow (or else I'm misunderstanding something). What might I have done wrong? Any clues?

Cheers, Russell

gen_rangefetch_bp gen_varrangefetch

cmdcolin commented 4 years ago

@russellmyers I am not seeing the error happen when I visit this link. I can confirm you have the right http-range-fetcher installed there too

cmdcolin commented 4 years ago

Can you clear browser cache and ensure that you are still seeing the error with your updated link?

russellmyers commented 4 years ago

@cmdcolin Thanks for confirmation of the correct http-range-fetcher installation in the test jbrowse link I set up (jb_rf/jbrowse..). I've tried clearing the cache, and from what I can see the error certainly seems to be happening less, however I can still reproduce the error in certain situations.

For example:

1) Clear cache

2) go to: http://pseudobase-test.biology.duke.edu/jb_rf/jbrowse/?data=pse&loc=2%3A1188..7007&tracks=ref%2Cgenes%2CAFC12_VCF%2CPP1137_VCF%2CMSH24_VCF%2CFS18_VCF%2CMAT32_VCF%2CMATTL_VCF%2CMSH9_VCF%2CPP1134_VCF%2CS10-A47_VCF%2CS11-A14_VCF%2CS1-A56_VCF%2CS3-M14_VCF%2CS4-A60_VCF%2CS5-M17_VCF%2CS6-A19_VCF%2CS7-Flag14_VCF%2CS9-A12_VCF%2CS12-M27_VCF%2CS13-A48_VCF%2CS14-A49_VCF%2CS15-A57_VCF%2CS16-A30_VCF%2CS17-M20_VCF%2CS18-M15_VCF%2CS19-A24_VCF%2CS21-M6_VCF%2CS22-A6_VCF%2CS20-M13_VCF%2CDpseSR_VCF%2CDpseST_VCF%2CBogotana-SCinv_VCF%2CSuta3_VCF%2CToro1_VCF%2CToro4_VCF%2CWhiteER_VCF%2CMSH1993_VCF%2CMSH39_VCF%2CSC04_VCF%2CDperSR_VCF%2CDperST_VCF%2CSRR1925735_VCF%2CSRR1873753_VCF%2CSRR1873751_VCF%2CSRR1873754_VCF%2CSRR1873755_VCF%2CSRR2042916_VCF%2CSRR1873752_VCF%2CSRR1925734_VCF%2CSRR1925723_VCF%2CML16_VCF%2CSP235_VCF%2Clowei_VCF&highlight=

3) Then once all tracks are loaded successfully, hit the big zoom out button once.

Result: I still get the "failed to retrieve file size error".

Would you be able to try the above as well? Do you get the same error?

Cheers, Russell

gen_jb_rf_after_refresh

cmdcolin commented 4 years ago

I can reproduce, and can see where there is a possible problem

cmdcolin commented 4 years ago

Ref here https://github.com/rbuels/http-range-fetcher/issues/12

cmdcolin commented 4 years ago

No fix yet but will keep you posted

russellmyers commented 4 years ago

Great, thanks @cmdcolin !

cmdcolin commented 4 years ago

@russellmyers if you want to try a new fix

cd http-range-fetcher
git fetch
git checkout perform_record_stats_in_stat
yarn
yarn build
cd ../jbrowse
yarn
yarn watch

This should create a new instance with the new http-range-fetcher incorporated

russellmyers commented 4 years ago

Excellent, seems to have done the trick! Thanks heaps @cmdcolin

cmdcolin commented 4 years ago

This was fixed on dev branch, pending next release