Skip to content
This repository was archived by the owner on May 3, 2022. It is now read-only.

Unhandled promise rejection #5

Closed
zoski opened this issue Feb 6, 2017 · 5 comments
Closed

Unhandled promise rejection #5

zoski opened this issue Feb 6, 2017 · 5 comments
Assignees
Labels
Milestone

Comments

@zoski
Copy link

zoski commented Feb 6, 2017

Hello,

Since the 0.9.8 I get this error with Justcord: (node:7142) UnhandledPromiseRejectionWarning: Unhandled promise rejection the bridge seems to work well.

I can't figure out from where it come, but I wonder if that come from the nodeJS update include with jc3mp...

Justcord ready!
(node:12112) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: 403 FORBIDDEN on PATCH /channels/269118724592762880
(node:12112) 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.
(node:12112) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: 403 FORBIDDEN on PATCH /channels/269118724592762880
(node:12112) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 3): Error: 403 FORBIDDEN on PATCH /channels/269118724592762880
(node:12112) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 4): Error: 403 FORBIDDEN on PATCH /channels/269118724592762880
(node:12112) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 5): Error: 403 FORBIDDEN on PATCH /channels/269118724592762880
Discord: Zoski: test test
(node:12112) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 6): Error: 403 FORBIDDEN on PATCH /channels/269118724592762880
(node:12112) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 7): Error: 403 FORBIDDEN on PATCH /channels/269118724592762880
(node:12112) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 8): Error: 403 FORBIDDEN on PATCH /channels/269118724592762880
(node:12112) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 9): Error: 403 FORBIDDEN on PATCH /channels/269118724592762880
(node:12112) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 10): Error: 403 FORBIDDEN on PATCH /channels/269118724592762880
(node:12112) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 11): Error: 403 FORBIDDEN on PATCH /channels/269118724592762880
(node:12112) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 12): Error: 403 FORBIDDEN on PATCH /channels/269118724592762880
(node:12112) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 13): Error: 403 FORBIDDEN on PATCH /channels/269118724592762880
(node:12112) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 14): Error: 403 FORBIDDEN on PATCH /channels/269118724592762880
(node:12112) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 15): Error: 403 FORBIDDEN on PATCH /channels/269118724592762880
(node:12112) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 16): Error: 403 FORBIDDEN on PATCH /channels/269118724592762880
(node:12112) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 17): Error: 403 FORBIDDEN on PATCH /channels/269118724592762880
(node:12112) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 18): Error: 403 FORBIDDEN on PATCH /channels/269118724592762880
(node:12112) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 19): Error: 403 FORBIDDEN on PATCH /channels/269118724592762880
(node:12112) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 20): Error: 403 FORBIDDEN on PATCH /channels/269118724592762880
(node:12112) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 21): Error: 403 FORBIDDEN on PATCH /channels/269118724592762880
(node:12112) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 22): Error: Request timed out (>10000ms) on PATCH /channels/269118724592762880

@xforce
Copy link

xforce commented Feb 6, 2017

Some more info on that, this is not a fatal error yet, just a warning so you change your code. But as time goes by nodejs will make the switch to turn this into an error.
What the warning means is that a the reject of a promise was not handled somewhere.

@mdcfe
Copy link
Owner

mdcfe commented Feb 6, 2017

I think this is either a change with Discord's API, or an Eris-breaking change in Node.js. I'll investigate later; thanks for reporting this. Eris doesn't seem to handle failed promises on its own, so I'll need to handle them and fix this myself.

@mdcfe mdcfe self-assigned this Feb 6, 2017
@mdcfe mdcfe added the bug label Feb 6, 2017
@mdcfe mdcfe added this to the 1.0 milestone Feb 6, 2017
@mdcfe mdcfe closed this as completed in 36b9f20 Feb 6, 2017
@mdcfe
Copy link
Owner

mdcfe commented Feb 6, 2017

@zoski @xforce Could you test whether there are any more promises I haven't caught?

mdcfe added a commit that referenced this issue Feb 6, 2017
@zoski
Copy link
Author

zoski commented Feb 7, 2017

Looks like it's resolved to me. No more : UnhandledPromiseRejectionWarning But I get an different error:

Justcord ready! Could not update topic (reason: Error: 403 FORBIDDEN on PATCH /channels/269118724592762880)

I don't know where it come from, maybe 'cause I have manually set the channel topic through Discord or because the package is running on 2 servers at the same time with only one bot...

@mdcfe
Copy link
Owner

mdcfe commented Feb 7, 2017

The UnhandledPromiseRejectionWarning is fixed; now Justcord catches failures so Node won't complain.
@zoski This most likely means the bot doesn't have permission to change the channel topic. If you want to disable the channel topic updater, set topicTimeout in config.json to 0.

@mdcfe mdcfe mentioned this issue Feb 7, 2017
10 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants