Comments (9)
In the meantime it appears that running node ./node_modules/playwright/install.js
before executing your tests will download the binaries if necessary
from playwright.
Thanks for joining us on the bleeding edge!
Did you run both npm install
and node test.ts
from within WSL? Installing from windows but running from within WSL, or vice versa, would probably cause this error.
Assuming your WSL is Ubuntu based, you probably need to get Chrome's dependencies. It looks like we are missing the list of what those dependencies actually are, but I'd try
sudo apt install \
gconf-service \
libasound2 \
libatk1.0-0 \
libatk-bridge2.0-0 \
libc6 \
libcairo2 \
libcups2 \
libdbus-1-3 \
libexpat1 \
libfontconfig1 \
libgcc1 \
libgconf-2-4 \
libgdk-pixbuf2.0-0 \
libglib2.0-0 \
libgtk-3-0 \
libnspr4 \
libpango-1.0-0 \
libpangocairo-1.0-0 \
libstdc++6 \
libx11-6 \
libx11-xcb1 \
libxcb1 \
libxcomposite1 \
libxcursor1 \
libxdamage1 \
libxext6 \
libxfixes3 \
libxi6 \
libxrandr2 \
libxrender1 \
libxss1 \
libxtst6 \
ca-certificates \
fonts-liberation \
libappindicator1 \
libnss3 \
lsb-release \
xdg-utils \
wget
You can also launch with the dumpio: true
option, to see if there is something helpful being logged by the browser itself.
from playwright.
@JoelEinbinder Thanks for your timely response!
I was able to track down the issue. The problem appears to be with Chromium's sandbox. I found some troubleshoot docs from Puppeteer that gave the hint.
I've been unable to get a Chrome sandbox on WSL, but if I disable sandbox (which isn't ideal) it does work:
const browser = await pw.chromium.launch({ args: ['--no-sandbox', '--disable-setuid-sandbox'] });
Edit: I should note that this only works for Chromium. Firefox continues to throw the cryptic UnhandledPromiseRejectionWarning: Error: Failed to launch browser!
.
I'm able to get a little more out of Webkit, it throws:
UnhandledPromiseRejectionWarning: Error: Failed to launch browser: Error: spawn /mnt/c/Users/joshs/repos/pw-test/node_modules/playwright-core/.local-webkit/linux-1106/pw_run.sh ENOENT
at ChildProcess.spawnedProcess.once.error (/mnt/c/Users/joshs/repos/pw-test/node_modules/playwright-core/lib/server/processLauncher.js:49:20)
at Object.onceWrapper (events.js:285:13)
at ChildProcess.emit (events.js:197:13)
at Process.ChildProcess._handle.onexit (internal/child_process.js:252:12)
at onErrorNT (internal/child_process.js:421:16)
at processTicksAndRejections (internal/process/next_tick.js:76:17)
...
from playwright.
To add more details, it seems to be a problem with Yarn. npm seems to reliably download the browser binaries every time.
from playwright.
@JoelEinbinder Those helped me over this hurdle but just wanted to point out that a preliminary
sudo apt-get update
may be needed
from playwright.
I get the same Error: Chromium revision is not downloaded. Run "npm install" at Chromium.launchBrowserApp (/home/travis/build/popperjs/popper-core/node_modules/playwright-core/lib/server/chromium.js:70:23)
on macOS and Travis, the only solution is to delete node_modules
and yarn
again.
from playwright.
Folding this into #581 and #1085
from playwright.
Folding into #1103
from playwright.
Caso ajude alguém, encontrei o apoio necessário em: https://askubuntu.com/questions/1204571/how-to-install-chromium-without-snap
from playwright.
Related Issues (20)
- [Docs]: Running ui mode docs incomplete HOT 1
- Using storageState in the general use config does not work - but works in the projects array HOT 1
- [Bug]: Exit code 0 when crashes with out of memory error HOT 3
- [Bug]: testIdAttribute via config does not take effect in `globalSetup` function HOT 1
- [Bug]: UI mode is showing tags as pill and as text HOT 2
- [Bug]: ADO Pipeline JUnit Report not showing attachments, however the logs show [[ATTACHMENT|filename]] HOT 3
- [Feature]: Ability to extend the trace information HOT 9
- [Feature]: Add tracing class in page like puppeteer HOT 3
- [Feature]: add page method start record HOT 1
- [Feature]: Add option to filter Locators by visibility HOT 1
- [Bug]: element.tagName.toUpperCase is not a function HOT 4
- [Bug]: WebKit page screenshots are missing alpha channel in Linux HOT 4
- Running playwright offline
- [Feature]: Playwright support on rocky linux HOT 5
- usage of test.slow()
- [Bug]: Can't unmount -> remount with @playwright/experimental-ct-react17 HOT 2
- [Bug]: UI seems to lock on Windows making tests time out HOT 5
- [Bug]: Reusing page between tests when running serially adds extra teardown time per test HOT 3
- [Bug]: Intermittent Undetermined Error [IP: 185.125.190.36 80] when running `npx playwright install --with-deps` on CI HOT 1
- Query regarding a piece of code HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from playwright.