cypress: wslbridge (Ubuntu on Windows) The display compositor is frequently crashing.
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?
About this issue
- Original URL
- State: open
- Created 5 years ago
- Reactions: 33
- Comments: 15 (3 by maintainers)
Any updates on this? I am having the same issue.
In addition to the above, I was able to run cypress from
wslby doing> powershell.exe npx cypress openIt still fails for me.
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.
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.
@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 textchild = cp.spawnand add a line above it with the textelectronArgs.push('--disable-features=VizDisplayCompositor');When you finish, it should look like this (without the comments):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:
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
SIGSEGVsoon after startup. It got to the point where it displays “Running: <SPECFILE>”. But there were no “compositor” issues at least.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 withSIGSEGVafter adding that Electron flag inspawn.js. Upgraded my distro to WSL 2 and Cypress works out of the box now.You can do
cypress runfor CLI, or if you want to docypress 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:
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!