Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WSL | Electron 5.0 is producing gpu_data_manager_impl_private display compositor crashing #5526

Closed
adomyaty55foundry opened this issue Oct 29, 2019 · 11 comments

Comments

@adomyaty55foundry
Copy link

adomyaty55foundry commented Oct 29, 2019

Current behavior:

WSL | Electron 5.0 is producing gpu_data_manager_impl_private display compositor crashing. Not able to do a cypress run or open due to this blocking issue. This was never a problem till I just upgraded to Cypress 3.5

Desired behavior:

Works okay and normal like how it did before the upgrade to 3.4

Steps to reproduce: (app code and test code)

Setup: WSL (Ubuntu 18.04, Win10, Cypress 3.4)

  1. Upgrade to Cypress 3.5
  2. After upgrade run the same working command that worked for me before: DEBUG=cypress* ./node_modules/.bin/cypress openconfigFile=dev
  3. I get the following error
    2019-10-29_1530_001

I'm guessing this is related to Electron 5.0 upgrade that is part of 3.5 upgrade

Versions

Setup: WSL (Ubuntu 18.04, Win10, Cypress 3.4)

@flotwig
Copy link
Contributor

flotwig commented Oct 29, 2019

Looks like some users have fixed it by passing a flag to Electron: puppeteer/puppeteer#3774 (comment)

@adomyaty55foundry You can try patching your cypress to see if this fixes it. Open ./node_modules/cypress/lib/exec/spawn.js, and right above this line:

const child = cp.spawn(executable, electronArgs, stdioOptions)

Add this line:

electronArgs.push('--disable-features=VizDisplayCompositor')

@adomyaty55foundry
Copy link
Author

adomyaty55foundry commented Oct 29, 2019

@flotwig Awesome it did progress but interestingly the const child is var child in my code... not sure why we have different way of calling this variable for Cypress. In any case I added the line here:

electronArgs.push("--disable-features=VizDisplayCompositor")
above
var child = cp.spawn(executable, electronArgs, stdioOptions)

I noticed a new error
2019-10-29_1608

but it didnt stop it continued past that error and then Cypress pop'd but now getting this:

2019-10-29_1609

@adomyaty55foundry
Copy link
Author

@flotwig Reinstalled all my browsers still no budge. Atleast we are closer

Here's the current issue now after putting that patch you mentioned manually:

Clicking refresh reproduces/recreates the issue
2019-10-29_1629

@adomyaty55foundry
Copy link
Author

adomyaty55foundry commented Oct 30, 2019

@flotwig I got it to work... not sure what made it work but the only thing I did is I ran 'sudo chown -R $USER ' on the /test folder that houses Cypress and it ran fine.

Is this patch going to be merged in in a future patch assuming in 5.0.1 or so? I hate for me to upgrade in the future only to break again and me applying the same suggested patch again manually

@jennifer-shehane
Copy link
Member

@flotwig What actions need to be taken for Cypress here?

@cypress-bot cypress-bot bot added the stage: investigating Someone from Cypress is looking into this label Oct 31, 2019
@adomyaty55foundry
Copy link
Author

adomyaty55foundry commented Nov 2, 2019

New little info: Updated to 3.6 same situation, I had to manually patch my WSL as mentioned above by @flotwig which made it work after :)

I think we should look into giving this as passable flag from CLI maybe to Force OFF the GPU HW accelerator. I can tell you that the trend of Windows users using WSL to basically run a Linux Dev env. is growing sizable amount. WSL possiblly can't handle the GPU acceleration maybe WSL 2 can but that's still ways off till release

@adomyaty55foundry
Copy link
Author

@flotwig @jennifer-shehane Will this get patched? I updated to 3.6.1 and still have to manually patch this up with electronArgs.push("--disable-features=VizDisplayCompositor") ? It seems like more harm is done when we force hardware acceleration especially for WSL users

@flotwig
Copy link
Contributor

flotwig commented Nov 13, 2019

@adomyaty55foundry I'm not sure we want to enable this feature for ALL users, since it only seems to affect WSL. I think we could add an optional environment variable, like CYPRESS_EXTRA_ELECTRON_ARGS, that could be used to work around this (and other) issues.

CYPRESS_EXTRA_ELECTRON_ARGS="--disable-features=VizDisplayCompositor" would be the workaround, if we added that.

This is not currently prioritized as we don't know of too many people using WSL, but you are welcome to open a pull request with the patch and we will review it and get it in as soon as possible.

@adomyaty55foundry
Copy link
Author

adomyaty55foundry commented Nov 20, 2019

@flotwig I'm happy to say WSL2 works PERFECTLY with hardware accel. Go microsoft! I took the risk and updated my system to use WSL2 instead

This issue is solved by using WSL2 and by the way it is fast and amazingly less buggy.

@adomyaty55foundry
Copy link
Author

@jennifer-shehane I would close this issue but also make sure this info in this ticket is something you guys can be aware or even better document in cypress docs that Cypress works with WSL2 due to hardware limitations with WSL1

@jennifer-shehane
Copy link
Member

Closing - see this issue for WSL1 issue #5918

@jennifer-shehane jennifer-shehane removed the stage: investigating Someone from Cypress is looking into this label Jul 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants