Skip to content
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

You have triggered an unhandledRejection, you may have forgotten to catch a Promise rejection #227

Closed
johnRivs opened this issue May 18, 2017 · 2 comments

Comments

@johnRivs
Copy link

Recently I went from Node 6 to Node 7 on my server + updating to tmi.js 1.2.1 and I'm noticing these errors regarding promises.

Error log:

17-05-2017 02:06:33 -04:00: You have triggered an unhandledRejection, you may have forgotten to catch a Promise rejection:
bad_timeout_broadcaster
17-05-2017 02:15:42 -04:00: (node:7743) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): No response from Twitch.
17-05-2017 02:15:42 -04:00: (node:7743) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
17-05-2017 02:29:18 -04:00: You have triggered an unhandledRejection, you may have forgotten to catch a Promise rejection:
bad_timeout_broadcaster
17-05-2017 18:33:45 -04:00: You have triggered an unhandledRejection, you may have forgotten to catch a Promise rejection:
No response from Twitch.
18-05-2017 00:20:55 -04:00: You have triggered an unhandledRejection, you may have forgotten to catch a Promise rejection:
no_permission
18-05-2017 01:29:29 -04:00: (node:25546) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): No response from Twitch.
18-05-2017 01:29:29 -04:00: (node:25546) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
18-05-2017 18:13:01 -04:00: (node:25546) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 3): No response from Twitch.

Due to no stack trace I'm not sure where No response from Twitch. is coming from. The one about bad_timeout_broadcaster comes from this:

irc.client.on('notice', (channel, msgid, message) => {
    if (! ['msg_ratelimit', 'timeout_success', 'host_target_went_offline', 'msg_subsonly'].includes(msgid)) {
        console.log(`TWITCH-IRC(notice) Channel: ${channel}. Msgid: ${msgid}. Message: ${message}.`);
    }
});

Where exactly is the promise I need to provide a .catch() to, according to the error message?

Server configuration

  • Operating system: Ubuntu 16.04
  • Node version (if applicable): v7.9.0
  • NPM version (if applicable): 4.2.0
  • tmi.js version: 1.2.1
@Schmoopiie
Copy link
Member

tmi.js is only supported by Node 4.x at this time. There is no ETA when we will support Node 6.x and 7.x

@Schmoopiie
Copy link
Member

Closing this as it is a duplicate of #201

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants