-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'colorId' of null #3612
Comments
[2019-07-11 20:40:05.168] [ERROR] console - (node:194) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 39) |
Not working on it right now, but confirmed. |
I can confirm this is still a bug in 1.8.0, which is occurring a lot. |
…not defined For some reason authorInfo is sometimes null, and therefore it is not possible to get colorId from it. This resulted in the following stack trace: [2020-03-16 09:27:17.291] [ERROR] console - (node:1746) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'colorId' of null at <BASEDIR>/src/node/handler/PadMessageHandler.js:1199:37 at runMicrotasks (<anonymous>) at processTicksAndRejections (internal/process/task_queues.js:97:5) at async Promise.all (index 0) at async handleClientReady (<BASEDIR>/src/node/handler/PadMessageHandler.js:1171:5) [2020-03-16 09:27:17.291] [ERROR] console - (node:1746) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 76) [2020-03-16 09:27:19.034] [WARN] message - Dropped message, USERINFO_UPDATE Session not ready.[object Object] Which is due to a bug in Etherpad that we are not going to solve now. As a workaround, when this happens, let's set the username to "Anonymous" (if it is not already set), and colorId to the fixed value "#daf0b2". Warning messages are written in the logs to signal this condition. This is no definitive solution, but fixes ether#3612 (via a workaround).
Fixed via a workaround in #3719. The underlying bug still remains, but instead of a unhandled promise rejection, we'll get clear warning messages and a fallback to predefined values. |
We have a lot of error like this.
[2019-05-31 14:51:16.994] [ERROR] console - (node:10107) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'colorId' of null
at p.then.authorInfo (/home/etherpad/public/etherpad/src/node/handler/PadMessageHandler.js:1199:37)
at process._tickCallback (internal/process/next_tick.js:68:7)
[2019-05-31 14:51:16.995] [ERROR] console - (node:10107) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
[2019-05-31 14:51:16.996] [ERROR] console - (node:10107) [DEP0018] 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.
The text was updated successfully, but these errors were encountered: