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

[Bug] Post-install scripts doesn't run on Node.js 14 #1236

Closed
1 task
aduh95 opened this issue Apr 22, 2020 · 3 comments
Closed
1 task

[Bug] Post-install scripts doesn't run on Node.js 14 #1236

aduh95 opened this issue Apr 22, 2020 · 3 comments
Labels
bug Something isn't working reproducible This issue can be successfully reproduced

Comments

@aduh95
Copy link
Contributor

aduh95 commented Apr 22, 2020

  • I'd be willing to implement a fix

Describe the bug

Puppeteer 3.x doesn't download the browser executable when using Node.js 14.0.0.

To Reproduce

Reproduction
const {promises: {writeFile}} = require(`fs`);

await packageJsonAndInstall({
  dependencies: {puppeteer: "3.x"}
});

await expect(yarn(
  'node', `--unhandled-rejections=strict`, `-e`,
  `require("puppeteer").launch().then(b=>b.close())`
)).rejects.not.toThrow('Failed to launch the browser process!');

Environment if relevant (please complete the following information):

  • OS: [e.g. OSX, Linux, Windows, ...] macOS
  • Node version [e.g. 8.15.0, 10.15.1, ...] 14.0.0
  • Yarn version [e.g. 2.0.0-rc1, ...] master (b22a72c)

Additional context

Also reproduces with Yarn 1.

Can't reproduce on:

  • Node.js 14.0.0 with npm
  • Node.js 13.13.0 with Berry and Puppeteer 3.x
  • Node.js 14.0.0 with Berry and Puppeteer 2.x

It seems there is something specific between Puppeteer 3, Node.js 14 and Yarn that doesn't work properly.

@aduh95 aduh95 added the bug Something isn't working label Apr 22, 2020
@yarnbot yarnbot added the reproducible This issue can be successfully reproduced label Apr 22, 2020
@yarnbot

This comment has been minimized.

@yarnbot
Copy link
Collaborator

yarnbot commented Apr 22, 2020

This issue reproduces on master:

Error: expect(received).rejects.not.toThrow(expected)

Expected substring: not "Failed to launch the browser process!"
Received message:       "Command failed: /usr/bin/node /github/workspace/scripts/actions/../run-yarn.js node --unhandled-rejections=strict -e require(\"puppeteer\").launch().then(b=>b.close())
/tmp/tmp-27tfybUSi285al/.yarn/unplugged/puppeteer-npm-3.0.1-c21ca23987/node_modules/puppeteer/lib/Launcher.js:615
            reject(new Error([
                   ^

Error: Failed to launch the browser process! spawn /tmp/tmp-27tfybUSi285al/.yarn/unplugged/puppeteer-npm-3.0.1-c21ca23987/node_modules/puppeteer/.local-chromium/linux-737027/chrome-linux/chrome ENOENT


TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/master/docs/troubleshooting.md

    at onClose (/tmp/tmp-27tfybUSi285al/.yarn/unplugged/puppeteer-npm-3.0.1-c21ca23987/node_modules/puppeteer/lib/Launcher.js:615:20)
    at ChildProcess.<anonymous> (/tmp/tmp-27tfybUSi285al/.yarn/unplugged/puppeteer-npm-3.0.1-c21ca23987/node_modules/puppeteer/lib/Launcher.js:607:71)
    at ChildProcess.emit (events.js:223:5)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:270:12)
    at onErrorNT (internal/child_process.js:456:16)
    at processTicksAndRejections (internal/process/task_queues.js:81:21)

"

      at onClose (.yarn/unplugged/puppeteer-npm-3.0.1-c21ca23987/node_modules/puppeteer/lib/Launcher.js:615:20)
      at ChildProcess.<anonymous> (.yarn/unplugged/puppeteer-npm-3.0.1-c21ca23987/node_modules/puppeteer/lib/Launcher.js:607:71)
    at Object.toThrow (/github/workspace/.yarn/cache/expect-npm-24.8.0-8c7640c562-2.zip/node_modules/expect/build/index.js:242:20)
    at module.exports (evalmachine.<anonymous>:11:16)
    at processTicksAndRejections (internal/process/task_queues.js:94:5)
    at async /github/workspace/.yarn/cache/@arcanis-sherlock-npm-1.0.38-d4f5e2dbf3-2.zip/node_modules/@arcanis/sherlock/lib/executeRepro.js:56:13
    at async executeInTempDirectory (/github/workspace/.yarn/cache/@arcanis-sherlock-npm-1.0.38-d4f5e2dbf3-2.zip/node_modules/@arcanis/sherlock/lib/executeRepro.js:17:16)
    at async Object.executeRepro (/github/workspace/.yarn/cache/@arcanis-sherlock-npm-1.0.38-d4f5e2dbf3-2.zip/node_modules/@arcanis/sherlock/lib/executeRepro.js:24:12)
    at async ExecCommand.execute (/github/workspace/.yarn/cache/@arcanis-sherlock-npm-1.0.38-d4f5e2dbf3-2.zip/node_modules/@arcanis/sherlock/lib/commands/exec.js:25:38)
    at async ExecCommand.validateAndExecute (/github/workspace/.yarn/cache/clipanion-npm-2.0.0-rc.16-b9444aaf89-2.zip/node_modules/clipanion/lib/advanced/Command.js:161:26)
    at async Cli.run (/github/workspace/.yarn/cache/clipanion-npm-2.0.0-rc.16-b9444aaf89-2.zip/node_modules/clipanion/lib/advanced/Cli.js:74:24)
    at async Cli.runExit (/github/workspace/.yarn/cache/clipanion-npm-2.0.0-rc.16-b9444aaf89-2.zip/node_modules/clipanion/lib/advanced/Cli.js:83:28)

@aduh95
Copy link
Contributor Author

aduh95 commented Apr 23, 2020

Actually the problem seems to come from max-mapper/extract-zip#94 rather than Yarn. Closing.

@aduh95 aduh95 closed this as completed Apr 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working reproducible This issue can be successfully reproduced
Projects
None yet
Development

No branches or pull requests

2 participants