Using cypress in a Ubuntu on Windows fails with an error:
It looks like this is your first time using Cypress: 3.7.0
✔ Verified Cypress! /home/johnsmith/.cache/Cypress/3.7.0/Cypress
Opening Cypress...
[23948:1209/141647.044586:FATAL:gpu_data_manager_impl_private.cc(892)] The display compositor is frequently crashing. Goodbye.
Unhandled rejection Error: The Test Runner unexpectedly exited via a close event with signal SIGILL
Please search Cypress documentation for possible solutions:
https://on.cypress.io
Check if there is a GitHub issue describing this crash:
https://github.com/cypress-io/cypress/issues
Consider opening a new issue.
----------
Platform: linux (Ubuntu Linux - 18.04)
Cypress Version: 3.7.0
at /mnt/c/Users/johnsmith/Desktop/Development/dermalog-document/node_modules/cypress/lib/errors.js:193:15
at tryCatcher (/mnt/c/Users/johnsmith/Desktop/Development/dermalog-document/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/mnt/c/Users/johnsmith/Desktop/Development/dermalog-document/node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (/mnt/c/Users/johnsmith/Desktop/Development/dermalog-document/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/mnt/c/Users/johnsmith/Desktop/Development/dermalog-document/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/mnt/c/Users/johnsmith/Desktop/Development/dermalog-document/node_modules/bluebird/js/release/promise.js:693:18)
at Promise._fulfill (/mnt/c/Users/johnsmith/Desktop/Development/dermalog-document/node_modules/bluebird/js/release/promise.js:638:18)
at Promise._resolveCallback (/mnt/c/Users/johnsmith/Desktop/Development/dermalog-document/node_modules/bluebird/js/release/promise.js:432:57)
at Promise._settlePromiseFromHandler (/mnt/c/Users/johnsmith/Desktop/Development/dermalog-document/node_modules/bluebird/js/release/promise.js:524:17)
at Promise._settlePromise (/mnt/c/Users/johnsmith/Desktop/Development/dermalog-document/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/mnt/c/Users/johnsmith/Desktop/Development/dermalog-document/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/mnt/c/Users/johnsmith/Desktop/Development/dermalog-document/node_modules/bluebird/js/release/promise.js:693:18)
at Promise._fulfill (/mnt/c/Users/johnsmith/Desktop/Development/dermalog-document/node_modules/bluebird/js/release/promise.js:638:18)
at Promise._resolveCallback (/mnt/c/Users/johnsmith/Desktop/Development/dermalog-document/node_modules/bluebird/js/release/promise.js:432:57)
at Promise._settlePromiseFromHandler (/mnt/c/Users/johnsmith/Desktop/Development/dermalog-document/node_modules/bluebird/js/release/promise.js:524:17)
at Promise._settlePromise (/mnt/c/Users/johnsmith/Desktop/Development/dermalog-document/node_modules/bluebird/js/release/promise.js:569:18)
Can someone help?
Running into the same issue.
--browser
flag or any other configuration?There seems to be some indication that this may be solved by passing --disable-features=VizDisplayCompositor
to Chrome (mentioned in this puppeteer issue https://github.com/puppeteer/puppeteer/issues/3774#issuecomment-480210268)
~Can you try setting this flag below in your plugins/index.js
file and comment if this resolved the issue?~
Edit: remove incorrect way to set Electron flag
It still fails for me.
$ cypress run
[21091:0116/074706.628978:FATAL:gpu_data_manager_impl_private.cc(986)] The display compositor is frequently crashing. Goodbye.
The Test Runner unexpectedly exited via a exit event with signal SIGILL
I did run it on WSL2 on my personal machine and it worked (even without this plugin code), but my work machine is still on WSL1 until the required Windows update is out of beta.
Sorry, I did not document this correctly. This error is coming when launching through Electron, so the instructions for sending this app switch to Electron are here: https://on.cypress.io/browser-launch-api#Modify-Electron-app-switches
Can you set the following environment variable on your system, run cypress run
again and comment on the result?
set ELECTRON_EXTRA_LAUNCH_ARGS=--disable-features=VizDisplayCompositor
export ELECTRON_EXTRA_LAUNCH_ARGS=--disable-features=VizDisplayCompositor
I am having the same problem on WSL1 with cypress 3.8.2. I tried to use the environment variable workaround but it did not help.
I noticed that this issue is also documented at https://github.com/cypress-io/cypress/issues/5526 where they suggested potentially implementing a slightly different environment variable, so I tried several variants (listed below). None worked.
#Environment variables that don't work
export ELECTRON_EXTRA_LAUNCH_ARGS=--disable-features=VizDisplayCompositor
export EXTRA_ELECTRON_LAUNCH_ARGS=--disable-features=VizDisplayCompositor
export EXTRA_ELECTRON_ARGS=--disable-features=VizDisplayCompositor
export CYPRESS_ELECTRON_EXTRA_LAUNCH_ARGS=--disable-features=VizDisplayCompositor
export CYPRESS_EXTRA_ELECTRON_LAUNCH_ARGS=--disable-features=VizDisplayCompositor
export CYPRESS_EXTRA_ELECTRON_ARGS=--disable-features=VizDisplayCompositor
@jennifer-shehane are you sure that environment variable is actually used by cypress?
I will also mention that in the issue I linked above, another workaround was suggested that involves patching the file node_modules/cypress/lib/exec/spawn.js
. Find the line that contains the text child = cp.spawn
and add a line above it with the text electronArgs.push('--disable-features=VizDisplayCompositor');
When you finish, it should look like this (without the comments):
electronArgs.push('--disable-features=VizDisplayCompositor'); // add this line
var child = cp.spawn(executable, electronArgs, stdioOptions); // find this line
Several people mentioned this worked for them with older Cypress versions, but I have not been able to get it to work with Cypress 3.8.2.
EDIT:
I was able to avoid the "compositor" issue by changing the above to:
electronArgs.unshift('--disable-features=VizDisplayCompositor'); // add this line
var child = cp.spawn(executable, electronArgs, stdioOptions); // find this line
Apparently the switch has to be added at the beginning of the argument array because any switches at the end come after "--" which signals to electron that those are application switches, not electron switches. (This appears to be a recent addition, because older versions didn't have a problem with the first version of the code.)
Unfortunately cypress still crashed after I added the above patch, but this time it exited with a SIGSEGV
soon after startup. It got to the point where it displays "Running:
I'm also experiencing the same issues listed by @richworx and tried everything suggested. I've defaulted back to not using WSL1 (can't update to WSL2 at the moment) for now just to get around the issue.
Any updates on this? I am having the same issue.
Recently I've been struggling with this issue with WSL 1, and I discovered a workaround.
Here the tests I tried (WSL 1, not 2):
So, if you run everything with the standard windows command prompt (cmd.exe), and not with WSL, everything works fine, but you will also have to run the npm install with the command prompt, because I think that running npm install with WSL downloads something that's specific for Linux and not for Windows.
Hope this helps someone!
In addition to the above, I was able to run cypress from wsl
by doing
> powershell.exe npx cypress open
Still happens for me in Cypress 4.5.0, Win 10, WSL Ubuntu 16.04.
I was able to successfully install and run this on wsl and cypress latest, I ran cypress open
and got:
Verifying Cypress can run /home/justin/.cache/Cypress/4.5.0/Cypress [started]
So that's good news, but of course nothing is popping up, how would it I guess. But I'm wondering if there is a way for cypress to just print out a port so I can run it in a browser instead of a custom tool?
You can do cypress run
for CLI, or if you want to do cypress open
,
you'll need to install: http://www.straightrunning.com/XmingNotes/
The browser spawned will be running in the linux subsystem.
On Fri, May 8, 2020 at 9:40 PM Justin Chase notifications@github.com
wrote:
I was able to successfully install and run this on wsl and cypress latest,
I ran cypress open and got:Verifying Cypress can run /home/justin/.cache/Cypress/4.5.0/Cypress [started]
So that's good news, but of course nothing is popping up, how would it I
guess. But I'm wondering if there is a way for cypress to just print out a
port so I can run it in a browser instead of a custom tool?—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/cypress-io/cypress/issues/5918#issuecomment-626084962,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAIN7Y2IHHG3OGNOT6Z34SDRQSYAVANCNFSM4JYJFCGQ
.
In addition to the above, I was able to run cypress from
wsl
by doing
> powershell.exe npx cypress open
Not the way it should work but the easiest way it works. Thanks a lot! That should be written down in the troubleshooting as a workaround.
Edit: This solution works only on WSL1 well because it's only working inside the windows filesystem where WSL2 is extremely slow at the moment.
For WSL2 I've found this guide in an other issue: https://nickymeuleman.netlify.app/blog/gui-on-wsl2-cypress
Fwiw, while using WSL 1, I saw all the issues described by https://github.com/cypress-io/cypress/issues/5918#issuecomment-579414224 -- The display compositor is frequently crashing
, then exiting with SIGSEGV
after adding that Electron flag in spawn.js
. Upgraded my distro to WSL 2 and Cypress works out of the box now.
Just wanted to make sure everyone was aware of this comment showing how to get setup with WSL. https://github.com/cypress-io/cypress/issues/444#issuecomment-501744722 I'm not sure if this is completely up to date.
Most helpful comment
Any updates on this? I am having the same issue.