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" Error #57

Open
Nick2bad4u opened this issue Feb 20, 2018 · 7 comments

Comments

@Nick2bad4u
Copy link

Expected behaviour

Unsure

Actual behaviour

Sometimes this causes Nelson to stop finding new peers, other time it seems to not cause any direct problem.

Steps to reproduce

Currently running a network of 12 Nodes, This error is appearing on almost all of my nodes. Followed Guide for install on the github page. Im also running nelson under PM2 with my own config. (Can provide config if needed)

Basic Info

  • Operating System: Linux Ubuntu 16.04 LTS
  • Node (npm) Version: 9+
  • IRI Version: v1.4.2.1
  • Nelson version: 0.4.0

Nelson Info

  • Epoch: Different on each node
  • Cycle: Different on each node
  • Connected peers: Different on each node

Error message -

You have triggered an unhandledRejection, you may have forgotten to catch a Promise rejection:
at WebSocket.initAsClient (/usr/lib/node modules/nelson.cli/node modules/ws/lib/websocket.js:529:11)
at new WebSocket (/usr/lib/node modules/nelson.cli/node_modules/ws/lib/websocket.js:71:20)
at Node.connectPeer (/usr/lib/node modules/nelson.cli/dist/node/node.js:916:33)
at /usr/lib/node modules/nelson.cli/dist/node/node.js:954:32
at Array.map ()
at Node.reconnectPeers /usr/lib/node modules/nelson.cli/dist/node/node.js:953:32)
at /usr/lib/node modules/nelson.cli/dist/node/node.js: 1051:29
at new Promise ()
at Node._onTick(/usr/lib/node modules/nelson.cli/dist/node/node.js 1050:24)
at Heart._tick (/usr/lib/node_modules/nelson.cli/dist/node/heart.js: 124:23)

image

Aerowave#5383 is reporting the same Issue on discord:

Aerowave - Today at 6:57 AM
Hi, I'm having an issue with Nelson this morning, similar to @typpi ... after connecting to IRI Nelson terminates with an unhandled promise rejection. Nothing's changed on my config recently, only rebooted the server this morning, now it won't find any neighbours again? Thanks in advance

Contact:

Contact me on Discord at Typpi#3906 or email at [email protected]

Thanks!

@adriankirchner
Copy link

Same here:

Basic Info

  • Operating System: Linux Ubuntu 16.04 LTS
  • Node (npm) Version: 9.5.0
  • IRI Version: v1.4.2.1
  • Nelson version: 0.4.0
19:14:30.667	16600::NODE  terminating...
19:14:30.668	16600::IRI   Neighbors removed (if there were any): udp://xx.xx.xx.xx:14600, udp://xx.xx.xx.xx:14600, udp://xx.xx.xx.xx:14600, udp://xx.xx.xx.xx:14600, udp://xx.xx.xx.xx:14600, udp://xx.xx.xx.xx:14600, udp://xx.xx.xx.xx:14600, udp://xx.xx.xx.xx:14777, udp://xx.xx.xx.xx:14777, udp://xx.xx.xx.xx:14600, udp://xx.xx.xx.xx:14600, udp://xx.xx.xx.xx:14600, udp://xx.xx.xx.xx:14600, udp://xx.xx.xx.xx:14600, udp://xx.xx.xx.xx:14600
Unhandled Rejection at: Promise Promise {
  <rejected> ReferenceError: reject is not defined
    at /usr/lib/node_modules/nelson.cli/dist/node/iri.js:252:33
    at makeRequest.prepareResult (/usr/lib/node_modules/nelson.cli/node_modules/iota.lib.js/lib/utils/makeRequest.js:315:12)
    at exports.XMLHttpRequest.request.onreadystatechange (/usr/lib/node_modules/nelson.cli/node_modules/iota.lib.js/lib/utils/makeRequest.js:71:25)
    at exports.XMLHttpRequest.dispatchEvent (/usr/lib/node_modules/nelson.cli/node_modules/xmlhttprequest/lib/XMLHttpRequest.js:591:25)
    at setState (/usr/lib/node_modules/nelson.cli/node_modules/xmlhttprequest/lib/XMLHttpRequest.js:610:14)
    at IncomingMessage.<anonymous> (/usr/lib/node_modules/nelson.cli/node_modules/xmlhttprequest/lib/XMLHttpRequest.js:447:13)
    at IncomingMessage.emit (events.js:165:20)
    at endReadableNT (_stream_readable.js:1101:12)
    at process._tickCallback (internal/process/next_tick.js:152:19) } reason: ReferenceError: reject is not defined
    at /usr/lib/node_modules/nelson.cli/dist/node/iri.js:252:33
    at makeRequest.prepareResult (/usr/lib/node_modules/nelson.cli/node_modules/iota.lib.js/lib/utils/makeRequest.js:315:12)
    at exports.XMLHttpRequest.request.onreadystatechange (/usr/lib/node_modules/nelson.cli/node_modules/iota.lib.js/lib/utils/makeRequest.js:71:25)
    at exports.XMLHttpRequest.dispatchEvent (/usr/lib/node_modules/nelson.cli/node_modules/xmlhttprequest/lib/XMLHttpRequest.js:591:25)
    at setState (/usr/lib/node_modules/nelson.cli/node_modules/xmlhttprequest/lib/XMLHttpRequest.js:610:14)
    at IncomingMessage.<anonymous> (/usr/lib/node_modules/nelson.cli/node_modules/xmlhttprequest/lib/XMLHttpRequest.js:447:13)
    at IncomingMessage.emit (events.js:165:20)
    at endReadableNT (_stream_readable.js:1101:12)
    at process._tickCallback (internal/process/next_tick.js:152:19)

