rstrouse / nodejs-poolController-dashPanel

A dashboard panel for tagyoureit/nodejs-poolController
38 stars 20 forks source link

Unhandled promise rejection on first start only #50

Closed emes closed 2 years ago

emes commented 2 years ago

I'm seeing UnhandledPromiseRejectionWarning just once when dashPanel is started for the very first time and hamburger is clicked.

Steps:

$ git clone https://github.com/rstrouse/nodejs-poolController-dashPanel.git
$ cd nodejs-poolController-dashPanel
$ npm install
$ npm start

Open UI in browser and click on hamburger.

> nodejs-poolcontroller-dashpanel@7.5.1 start
> npm run build && node dist/app.js

> nodejs-poolcontroller-dashpanel@7.5.1 build
> tsc

Updated configuration file
info: Server is now listening on 0.0.0.0:5150
192.168.34.50 GET /config/serviceUri?null
192.168.34.50 GET /options?null
192.168.34.50 GET /config/appVersion?null
Updated configuration file
The current git branch output is HEAD
The current git commit output is 4843f7a398d26f3e1024b376422acbbf652087a3
Updated configuration file
(node:18975) UnhandledPromiseRejectionWarning: No data returned.
(Use `node --trace-warnings ...` to show where the warning was created)
(node:18975) 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: 1)
(node:18975) [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.

With config.json present, the error is never to be seen again.

Let me know if you're not seeing same and happy to add more detail/test more.

tagyoureit commented 2 years ago

Fixed. Thanks.