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.

Cypress can't find Chrome after update to 3.3.0

See original GitHub issue

Current 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.

image

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

  1. Upgrade using npm i cypress --save-dev
  2. Open cypress
  3. 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:closed
  • Created 4 years ago
  • Comments:19 (7 by maintainers)

github_iconTop GitHub Comments

7reactions
flotwigcommented, Jul 2, 2019

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 your PATH. If you do echo $env:PATH, do you see C:\Windows\System32\Wbem? If not, add it:

setx PATH "$env:PATH;C:\Windows\System32\Wbem"

…and then restart VS code to pick up the new system-wide PATH. Check that echo $env:PATH shows the Wbem 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:

npm i -g cross-env
cross-env DEBUG=cypress:* npx cypress open
2reactions
flotwigcommented, May 20, 2019

Thanks for the bug report. Does this work for you in 3.2.0?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I get Cypress to detect my existing Chrome browser ...
After upgrading from Cypress 3.2.0 to 3.3.0, Cypress opens with only the Electron option for execution. I've tried completely uninstalling ...
Read more >
Changelog - Cypress Documentation
Fixed an issue with Angular Component Testing where urls within SASS/SCSS files were not being correctly resolved which could result in incomplete styling....
Read more >
cypress-io/cypress - Gitter
I'm new to Cypress.io. Please give me advice, I can't find a property to disable adding patch to a test file in the...
Read more >
Download Cypress For Linux - Super User
(?platform=win32&arch=ia32, available since Cypress 3.3.0); Linux 64-bit (?platform=linux); macOS 64-bit (?platform=darwin). See https://download.
Read more >
Contributing to Cypress - NotABug
In general, we want to publish our standalone npm packages continuously as new features are added. Therefore, any pull requests that only change...
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