Error running web-test-runner from WSL
See original GitHub issueHi,
I’m getting the following error when running web-test-runner src/**/*.spec.js
in WSL
Error: Could not automatically find any installation of Chrome. If it is installed, use the “installationPath” option to set it manually. Use @web/test-runner-puppeteer or @web/test-runner-playwright for a bundled browser.
I have CHROME_PATH as follows:
CHROME_PATH=“/c/Program\ Files\ \(x86\)/Google/Chrome/Application/chrome.exe”
I’m able to run chrome from WSL command line with the variable above.
Any thoughts ?
Thanks,
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Troubleshooting Windows Subsystem for Linux | Microsoft Learn
Provides detailed information about common errors and issues people run into while running Linux on the Windows Subsystem for Linux.
Read more >Test Runner: CLI and Configuration - Modern Web
When running tests regularly, the tests from regular config and the groups will be run. You can run only the tests of a...
Read more >Web Component Automated Testing - Auro Design System
Components created using the WC-Generator will be configured with testing tools based on open-wc recommendations and modern web test runner . The tests...
Read more >Error when running airflow webserver on WSL Ubuntu
I fixed the issue by updating WSL from 1 to WSL 2, removing Ubuntu and installing it again from Windows App Store and...
Read more >@web/test-runner - npm
Start using @web/test-runner in your project by running `npm i @web/test-runner`. There are 21 other projects in the npm registry using ...
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
For future reference, I ran into a similar issue where chrome launcher was trying to use my Windows Chrome installation, not my WSL Chrome installation. This was throwing the below error.
The solution was to set an environment variable that points to my WSL installation.
This can also be set in the launch options.
@dmondev sorry this issue was sitting here for a while. We delegate the logic for finding the installation to chrome-launcher. It runs inside node, are you sure that environment variable is available inside the unix subsystem? I removed one extra layer of abstraction on our side in https://github.com/modernweb-dev/web/pull/1146, and improved the error message. Perhaps you could try again?
@tvvignesh looks like it’s complaining about the chrome version, do you have an older version?