question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Running Playwright in Heroku

See original GitHub issue

Today 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:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
aslushnikovcommented, Jan 29, 2020

@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.

I ssh in the dyno and all dependencies and paths seems to be there (playwright-core/.local-chromium/linux-733125/chrome-linux)

Also, can you check that there’s also playwright-core/.local-webkit and playwright-core/.local-firefox folders with binaries? Can you also try running binaries there? (for webkit, please run pw_run.sh --headless)

1reaction
diervocommented, Jan 24, 2020

All of them seem to fail.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found