-
Notifications
You must be signed in to change notification settings - Fork 662
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
events.js:87 throw Error('Uncaught, unspecified "error" event.'); ^ Error: Uncaught, unspecified "error" event. at Error (native) #70
Comments
Hi, I'm not sure how to replicate this, when I try (using the latest release) with a blank string or random text as my token, I see logging to terminal like:
... and the client continuously attempts to reconnect with an increasing backoff. Could you let me know what you did to get the error you're mentioning above to be thrown? Thanks! |
I don't think this has anything to do with the token. It happens to a bot of mine randomly but apparently once per day to bi-daily. Can't reproduce it tho 😐 Full stacktrace here:
|
So, I think what you were seeing with this was an error event from the API. The line of code that was throwing the error was the client's handler for messages with type This will be followed by any events that occurred between the call to rtm.start and the connection to the message server. If you're reconnecting after a network problem this initial set of events may include a response to the last message sent on a previous connection (with a reply_to) so a client can confirm that message was received. Per the docs: If there was a problem connecting an error will be returned, including a descriptive error message:
My guess is that you were running into some issues with the old reconnection logic. You were likely being disconnected and then having some kind of problems getting re-authed - which was what the I just pushed the 2.0.0 release for this library, which is a ground up refactor with the aim of building a lib that both Slack and our external contributors can easily work with and improve. It also includes substantially improved reconnection logic and handling, for both routine disconnects as well So, the best way to resolve this issue is probably to upgrade to the latest version. If you have any problems in doing that, please create a new issue and I'll try and help you in there. If you see this problem after updating, let me know and I can see what I can do. |
Make use of body-parser, remove verification token check (issue slackapi#70).
Should you present a bad slack token (or append a blank space to the end of it in an environmental variable), this error is thrown without much context.
The text was updated successfully, but these errors were encountered: