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
128 stars 85 forks source link

Connection problems lead to stalling edits. #14

Closed monicacecilia closed 9 years ago

monicacecilia commented 10 years ago
  1. Users are experiencing problems when trying to change an exon boundary. The behaviour includes:

  2. the boundary bounces back and remains unchanged
  3. after refreshing (cleaning cache) the boundary can be changed
  4. after refreshing (cleaning cache) the boundary is ALREADY changed

The problem may be the result of latency issues, connection timeouts, or connection lag. It could be also the result of intermittent connections on WiFi, resulting in users attempting to connect to a no-longer-existent session.

2. Users are experiencing a similar problem when trying to delete an exon. The behaviour includes:

Example error log from user: (from localhost.2014-07-14.log):

Jul 14, 2014 10:35:57 AM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet [org.bbop.apollo.web.AnnotationEditorService] in context with path [/cimlec] threw exception java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1904) at org.bbop.apollo.editor.AnnotationEditor.setTranslationStart(AnnotationEditor.java:352) at org.bbop.apollo.editor.AnnotationEditor.setTranslationStart(AnnotationEditor.java:313) at org.bbop.apollo.editor.AnnotationEditor.calculateCDS(AnnotationEditor.java:466) at org.bbop.apollo.web.AnnotationEditorService.calculateCDS(AnnotationEditorService.java:2078) at org.bbop.apollo.web.AnnotationEditorService.calculateCDS(AnnotationEditorService.java:2073) at org.bbop.apollo.web.AnnotationEditorService.setExonBoundaries(AnnotationEditorService.java:2556) at org.bbop.apollo.web.AnnotationEditorService.doPost(AnnotationEditorService.java:561) at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)

nathandunn commented 10 years ago

Do we know what version this is?

