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 plugin has crashed click here to reload extension" when launching from non-native terminal

See original GitHub issue

Current behavior:

image

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:closed
  • Created 5 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

6reactions
AndyTian-Devopscommented, Jul 9, 2019

This problem occurs when I run Cypress with admin. And it doesn’t repro if I run Cypress without admin.

0reactions
jennifer-shehanecommented, Jun 29, 2020

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting | Cypress Documentation
Cypress maintains some local application data in order to save user preferences and more quickly start up. Sometimes this data can become corrupted....
Read more >
Cypress tests failing because Chrome Renderer is crashing in ...
We were able to fix this by disabling Chrome's usage of /dev/shm completely, by adding this to our plugins/index.js -file. From Cypress ...
Read more >
How to load chrome extension in cypress.io | by Knoldus Inc.
As we know cypress is a node module so to handle chrome extension we need to add an npm plugin by using the...
Read more >
tgB - River Thames Conditions - Environment Agency - GOV.UK
I have pikachu kitty, Doors open day aberdeen 2014, Awari audio lyrics. Portable diesel hydraulic power pack, Top sellers on ebay, Rolinga significa, ......
Read more >
PyCharm 2019.2 Release Notes | Knowledge Base
No subsystem Bug PY‑36452 Code Insight Feature PY‑33886 Feature PY‑35512 Feature PY‑36009
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