@MarioNoll
Copy link

+1

@adriankirchner
Copy link

@romansemko this is still happening:

16:32:58.505	16600::NODE  incoming connection established ::ffff:2.2.2.2
16:32:58.506	16600::NODE  connection established 2.2.2.2:16600
16:32:58.516	16600::IRI   Neighbors added: udp://2.2.2.2:14600
16:32:59.635	16600::NODE  connecting peer 1.1.1.1:16600
16:33:05.077	16600::IRI   Neighbors removed (if there were any): udp://3.3.3.3:14600
16:33:05.078	16600::NODE  terminating...
16:33:05.080	16600::NODE  connection closed 3.3.3.3:16600 (socket closed)
16:33:05.080	16600::IRI   Neighbors removed (if there were any): udp://x.x.x.x:14600, udp://x.x.x.x:14600, udp://x.x.x.x:14600, udp://x.x.x.x:14600, tcp://x.x.x.x:15600, udp://x.x.x.x:14600, udp://x.x.x.x:14600, udp://x.x.x.x:14600, udp://x.x.x.x:14600, udp://x.x.x.x:14600, udp://x.x.x.x:14600, udp://x.x.x.x:14600, udp://2.2.2.2:14600, udp://1.1.1.1:14600
Unhandled Rejection at: Promise Promise {
  <rejected> TypeError: Cannot read property 'connectionType' of null
    at /usr/lib/node_modules/nelson.cli/dist/node/iri.js:382:48
    at Array.map (<anonymous>)
    at /usr/lib/node_modules/nelson.cli/dist/node/iri.js:380:51
    at makeRequest.prepareResult (/usr/lib/node_modules/nelson.cli/node_modules/iota.lib.js/lib/utils/makeRequest.js:315:12)
    at exports.XMLHttpRequest.request.onreadystatechange (/usr/lib/node_modules/nelson.cli/node_modules/iota.lib.js/lib/utils/makeRequest.js:71:25)
    at exports.XMLHttpRequest.dispatchEvent (/usr/lib/node_modules/nelson.cli/node_modules/xmlhttprequest/lib/XMLHttpRequest.js:591:25)
    at setState (/usr/lib/node_modules/nelson.cli/node_modules/xmlhttprequest/lib/XMLHttpRequest.js:610:14)
    at IncomingMessage.<anonymous> (/usr/lib/node_modules/nelson.cli/node_modules/xmlhttprequest/lib/XMLHttpRequest.js:447:13)
    at IncomingMessage.emit (events.js:185:15)
    at endReadableNT (_stream_readable.js:1106:12) } reason: TypeError: Cannot read property 'connectionType' of null
    at /usr/lib/node_modules/nelson.cli/dist/node/iri.js:382:48
    at Array.map (<anonymous>)
    at /usr/lib/node_modules/nelson.cli/dist/node/iri.js:380:51
    at makeRequest.prepareResult (/usr/lib/node_modules/nelson.cli/node_modules/iota.lib.js/lib/utils/makeRequest.js:315:12)
    at exports.XMLHttpRequest.request.onreadystatechange (/usr/lib/node_modules/nelson.cli/node_modules/iota.lib.js/lib/utils/makeRequest.js:71:25)
    at exports.XMLHttpRequest.dispatchEvent (/usr/lib/node_modules/nelson.cli/node_modules/xmlhttprequest/lib/XMLHttpRequest.js:591:25)
    at setState (/usr/lib/node_modules/nelson.cli/node_modules/xmlhttprequest/lib/XMLHttpRequest.js:610:14)
    at IncomingMessage.<anonymous> (/usr/lib/node_modules/nelson.cli/node_modules/xmlhttprequest/lib/XMLHttpRequest.js:447:13)
    at IncomingMessage.emit (events.js:185:15)
    at endReadableNT (_stream_readable.js:1106:12)

@david-ni
Copy link

david-ni commented Jun 6, 2018

+1

@php717
Copy link

php717 commented Jul 2, 2020

any solution ?

@mmdzov
Copy link

mmdzov commented Dec 31, 2021

+1

@yogithesymbian
Copy link

any solution ? i got same issue but in other project . i cant tracing where is the error location...

You have triggered an unhandledRejection, you may have forgotten to catch a Promise rejection:
2|API-NODEJS  | Error: WHERE parameter "id" has invalid "undefined" value
2|API-NODEJS  |     at MySQLQueryGenerator.whereItemQuery (/var/www/api/node_modules/sequelize/lib/dialects/abstract/query-generator.js:1655:13)
2|API-NODEJS  |     at /var/www/api/node_modules/sequelize/lib/dialects/abstract/query-generator.js:1646:25
2|API-NODEJS  |     at Array.forEach (<anonymous>)
2|API-NODEJS  |     at MySQLQueryGenerator.whereItemsQuery (/var/www/api/node_modules/sequelize/lib/dialects/abstract/query-generator.js:1644:35)
2|API-NODEJS  |     at MySQLQueryGenerator.whereQuery (/var/www/api/node_modules/sequelize/lib/dialects/abstract/query-generator.js:1626:24)
2|API-NODEJS  |     at MySQLQueryGenerator.updateQuery (/var/www/api/node_modules/sequelize/lib/dialects/abstract/query-generator.js:320:116)
2|API-NODEJS  |     at MySQLQueryInterface.bulkUpdate (/var/www/api/node_modules/sequelize/lib/dialects/abstract/query-interface.js:350:37)
2|API-NODEJS  |     at Function.destroy (/var/www/api/node_modules/sequelize/lib/model.js:1781:42)
2|API-NODEJS  |     at processTicksAndRejections (node:internal/process/task_queues:96:5)

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

No branches or pull requests

7 participants