Skip to content
This repository was archived by the owner on Sep 11, 2025. It is now read-only.

Conversation

@xiexieeric
Copy link
Contributor

Tested with a heroku-22 stack in my own project. Seems to work fine. Could others test it out too?

Also added a warning regarding playwright-chromium version 1.15 being the last supported version

@xiexieeric xiexieeric changed the base branch from master to rework-getting-the-dependencies-1 June 30, 2022 19:54
@xiexieeric xiexieeric changed the base branch from rework-getting-the-dependencies-1 to master June 30, 2022 19:54
@xiexieeric
Copy link
Contributor Author

@mxschmitt Pinging you for attention. First time making a PR into open source!

@brent-yearone
Copy link

I totally need this patch -- I'm hoping to run playwright on Heroku-22.

Thank you, @xiexieeric, for putting it together! 谢谢你!

brent-yearone added a commit to brent-yearone/heroku-playwright-buildpack that referenced this pull request Jul 26, 2022
Code shamelessly taken from playwright-community#20 because I can't afford to wait for that PR to get merged.
brent-yearone added a commit to brent-yearone/heroku-playwright-buildpack that referenced this pull request Jul 26, 2022
Again, shamelessly cribbed from playwright-community#20 because I can't afford to wait.
@lippytak
Copy link

lippytak commented Nov 3, 2022

@xiexieeric thanks for putting this together!

Everything seems to build correctly for me, but when I try to run playwright.chromium.launch I still get this error:
playwright._impl._api_types.Error: Executable doesn't exist at /app/.heroku/python/lib/python3.10/site-packages/playwright/driver/package/.local-browsers/chromium-1019/chrome-linux/chrome

Same result with playwright.firefox.launch: playwright._impl._api_types.Error: Executable doesn't exist at /app/.heroku/python/lib/python3.10/site-packages/playwright/driver/package/.local-browsers/firefox-1344/firefox/firefox

I'm just running this buildback and then the standard heroku/python.

Any idea what might be going on / suggestions? Appreciate any help.

(+ @brent-yearone in case you got things working)

@OmarSaidIbrahim
Copy link

Does this change fix the error I get when trying to deploy it on heroku ? issue #23

@granth
Copy link

granth commented Jan 3, 2023

The browser can be installed with a heroku-cleanup script in package.json.

"scripts": { "heroku-cleanup": "yarn run playwright install chromium" }

It would be nicer to have it in the buildpack, though.

@garcia-marco
Copy link

Up

@pistachiomatt
Copy link

Is this repo being maintained?

@boblauer
Copy link

boblauer commented Mar 7, 2023

@xiexieeric This worked beautifully, thank you!

For anyone else who wants to try it, you can use this url for your buildpack:

https://github.com/Nitra-Finance/heroku-playwright-buildpack#518fad4074f26aeef0c1fb5d5bfaed41ae2f629e

README.md Outdated

It's common to only install the [browser-specific NPM packages](https://playwright.dev/#version=v1.1.1&path=docs%2Finstallation.md&q=download-single-browser-binary), which will reduce installation time and slug size on Heroku in the end, that should fix also the error that the slug size is too large.

Versions of `playwright-chromium@>1.15.0` take a new dependency on `playwright-core`, which does not play well with this buildpack, causing exceptions that look like
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy to land but I think we should replace his paragraph with #20 (comment).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review. I tried a ton of variations of playwright install chromium but couldn't quite get it working on my project, but I can definitely remove the comment! Excited to get this merged

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment is updated

@mxschmitt mxschmitt merged commit 7ec3327 into playwright-community:master Mar 7, 2023
@jerry-yan
Copy link

Is still this being supported? Will there be heroku-24 stack support?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

10 participants