You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If fetching browser binaries fails during installation of playwright (for example because of network error) the whole installation is still successful. When using npm a warning is printed to the console. In yarn, which swallows console logs from postinstall scripts, there is no indication that something went wrong.
λ npm install playwright
>[email protected] install C:\Users\hlukafis\projects\test\node_modules\playwright
> node install.js
(node:16680) UnhandledPromiseRejectionWarning: Error: connect ECONNREFUSED 216.58.205.48:443
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1137:16)
(node:16680) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async functionwithout 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:16680) [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.
+ [email protected]
added 46 packages from 36 contributors in 17.19s
2 packages are looking for funding
run `npm fund`for details
Context:
Describe the bug
If fetching browser binaries fails during installation of playwright (for example because of network error) the whole installation is still successful. When using
npm
a warning is printed to the console. In yarn, which swallows console logs from postinstall scripts, there is no indication that something went wrong.The root cause of the bug is that promise rejection in https://github.com/microsoft/playwright/blob/master/src/server/browserFetcher.ts#L147 is not handled in any way, for example with
process.exit(1)
. Because in node<=12 unhandled promise rejections does not terminate the process, this causes whole installation script to succeed instead of failing it.Code Snippet
npm
yarn
The text was updated successfully, but these errors were encountered: