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.

[BUG] Playwright requires manual install of browsers

See original GitHub issue

Context:

  • Playwright Version: 0.11.1
  • Operating System: Mac

Code Snippet

const { chromium } = require('playwright'); 

chromium.launch().then((browser: any) => {
      console.log("launched")
})
  .catch((e: any) => console.log(e))

Describe the bug After installing playwright for the first time, I tried to run it and got the error Error: Chromium revision is not downloaded. Run “npm install”

I am in a yarn exclusive environment so I am unable to run npm install. However, yarn install or yarn add do not resolve the issue.

Only way to solve it was node node_modules/playwright/install.js

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
Xiphecommented, Feb 25, 2020

Just to be clear, by latest yarn you mean 1.22, not 2.0 aka berry?

Yes that was misleading. I’m on yarn v1.22.0

Quickfix:

Copy the .local-* folders somewhere else and link them after each install.

  ln -s ~/.local-chromium ./node_modules/playwright-core/.local-chromium
  ln -s ~/.local-firefox ./node_modules/playwright-core/.local-firefox
  ln -s ~/.local-webkit ./node_modules/playwright-core/.local-webkit
0reactions
JoelEinbindercommented, Feb 25, 2020

After I --force installed, I installed another package using latest yarn. That caused the downloaded browsers to disappear and I needed to --force-install again.

Interesting! That is indeed a major issue. I’ll try to repro tomorrow.

Just to be clear, by latest yarn you mean 1.22, not 2.0 aka berry?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How To Run End-to-End Tests Using Playwright and Docker
Playwright has features like auto-support interaction with browsers, so you don't have to install the web drivers manually, and it supports ...
Read more >
Browser Library
Library installation requires both Python and NodeJs ... Install browser binaries separetly according Playwright instructions. Example:
Read more >
How to test web applications with Playwright and C# .NET
Learn how to test web applications by develop end-to-end tests using Playwright and C# .NET.
Read more >
Installation | Playwright
Playwright downloads Chromium, Firefox and WebKit browsers by default. To install a specific browser, pass it as an argument during installation. $ pip...
Read more >
Browser.Playwright — RPA Framework documentation
The Playwright based browser library uses bundled browser executables as part of its package to avoid browser version conflicts and to enable ...
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