GMOD / Apollo

Genome annotation editor with a Java Server backend and a Javascript client that runs in a web browser as a JBrowse plugin.
http://genomearchitect.readthedocs.io/
Other
126 stars 85 forks source link

Problems loading list of Tracks when switching organisms on slower connection. #1434

Closed monicacecilia closed 7 years ago

monicacecilia commented 7 years ago

When switching between organisms, the list of Tracks either does not load, hangs with a 'Loading' message, or remains blank.

There seems to be some latency affecting the way the list is loaded.

ALSO, when I switched between a few organisms and returned to the one I had already loaded in the first organism I was working with, all the tracks I had selected were de-selected and the 'evidence tracks' disappeared from the browser.

For example:

screen shot 2017-01-13 at 3 05 45 am

This is the error I can see on the console:

screen shot 2017-01-13 at 3 07 06 am

The problems about not loading the list of Tracks are resolved once I select a different tab and come back to 'Tracks' on the Annotator Panel.

However, the problem about losing all the tracks I had already selected is persistent. Bad, bad bug.

nathandunn commented 7 years ago

These comes together and its due to the delay (I can't reproduce it locally).

'parent' of null is failing because GWT has this function but the "window.parent" is still loading so it gets resolved as null.

The SockJS not found is because it is getting the library from the backing.

Possible fixes:

1 - responds to a "all loaded" milestone and wait to load until all of those happen 2 - load SockJS located locally within AnnotTrack.js to confer with the same version 3 - ignore window if no longer valid, then repeat until it is valid

Uncaught TypeError: Cannot read property 'parent' of null
    at sendTracks (VM388 AnnotTrack.js:338)
    at handleTrackVisibility (VM388 AnnotTrack.js:357)
    at IBb (annotator-0.js:2632)
    at OGb (annotator-0.js:1942)
    at rHb.sHb [as Fb] (annotator-0.js:3215)
    at xh (annotator-0.js:588)
    at bh (annotator-0.js:1471)
    at fh (annotator-0.js:1983)
    at eval (annotator-0.js:2606)
    at d (annotator-0.js:2535)
sendTracks @ VM388 AnnotTrack.js:338
handleTrackVisibility @ VM388 AnnotTrack.js:357
IBb @ annotator-0.js:2632
OGb @ annotator-0.js:1942
sHb @ annotator-0.js:3215
xh @ annotator-0.js:588
bh @ annotator-0.js:1471
fh @ annotator-0.js:1983
(anonymous) @ annotator-0.js:2606
d @ annotator-0.js:2535
VM333 main.js:79 loaded WebApollo plugin
VM334 main.js:40 plugin HideTracksButton constructor
VM113 lazyload.js:263 GET http://icebox.lbl.gov/Apollo2/254688664476716350280888684/jbrowse/data/custom.css 
load @ VM113 lazyload.js:263
finish @ VM113 lazyload.js:113
pollWebKit @ VM113 lazyload.js:326
VM54 dojo.js:1250 Uncaught ReferenceError: SockJS is not defined
    at Object.createAnnotationChangeListener (VM388 AnnotTrack.js:303)
    at Object.setViewInfo (VM388 AnnotTrack.js:216)
    at Object.<anonymous> (VM109 GenomeView.js:2236)
    at VM61 lang.js:375
    at VM109 GenomeView.js:2262
    at Object.<anonymous> (VM60 Browser.js:1694)
    at VM61 lang.js:375
    at runFactory (VM54 dojo.js:1104)
    at execModule (VM54 dojo.js:1232)
    at VM54 dojo.js:1270
nathandunn commented 7 years ago

The window.parent error occurs on a faster machine as well.

nathandunn commented 7 years ago
nathandunn commented 7 years ago

Uses a delay and loop. If reload fails to load, then it just continues to re-run. The UI-experience seems to sync out well.