GabrielBB / xvfb-action

Run your tests headlessly ❌🖥️
https://github.com/marketplace/actions/gabrielbb-xvfb-action
MIT License
140 stars 20 forks source link

Showing UnhandledPromiseRejectionWarning when the 'npm test' exits with error code 1 #15

Closed vineetmimrot closed 3 years ago

vineetmimrot commented 4 years ago

I am using this action for running "npm test". My test fails and exits with process.exit(1) but the action shows below warning and doesn't exit with the same exit code and showing the action as successful. Can you please check it.

(node:2720) UnhandledPromiseRejectionWarning: Error: The process 'C:\hostedtoolcache\windows\node\12.18.3\x64\npm.cmd' failed with exit code 1 at ExecState._setResult (D:\a\_actions\GabrielBB\xvfb-action\v1.2\node_modules\@actions\exec\lib\toolrunner.js:561:25) at ExecState.CheckComplete (D:\a\_actions\GabrielBB\xvfb-action\v1.2\node_modules\@actions\exec\lib\toolrunner.js:544:18) at ChildProcess.<anonymous> (D:\a\_actions\GabrielBB\xvfb-action\v1.2\node_modules\@actions\exec\lib\toolrunner.js:444:27) at ChildProcess.emit (events.js:210:5) at maybeClose (internal/child_process.js:1021:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5) (node:2720) 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) (node:2720) [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.

golf1052 commented 3 years ago

You need to upgrade to using version 1.4 of this action. That bug was fixed in that release.

GabrielBB commented 3 years ago

Tag v1 now always reference the latest version (v1.5) . Working