I think you are correct that it is definitely a session error that likely occurs at the first .substring call. Not sure when we should schedule this.

    if (setTranslationEnd && translationTable != null) {
        String mrna = getSession().getResiduesWithAlterationsAndFrameshifts(transcript);
        if (mrna == null || mrna.equals("null")) {
            return;
        }
        int stopCodonCount = 0;
        for (int i = transcript.convertSourceCoordinateToLocalCoordinate(translationStart); i < transcript.getLength(); i += 3) {
            if (i + 3 > mrna.length()) {
                break;
            }
            String codon = mrna.substring(i, i + 3);
            if (translationTable.getStopCodons().contains(codon)) {
                if (readThroughStopCodon && ++stopCodonCount < 2) {
monicacecilia commented 10 years ago

I don't have a better answer than "I'm pretty sure they are using the 2014-04-03 release. And I also don't have a better option for when we should schedule this; not sure whether moving it to be done "earlier" would affect the rest of the process. Apologies for the less-than-helpful answers.

nathandunn commented 10 years ago

I see behavior like that when there is an error on the back-end that causes the interface to get out of sync. We probably need more log files that occurred prior to this error.

If there is a way we could get more information on how to reliably get here, that would be great.

monicacecilia commented 10 years ago

mmmm... I'll ask.

monicacecilia commented 10 years ago

This is what the user was doing when he got the error log I pasted above:

"...the most obvious thing is that I simply cannot change the boundaries of an exon. It comes and goes, and sometimes reloading fixes it (I've already emptied the cache several times). Sometimes completely restarting the browser or WebApollo page does it, but soon I'll get stuck with an exon whose boundaries I cannot change. Strangely, sometimes when I restart it shows the boundary changed. Sometimes I can't elevate an exon or model into the user-generated level to edit, but again, if I restart sometimes it actually did elevate it, just did not show it. “

…"when I try it either does nothing, or when I just now tried to delete that exon to try to build it anew, I got the error message 'Feature with unique name 2D7459743AD9E6797BE82B6D2688536F not found'."

This happened using an instance from i5K@NAL (USDA). Waiting to hear the version they were using to be 100% sure.

monicacecilia commented 10 years ago

This instance is using Web Apollo version: WebApollo-2013-11-22

nathandunn commented 10 years ago

I wonder if this is related to #27 ?

monicacecilia commented 9 years ago

I don't think it is related.

Today I have been receiving this error quite regularly while attempting to delete features from the User-Created Annotation area (using the Demo instance). Steps taken:

  1. Select entire feature
  2. Delete
  3. The result is that the deleted feature stays visible on the screen. The error log follows:
 SyntaxError: Unexpected token < {stack: (...), message: "Unexpected token <"} "SyntaxError: Unexpected token <
    at declare.handleError (http://icebox.lbl.gov/WebApolloDemo/jbrowse/plugins/WebApollo/js/View/Track/AnnotTrack.js:4132:54)
    at http://icebox.lbl.gov/WebApolloDemo/jbrowse/plugins/WebApollo/js/View/Track/AnnotTrack.js:5578:19
    at signalListener (http://icebox.lbl.gov/WebApolloDemo/jbrowse/src/dojo/Deferred.js:37:21)
    at signalWaiting (http://icebox.lbl.gov/WebApolloDemo/jbrowse/src/dojo/Deferred.js:28:4)
    at reject.reject (http://icebox.lbl.gov/WebApolloDemo/jbrowse/src/dojo/Deferred.js:219:5)
    at signalDeferred (http://icebox.lbl.gov/WebApolloDemo/jbrowse/src/dojo/Deferred.js:84:15)
    at signalListener (http://icebox.lbl.gov/WebApolloDemo/jbrowse/src/dojo/Deferred.js:58:4)
    at signalWaiting (http://icebox.lbl.gov/WebApolloDemo/jbrowse/src/dojo/Deferred.js:28:4)
    at reject.reject (http://icebox.lbl.gov/WebApolloDemo/jbrowse/src/dojo/Deferred.js:219:5)
    at signalDeferred (http://icebox.lbl.gov/WebApolloDemo/jbrowse/src/dojo/Deferred.js:84:15)
    ----------------------------------------
    rejected at signalDeferred (http://icebox.lbl.gov/WebApolloDemo/jbrowse/src/dojo/Deferred.js:84:15)
    at signalListener (http://icebox.lbl.gov/WebApolloDemo/jbrowse/src/dojo/Deferred.js:55:5)
    at signalWaiting (http://icebox.lbl.gov/WebApolloDemo/jbrowse/src/dojo/Deferred.js:28:4)
    at reject.reject (http://icebox.lbl.gov/WebApolloDemo/jbrowse/src/dojo/Deferred.js:219:5)
    at signalDeferred (http://icebox.lbl.gov/WebApolloDemo/jbrowse/src/dojo/Deferred.js:84:15)
    at signalListener (http://icebox.lbl.gov/WebApolloDemo/jbrowse/src/dojo/Deferred.js:58:4)
    at signalWaiting (http://icebox.lbl.gov/WebApolloDemo/jbrowse/src/dojo/Deferred.js:28:4)
    at reject.reject (http://icebox.lbl.gov/WebApolloDemo/jbrowse/src/dojo/Deferred.js:219:5)
    at signalDeferred (http://icebox.lbl.gov/WebApolloDemo/jbrowse/src/dojo/Deferred.js:84:15)
    at signalListener (http://icebox.lbl.gov/WebApolloDemo/jbrowse/src/dojo/Deferred.js:55:5)
    ----------------------------------------
Error
    at Promise.then.promise.then (http://icebox.lbl.gov/WebApolloDemo/jbrowse/src/dojo/Deferred.js:252:24)
    at declare.executeUpdateOperation (http://icebox.lbl.gov/WebApolloDemo/jbrowse/plugins/WebApollo/js/View/Track/AnnotTrack.js:5570:12)
    at declare.deleteAnnotations (http://icebox.lbl.gov/WebApolloDemo/jbrowse/plugins/WebApollo/js/View/Track/AnnotTrack.js:1487:15)
    at declare.deleteSelectedFeatures (http://icebox.lbl.gov/WebApolloDemo/jbrowse/plugins/WebApollo/js/View/Track/AnnotTrack.js:1413:14)
    at annot_context_menu.addChild.dijit.MenuItem.onClick (http://icebox.lbl.gov/WebApolloDemo/jbrowse/plugins/WebApollo/js/View/Track/AnnotTrack.js:4347:29)
    at declare.onItemClick (http://icebox.lbl.gov/WebApolloDemo/jbrowse/src/dijit/_MenuBase.js:258:46)
    at HTMLTableRowElement.<anonymous> (http://icebox.lbl.gov/WebApolloDemo/jbrowse/src/dijit/_MenuBase.js:65:10)
    at HTMLTableSectionElement.<anonymous> (http://icebox.lbl.gov/WebApolloDemo/jbrowse/src/dojo/on.js:198:36)
    at HTMLTableSectionElement.<anonymous> (http://icebox.lbl.gov/WebApolloDemo/jbrowse/src/dijit/a11yclick.js:84:15)"

Then, if trying to delete the "already deleted" feature, the following error appears (example):

 ERROR: 
AnnotTrack.js:4129 Object {responseText: "{"error":"Feature with unique name FB5DC18438C46884AD69E18D1C7027EB not found"}"}
AnnotTrack.js:4131 undefined
cmdcolin commented 9 years ago

@nathandunn it appears we lost the ErrorReportValve class in the conversion to 1.x

it's not in our codebase anymore. that's at least causing part of the problem that moni refers to above

nathandunn commented 9 years ago

@cmdcolin Thanks.

nathandunn commented 9 years ago

@cmdcolin I think that this code is working correctly. I got rid of CustomLogValve as log4j should replace it and we should handle 500 errors properly. I think that this is related to incorrect deletion of features.

@monicacecilia I think that this goes away in 2.0, but if you have a specific use-case or it is blocking we should fix this.

This is the error string: handleError: function(response) { console.log("ERROR: "); // error on the next line console.log(response); // in Firebug, allows retrieval of stack trace, // jump to code, etc. console.log(response.stack); var error = eval('(' + response.responseText + ')'); // var error = response.error ? response : eval('(' + // response.responseText + ')'); if (error && error.error) { alert(error.error); return false; } },

monicacecilia commented 9 years ago

@nathandunn Thanks! Other than being greatly annoying - because the only way to fix it is to refresh the window - I don't think it is a show-stopper. May almighty 2.0 save us.

cmdcolin commented 9 years ago

@nathandunn I think the handleError code is expecting JSON and it's getting something more like HTML which is why there is the "syntax error" from Moni's error log.

I never really checked it out before but the old ErrorValveReporter class was seemingly converting the normal HTML response object to org.apache.catalina.connector.Response which i guess is either plain text or json or similar

Maybe log4j has something like this?

Edit: in any case this error handling should probably be made into a new issue

nathandunn commented 9 years ago

@cmdcolin Grails handles these correctly. Conversely, the webappollo client should be checking for a 500 error.

cmdcolin commented 9 years ago

ok. well I'll create a new issue for the error logging then.

nathandunn commented 9 years ago

should be a non-issue in 2.0.0