Search code examples
javascriptgoogle-drive-realtime-api

Crash in Drive Realtime API XHR Error Handler


We've been seeing an significant increase in the number of script errors reported in our app that uses the Realtime API. Specifically this started happening around 1/27/16 at ~6/7PM PST. Poking around a bit I believe I was able to track this back to the XHR error callback installed by the Realtime API.

    function EA(a) {
        a.onerror = function() {
            self.xc()
        }
    }

In this handler self will always refer to window.self which seems like very much the wrong thing as there is never an xc function on the window object. While this doesn't appear to be causing any significantly bad behavior (although it may be contributing to further issues with re-connection), it would be great to have these errors handled.

Is this something other people are seeing as well or a known issue? Is anyone using a workaround?


Solution

  • This has been resolved and you should notice your errors diminish tomorrow when it is released.

    This error does not cause any issues with re-connection. The onerror handler is invoked when there are network issues, which are (generally) automatically retried regardless of whether this particular execution path chokes at this point.