"Cypress plugin has crashed click here to reload extension" when launching from non-native terminal
See original GitHub issueCurrent behavior:
Video of error: http://recordit.co/mezA4GC015
Desired behavior:
Cypress should execute normally regardless of where it is launched.
Steps to reproduce:
create-react-app cypress-test-js
cd cypress-test-js
npm i -D cypress
> Add 'cypress:open' script to package.json
npm run cypress:open
Click on `example.spec.js` as instructed
Luckily I have seen a similar issue before when I was using Protractor / Selenium and we had the age old case of it’s broke on my machine, but works on co-workers and couldn’t figure out why.
The key is where you run the npm run cypress:open
command.
If I run npm run cypress:open
from within VSCode using the PowerShell terminal or the cmd terminal it will fail.
However I open an actual PowerShell or CMD prompt and run npm run cypress:open
cypress seems to work fine.
I remember investigating this a bit ago, and we never understood root cause, but there are differences between the environment variables that might have effect.
For example the terminal in VS Code has these extra stuff like which the native terminals do not.
ELECTRON_NO_ATTACH_CONSOLE 1
FPS_BROWSER_APP_PROFILE_STRING Internet Explorer
FPS_BROWSER_USER_PROFILE_ST... Default
LANG en_US.UTF-8
PROMPT $P$G
TERM_PROGRAM vscode
TERM_PROGRAM_VERSION 1.23.1
VSCODE_CLI 1
VSCODE_CWD D:\repos
VSCODE_IPC_HOOK \\.\pipe\9d82e5aa2e1d47f4774f828c8afaf3b5-1.23.1-main-sock
VSCODE_NLS_CONFIG {"locale":"en-us","availableLanguages":{}}
VSCODE_NODE_CACHED_DATA_DIR... C:\Users\mattm\AppData\Roaming\Code\CachedData\d0182c3417d225529c6d5ad24b7572815d0de9ac
VSCODE_NODE_CACHED_DATA_DIR... C:\Users\mattm\AppData\Roaming\Code\CachedData\d0182c3417d225529c6d5ad24b7572815d0de9ac
VSCODE_NODE_CACHED_DATA_DIR... C:\Users\mattm\AppData\Roaming\Code\CachedData\d0182c3417d225529c6d5ad24b7572815d0de9ac
VSCODE_PID 11572
I don’t know if any of these are suspicious or why the addition of them would hurt, but I think this issue is an easy problem for new comers to get caught up on since many people use terminals integrated into their editor. Also, one of Cypress’s main talking points was that it is easier to get started than traditional/selenium based solutions. I assume it’s just oddities with Windows and ROI is low, but it might be an easy fix for someone who is familiar with this stuff.
Or if it is not easily fixed maybe at least the error can be detected so it tells people, you’re running from environment X which is not supported, please use Y.
Versions
Windows 10: 10.0.17134 Build 17134 Chrome: 66.0.3359.181 (Official Build) (64-bit) Cypress: 2.1.0
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (3 by maintainers)
Top GitHub Comments
This problem occurs when I run Cypress with admin. And it doesn’t repro if I run Cypress without admin.
Closing as resolved.
If you’re experiencing a bug similar to this in Cypress, please open a new issue with a fully reproducible example that we can run. There may be a specific edge case with the issue that we need more detail to fix.