Cypress can't find Chrome after update to 3.3.0
See original GitHub issueCurrent behavior:
After upgrading to 3.3.0, Cypress is unable to use the existing Chrome installation it used prior. In addition, now even after uninstalling/reinstalling several times both Cypress and Chrome, I can’t get Chrome to be available anymore.
When trying to clear the app data from the GUI:
{ Error: spawn cmd ENOENT
at _errnoException (util.js:1024:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
at onErrorNT (internal/child_process.js:372:16)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
code: 'ENOENT',
errno: 'ENOENT',
syscall: 'spawn cmd',
path: 'cmd',
spawnargs:
[ '/c',
'start',
'""',
'/wait',
'C:\\Users\\James\\AppData\\Roaming\\Cypress\\cy\\production' ] }
Error: spawn cmd ENOENT
at _errnoException (util.js:1024:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
at onErrorNT (internal/child_process.js:372:16)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
DEBUG logs: https://pastebin.com/u6kLMHZ0 ^this is the piece that worries me, since the logs seem to indicate that Cypress found Chrome, but doesn’t have it available for execution.
additional info: https://stackoverflow.com/questions/56224598/how-do-i-get-cypress-to-detect-my-existing-chrome-browser-after-upgrade
Desired behavior:
Cypress is able to use the existing Chrome application for execution, and is available in the dropdown menu in the GUI
Steps to reproduce: (app code and test code)
Windows 10 Cypress 3.2.0 Chrome installed in the correct location
- Upgrade using npm i cypress --save-dev
- Open cypress
- Look for Chrome to be now missing in the dropdown
Versions
Cypress 3.2.0 Cypress 3.3.0 Windows 10 Chrome 74
Issue Analytics
- State:
- Created 4 years ago
- Comments:19 (7 by maintainers)
Top GitHub Comments
Hmm, looks similar to #3891.
Cypress uses WMIC.exe to look up info about a potential browser. If it can’t be launched, browser detection is broken.
It looks like
WMIC.exe
isn’t in yourPATH
. If you doecho $env:PATH
, do you seeC:\Windows\System32\Wbem
? If not, add it:…and then restart VS code to pick up the new system-wide PATH. Check that
echo $env:PATH
shows theWbem
directory at the end, and then re-launch Cypress. Browser detection should work.Environment variables on Windows are weird, you can obtain debug logs by using the
cross-env
package:Thanks for the bug report. Does this work for you in 3.2.0?