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] Playwright cannot talk to Chromium on Heroku #1568

Closed
peter opened this issue Mar 27, 2020 · 7 comments
Closed

[BUG] Playwright cannot talk to Chromium on Heroku #1568

peter opened this issue Mar 27, 2020 · 7 comments
Assignees

Comments

@peter
Copy link

peter commented Mar 27, 2020

Context:

  • Playwright Version: 0.11 and 0.12.1
  • Operating System: Ubuntu 18 on Heroku

Chromium doesn’t work with Playwright on Heroku even with the recommended puppeteer build pack that worked with Playwright 0.9. Details and discussion in #634

To reproduce, use this repo and change the Playwright version: https://github.com/diervo/testing-heroku-playwright

@peter peter changed the title [BUG] [BUG] Playwright cannot talk to Chromium on Heroku Mar 27, 2020
@Wisbell
Copy link

Wisbell commented May 16, 2020

Any updates on this? Having the same issue.

EDIT: #2205

Make sure the --no-sandbox flag is set when running on heroku. Everything seems to be working fine on heroku with the latest version of playwright and the the build pack.

const browser = await chromium.launch({headless: true, args: ['--no-sandbox']});

@arjunattam
Copy link
Contributor

Thanks for checking this @Wisbell. Can you share more info on your Heroku config (e.g., which buildpack are you using)? We'd love to add it to the docs for other users.

@Wisbell
Copy link

Wisbell commented May 18, 2020

Buildpack: https://github.com/jontewks/puppeteer-heroku-buildpack

And of course whatever nodejs buildpack heroku automatically adds.

The package.json for the library I am using has this playwright version: "playwright": "^0.15.0"

@pavelfeldman
Copy link
Member

pavelfeldman commented Jun 28, 2020

@arjun27 assigning to make sure it is in the docs and can be closed.

@pcborges
Copy link

pcborges commented Jul 2, 2020

@Wisbell I'm doing exactly the same steps, and it's not working.
In fact the only difference is that I am using firefox, and unfortunately I need to use it.

const { firefox } = require("playwright");

  const browser = await firefox.launch({
    headless: true,
    args: ["--no-sandbox", "--disable-setuid-sandbox"],
  });

@mxschmitt
Copy link
Member

@pcborges I've created a Heroku buildpack for running Playwright including Chromium and Firefox on Heroku, let me know if it fits for your needs: https://github.com/mxschmitt/heroku-playwright-buildpack/

cc @peter @Wisbell

@pcborges
Copy link

pcborges commented Jul 3, 2020

@mxschmitt It worked very well, I just needed to remove the playwright package and install playwright-firefox as in your example, and added your buildpack before nodejs.
Thank you so much for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants