Running Playwright in Heroku
See original GitHub issueToday we are running pupeteer in Heroku by using this buildpack: https://github.com/jontewks/puppeteer-heroku-buildpack
When trying to deploy with playwright with the trivial webkit example (the one described in this repo) I get the following error:
(node:4) UnhandledPromiseRejectionWarning: Error: WebKit revision is not downloaded. Run "npm install" or "yarn install"
2020-01-24T19:39:52.135779+00:00 app[web.1]: at WKPlaywright.launchServer (/app/node_modules/playwright-core/lib/server/wkPlaywright.js:94:23)
2020-01-24T19:39:52.135781+00:00 app[web.1]: at async WKPlaywright.launch (/app/node_modules/playwright-core/lib/server/wkPlaywright.js:67:24)
2020-01-24T19:39:52.135788+00:00 app[web.1]: at async /app/index.js:5:19
2020-01-24T19:39:52.135801+00:00 app[web.1]: -- ASYNC --
2020-01-24T19:39:52.135809+00:00 app[web.1]: at WKPlaywright.<anonymous> (/app/node_modules/playwright-core/lib/helper.js:54:23)
2020-01-24T19:39:52.135811+00:00 app[web.1]: at WKPlaywright.launch (/app/node_modules/playwright-core/lib/server/wkPlaywright.js:67:35)
2020-01-24T19:39:52.135813+00:00 app[web.1]: at WKPlaywright.<anonymous> (/app/node_modules/playwright-core/lib/helper.js:55:31)
2020-01-24T19:39:52.135815+00:00 app[web.1]: at /app/index.js:5:35
2020-01-24T19:39:52.135823+00:00 app[web.1]: at Object.<anonymous> (/app/index.js:19:3)
2020-01-24T19:39:52.135830+00:00 app[web.1]: at Module._compile (internal/modules/cjs/loader.js:955:30)
2020-01-24T19:39:52.135837+00:00 app[web.1]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:991:10)
2020-01-24T19:39:52.135840+00:00 app[web.1]: at Module.load (internal/modules/cjs/loader.js:811:32)
2020-01-24T19:39:52.135842+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:723:14)
2020-01-24T19:39:52.135844+00:00 app[web.1]: at Function.Module.runMain (internal/modules/cjs/loader.js:1043:10)
2020-01-24T19:39:52.135846+00:00 app[web.1]: -- ASYNC --
2020-01-24T19:39:52.135848+00:00 app[web.1]: at WKPlaywright.<anonymous> (/app/node_modules/playwright-core/lib/helper.js:54:23)
2020-01-24T19:39:52.135850+00:00 app[web.1]: at /app/index.js:5:35
2020-01-24T19:39:52.135852+00:00 app[web.1]: at Object.<anonymous> (/app/index.js:19:3)
2020-01-24T19:39:52.135853+00:00 app[web.1]: at Module._compile (internal/modules/cjs/loader.js:955:30)
2020-01-24T19:39:52.135855+00:00 app[web.1]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:991:10)
2020-01-24T19:39:52.135857+00:00 app[web.1]: at Module.load (internal/modules/cjs/loader.js:811:32)
2020-01-24T19:39:52.135859+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:723:14)
2020-01-24T19:39:52.135861+00:00 app[web.1]: at Function.Module.runMain (internal/modules/cjs/loader.js:1043:10)
2020-01-24T19:39:52.135863+00:00 app[web.1]: at internal/main/run_main_module.js:17:11
Certainly node_modules dependencies are installed otherwise the error would be different. Any ideas what would be missing?
I will keep debugging, but any hint might be useful.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:11 (4 by maintainers)
Top Results From Across the Web
Heroku Playwright Buildpack
This buildpack installs all the needed dependencies to use Playwright with Chromium and Firefox on Heroku.
Read more >Using Playwright on Heroku
Setup and usage of the Playwright Heroku buildpack to run Chromium and Firefox on the Heroku Ubuntu stack.
Read more >How to run/deploy playwright on Heroku? | by Akshay Mattoo
All one has to do is add the playwright build pack. To run the playwright on Heroku the container needs the right build...
Read more >Heroku Playwright Example - GitHub
The setup is based on using the Playwright Heroku Buildpack which installs the necessary dependencies and adjusts the needed Playwright specific settings. It's ......
Read more >Deploying playwright-python on Heroku - Stack Overflow
Heroku doesn't support webkit at the time, with other browsers, you can use this buildpack: ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@diervo The https://github.com/jontewks/puppeteer-heroku-buildpack is doing some magic, like installing dependencies. However, webkit requires a different set of dependencies to run, e.g. check out our github workflow.
My bet would be that there’s a need for a new
playwright-heroku-buildpack
that adds all the dependencies necessary for all three browsers.Also, can you check that there’s also
playwright-core/.local-webkit
andplaywright-core/.local-firefox
folders with binaries? Can you also try running binaries there? (for webkit, please runpw_run.sh --headless
)All of them seem to fail.