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
Puppeteer not working with node 14 #5719
Comments
@DRoet only with node 14? Try |
yes I just rebuild my images using |
how do I install this? doesn't seem to be a valid tag on the registry |
It looks like it's a problem with extraction. A temporary workaround is to extract the downloaded chromium manually: $ mv node_modules/puppeteer/.local-chromium/mac-737027 node_modules/puppeteer/.local-chromium/mac-737027.bak
$ unzip node_modules/puppeteer/.local-chromium/chrome-mac.zip -d node_modules/puppeteer/.local-chromium/mac-737027 |
Likely culprit: max-mapper/extract-zip#94 |
Thanks for the debugging all; looks like We'll see if a fix lands in extract-zip and do some digging. @DRoet you can install via the master branch on GitHub to get the very latest. |
It also looks like the suspected bug might have been in Node: nodejs/node#32968. In which case we may have to sit tight for a Node patch release. In the mean time I'll see if the error message from Puppeteer can be nicer. |
There is currently a bug with extract-zip and Node v14.0.0 that causes extractZip to silently fail: #5719 Rather than silenty fail if the user is on Node 14 we instead detect that and throw an error directing the user to that bug. The rejection message below is surfaced to the user in the command line. The issue seems to be in streams never resolving so we wrap the call in a timeout and give it 100ms to resolve before deciding on an error. If the user is on Node < 14 we maintain the behaviour we had before this patch. Here's how this change impacts the output on Node 14 and Node 10: Node 10: ``` npm run tsc && rm -r .local-* && node install > puppeteer@3.0.1-post tsc /Users/jacktfranklin/src/puppeteer > tsc --version && tsc -p . && cp src/protocol.d.ts lib/ && cp src/externs.d.ts lib/ Version 3.8.3 Downloading Chromium r737027 - 118.4 Mb [====================] 100% 0.0s Chromium (737027) downloaded to /Users/jacktfranklin/src/puppeteer/.local-chromium/mac-737027 ``` --- Node 14 without this patch: ``` npm run tsc && rm -r .local-* && node install > puppeteer@3.0.1-post tsc /Users/jacktfranklin/src/puppeteer > tsc --version && tsc -p . && cp src/protocol.d.ts lib/ && cp src/externs.d.ts lib/ Version 3.8.3 Downloading Chromium r737027 - 118.4 Mb [====================] 100% 0.0s ``` Note that whilst it doesn't error, it doesn't complete the install. We don't get the success message that we saw above in the Node 10 install. --- Node 14 with this patch: ```npm run tsc && rm -r .local-* && node install > puppeteer@3.0.1-post tsc /Users/jacktfranklin/src/puppeteer > tsc --version && tsc -p . && cp src/protocol.d.ts lib/ && cp src/externs.d.ts lib/ Version 3.8.3 Downloading Chromium r737027 - 118.4 Mb [====================] 100% 0.0s ERROR: Failed to set up Chromium r737027! Set "PUPPETEER_SKIP_DOWNLOAD" env variable to skip download. Puppeteer currently does not work on Node v14 due to an upstream bug. Please see #5719 for details. ``` The explicit message should save users a good amount of debugging time.
I have opened #5732 which at least fixes the silent failures and provides a helpful message. |
notable change: - temp-fix: ci: delay test 14.x, wait for: puppeteer/puppeteer#5719 - fix: sanity test for `nodejs@14` - node: add TLS server session ticket rotation - use `response.writableEnded` (need nodejs@>=12.9) - package update
notable change: - temp-fix: ci: delay test 14.x, wait for: puppeteer/puppeteer#5719 - fix: sanity test for `nodejs@14` - node: add TLS server session ticket rotation - use `response.writableEnded` (need nodejs@>=12.9) - package update
notable change: - temp-fix: ci: delay test 14.x, wait for: puppeteer/puppeteer#5719 - fix: ci: git CRLF config & longer test timeout - fix: sanity test for `nodejs@14` - node: add TLS server session ticket rotation - use `response.writableEnded` (need nodejs@>=12.9) - package update
* chore: Useful error for Node v14 breakage There is currently a bug with extract-zip and Node v14.0.0 that causes extractZip to silently fail: #5719 Rather than silenty fail if the user is on Node 14 we instead detect that and throw an error directing the user to that bug. The rejection message below is surfaced to the user in the command line. The issue seems to be in streams never resolving so we wrap the call in a timeout and give it 100ms to resolve before deciding on an error. If the user is on Node < 14 we maintain the behaviour we had before this patch. Here's how this change impacts the output on Node 14 and Node 10: Node 10: ``` npm run tsc && rm -r .local-* && node install > puppeteer@3.0.1-post tsc /Users/jacktfranklin/src/puppeteer > tsc --version && tsc -p . && cp src/protocol.d.ts lib/ && cp src/externs.d.ts lib/ Version 3.8.3 Downloading Chromium r737027 - 118.4 Mb [====================] 100% 0.0s Chromium (737027) downloaded to /Users/jacktfranklin/src/puppeteer/.local-chromium/mac-737027 ``` --- Node 14 without this patch: ``` npm run tsc && rm -r .local-* && node install > puppeteer@3.0.1-post tsc /Users/jacktfranklin/src/puppeteer > tsc --version && tsc -p . && cp src/protocol.d.ts lib/ && cp src/externs.d.ts lib/ Version 3.8.3 Downloading Chromium r737027 - 118.4 Mb [====================] 100% 0.0s ``` Note that whilst it doesn't error, it doesn't complete the install. We don't get the success message that we saw above in the Node 10 install. --- Node 14 with this patch: ```npm run tsc && rm -r .local-* && node install > puppeteer@3.0.1-post tsc /Users/jacktfranklin/src/puppeteer > tsc --version && tsc -p . && cp src/protocol.d.ts lib/ && cp src/externs.d.ts lib/ Version 3.8.3 Downloading Chromium r737027 - 118.4 Mb [====================] 100% 0.0s ERROR: Failed to set up Chromium r737027! Set "PUPPETEER_SKIP_DOWNLOAD" env variable to skip download. Puppeteer currently does not work on Node v14 due to an upstream bug. Please see #5719 for details. ``` The explicit message should save users a good amount of debugging time.
also ⬆️ @types/chai, @types/lodash, @types/mocha, @types/node, @types/puppeteer, @types/semver, ajv, commander, dependency-cruiser, mocha, mscgenjs, mscgenjs-inpage, nyc, prettier, puppeteer, semver, ts-node, tslint, typescript, upem also keep puppeteer on 2.1.1 as 3.x does install incorrectly when npm i'd in node 14. Also see puppeteer/puppeteer#5719
also ⬆️ @types/chai, @types/lodash, @types/mocha, @types/node, @types/puppeteer, @types/semver, ajv, commander, dependency-cruiser, mocha, mscgenjs, mscgenjs-inpage, nyc, prettier, puppeteer, semver, ts-node, tslint, typescript, upem also keep puppeteer on 2.1.1 as 3.x does install incorrectly when npm i'd in node 14. Also see puppeteer/puppeteer#5719
Same issue troubled me, |
same here |
Fixed by Node 14.1.0. Verified on Linux/Mac/Windows. |
Alright, it failed once in one of our projects because of the (node14-specific) timeout that was added to the extraction process. 10s is too low for our CI. Workaround bites back. Any chance for it to be removed, now that Node is fixed? FYI @jackfranklin |
Can confirm it is working again on |
It's also intermittently failing for us because of the short timeout. |
@mathiasbynens saw you've just released a patch version which still has this issue. any chance for another one with the node14-specific-timeout removed? :) this is what blocks me from adding Node 14 tests to several projects. |
Steps to reproduce
Tell us about your environment:
What steps will reproduce the problem?
Please include code that reproduces the issue.
puppeteer.launch()
)What is the expected result?
code runs without issues, just like on 13.13.0
What happens instead?
Error: Failed to launch the browser process! spawn /opt/app/node_modules/puppeteer/.local-chromium/linux-737027/chrome-linux/chrome ENOENT
The text was updated successfully, but these errors were encountered: