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
ReferenceError __jsonpXX__ is not defined (on Android only) #506
Comments
The JSON-P transport works by defining a function named This could mean two things. First, the function was never defined. This should not be the case as the Lines 35 to 42 in 45a1731
Or, it means the function has been removed by the time the script loads. This could happen as failure detection in JSON-P is not reliable, and so we mostly rely on timeouts. The client tells the dispatcher to apply a timeout to each message it sends here: Lines 320 to 328 in 45a1731
If the outgoing message has an It would be worth adjusting these timeouts and seeing if they improve things for your application. |
Hi @richardshergold, did you manage to investigate this issue further? |
@jcoglan no! we get these errors a lot but only from Android devices. No idea why they occur and what we could do to stop them. If you know any more, please share! |
My only guess is that this is a latency problem and the functions are being removed before the server response arrives. You could try deleting these lines and see if that makes a difference: Lines 30 to 31 in d3166ed
If it does, then we could add a delay to this clean-up to allow the server more time to respond. Although after the timeout that calls |
@jcoglan thanks - I will try that although it won't be for another week or so until I get onto it. |
Hi @richardshergold, did you manage to make any progress with this issue? |
@jcoglan I'm really sorry I have not got round to trying out your suggestion - I will make a note to try this soon and promise to get back to you. Thanks! |
Just wanted to chime in and mention that I'm seeing these errors as well. We have an application that is available on an internal network, and also over a vpn appliance. 100% of the errors we are seeing are through this vpn, and 99.9% are on mobile (there are just a very few Windows 10/Chrome machines.) Users are typically using mobile when accessing through the vpn so this makes sense. It would be very unlikely for non-vpn users to be using mobile, so it's hard to determine if this is related to mobile browsers or due to the vpn. The two errors we see are: The number of course varies, and in one particular case we've seen it over 200 with most of the errors occurring within the same second for the same user, so I don't think this is related to a timeout. |
I'm using the FAYE library in an Ionic Framework project (Cordova) and have it running successfully on both iOS and Android. However, on Android I sometimes get the following errors logged to my back-end crash reporting system (sentry.io):
ReferenceError __jsonpXX__ is not defined
where XX could be any number and is always different.
Looking at my logs it appears these errors ONLY occur when the FAYE connection has gone offline (the FAYE connection seems to continuously go online and offline - is this usual?). When I say on/offline I just mean that I write a console log on transport up or transport down. I am guessing that because it only ever seems to happen at a time FAYE is offline that these errors are being generated by FAYE - is that the case? If so, is there a recommended way of stopping them from occurring?
thanks
The text was updated successfully, but these errors were encountered: