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)
- [Bug]: Playwright tests cannot read indexedDb stores when accessing a browser extension with `chrome-extension` protocol HOT 11
- [Feature]: ability to remove function exposed through exposeBinding HOT 1
- [Bug]: addLocatorHandler blocks HOT 2
- [Feature]: disable the "allow pasting" warning in chrome devtools HOT 4
- [Bug]: click animations blocks the click action HOT 2
- [Bug]: Webkit (Safari desktop and mobile) fail random HOT 4
- Looking for good websocket test example
- [Bug]: Mismatched test id between onTestEnd custom reporter hook and generated HTML test report HOT 5
- [Bug]: Intermittent error "TypeError : xyz is not a function" "TypeError : Cannot read properties of undefined" HOT 3
- [Feature]: Ability to add custom annotations to trace files HOT 5
- [Question] Playwright server on Firefox can't be initialised HOT 2
- Unable to Enable Sandbox for Chromium on Ubuntu 22.04 HOT 1
- [Bug]: test files that start with "generated-" are not picked up by "testMatch" HOT 3
- [Feature]: Import test results into UI Mode HOT 2
- How can i codegen the hover event on the element in ui mode when i recorder new test
- [Docs]: Playwright Troubleshooting HOT 1
- [Feature]: codegen for hover the same as codegen for assert visibility
- [Feature] Parallelism using Library NodeJs HOT 1
- [Feature]: SnapshotTab UI polish HOT 1
- [Feature]: why not just ignore the event to make our recording continued 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.