aclap-dev / jocly

Javascript library and tools to provide user interface (2D, 3D, VR) and engine for playing board games
https://jocly.com/
Other
71 stars 28 forks source link

(node:6096) UnhandledPromiseRejectionWarning: #25

Open ecobabush opened 6 years ago

ecobabush commented 6 years ago

Yesterday when I played hexchess variant was hunging with this text:

(node:7457) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 3): TypeError: Cannot read property 's' of undefined (node:7457) 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.

Today was the next one:

(node:6096) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 7): TypeError: Cannot read property 's' of undefined (node:6096) 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.

Could it be because of using lates Node.js v.8.5.0? Maybe the code was written for former versions of node?

On the freenode irq on node channel I've been told by one that he did not use Promises due to error handling manner (or not handling - don't remember exactly).

mi-g commented 6 years ago

Yes, that is it: an error is not caught and node generates an error message for that. If the problem is just seeing that message in the log and not having side effect (like the actual error causing problem), it's not a big deal. And yes, the code has not been tested (at least by me) on node 8 so it is very possible some errors may be related to this version of node.

ecobabush commented 6 years ago

Side effect in this case is that the game (chess) have been stopped (freezed). I have written an Issue about Demi-chess and Malett chess sometimes freezes (full stopped,Then I have to restart game). And this two issues (today's and about Demi-chess and Malett) maybe have one resource.

mi-g commented 6 years ago

That's a serious drawback. Did you check if it was working with node 7 (my current version of node is 7.6.0) ?

ecobabush commented 6 years ago

No. I began to utilize your program with v.8 from very beginning. I have asked about it on freenode again and one guesses the reason is not in node version. He suggested me to use --trace-warnings flag. And I am going to learn how to use it.

mi-g commented 6 years ago

Let us know how it goes.

ecobabush commented 6 years ago

With help on freenode I understood that this task is not for beginner like me. I do not know how to use this flag, how to use electron devtools and something other.