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)

Most upvoted comments

Any updates on this? I am having the same issue.

In addition to the above, I was able to run cypress from wsl by doing > powershell.exe npx cypress open

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.

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: <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-579414224The 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.

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 .

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):

  • npm install with WSL & cypress open with WSL --> ERROR
  • npm install with WSL & cypress open with cmd.exe --> ERROR
  • npm install with cmd.exe & cypress open with cmd.exe --> WORKING

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!