DeprecationWarning: Unhandled promise rejections are deprecated.
See original GitHub issueActual behaviour:
Unhandled promise rejections are deprecated.
Fix:
client.js Line 984
// Send command to server or channel..
client.prototype._sendCommand = function _sendCommand(delay, channel, command, fn) {
// Race promise against delay..
return new Promise((resolve, reject) => {
_.promiseDelay(delay).then(() => { reject("No response from Twitch."); });
// (...)
// Disconnected from server..
else { reject("Not connected to server."); }
}).catch(() => {});
};
Error log:
(node:26041) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): No response from Twitch.
(node:26041) 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.
Server configuration
- Operating system: Debian 8.6
- Node version (if applicable): 7.4
- NPM version (if applicable): 4.0.5
- tmi.js version: 1.1.2
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:7 (4 by maintainers)
Top Results From Across the Web
What is an unhandled promise rejection? - Stack Overflow
Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a ...
Read more >A fix to the Unhandled Promise Rejection Warning - Medium
(node:7741) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will ...
Read more >Unhandled promise rejections are deprecated" · Issue #5311 ...
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not...
Read more >Unhandled Promise Rejections in Node.js - The Code Barbarian
DeprecationWarning : Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.
Read more >Node.js 15 release: Updated handling of rejections, npm 7, N ...
(rejection id: 1) (node:31727) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I was going to post about this ages ago but never got around to it, noticed this when I upgraded my Node version (to v6) and when I did this my bot would just randomly crash every so often, seemingly randomly. The only errors that were logged were in relation to unhandled promises, so I thought it might be those. Not sure if it was the actual issue, but it still needs fixing of course.
Is this fix still coming?