-
Notifications
You must be signed in to change notification settings - Fork 206
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
Request inside lib facing exception #285
Comments
Can you share your exact code you called and some more details about the context? It is very hard to debug without it. You could also try running your application with the |
@hypesystem : So, it's pretty straight forward, I always call the send method with a single receiver. Its not breaking always but at times.
|
Hmm it does look like an odd error, and it's very hard to debug if it is so sporadic. How did you find the original stack trace? Was there an error message? (Just the stack trace, with no error, makes it hard to figure out what exactly went wrong.) Does the app crash when the error occurs, or does it just return the error? If it crashes, then it seems like an error in the |
@hypesystem , well I came to know about it(accidentally) because I wasn't handling the error correctly on my end and crashed my app server . There was no specific error message as such. I found out the stack trace from the logs. The error comes in the error part of the callback rather than coming in the response part, as we normally get it from the GCM responses. Let me know your views on this. |
Ah! Well in that case it seems that the error was passed out correctly, but is indeed "unhandleable". Something went wrong that could have done nothing about. The correct response in this case is probably to wait for a while and then try again, or to add the notification to an error queue to be handled later. Alternatively, you can simply drop the notification in the rare cases where this happens (if the notification is not important). Basically: this is indeed an error, and you need to decide what to do about it. We could probably be better about describing the error. I'll ask again, just to be sure: was there an error message before the stack trace, that explained the reason for the error? |
@hypesystem , Nope there wasn't . Anyways I am monitoring the error callback now, added some handling and shall communicate here as soon as I face the same error again. |
Cool! What we could do is wrap all I'll leave this issue open for that reason :-) |
This is the stack trace I was able to log when the error occurred.
`
at Request._callback (/home/code/node_modules/node-gcm/lib/sender.js:151:24)
I feel this is a concurrency issue where the error callback of the socket is being called.
The text was updated successfully, but these errors were encountered: