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

Windows 10_Getting an error "GPU process launch failed: error_code=18" while trying to open cypress test runner. #19924

Closed
Praveentrp opened this issue Jan 26, 2022 · 21 comments
Labels
stale no activity on this issue for a long period

Comments

@Praveentrp
Copy link

Current behavior

Console log:
`Note: You have set the environment variable:

CYPRESS_RUN_BINARY=C:\Cypress\9.3.1\Cypress\Cypress.exe

This overrides the default Cypress binary path used.

Found binary version 9.1.0 installed in C:\Cypress\9.3.1\Cypress`

!! Warning: Binary version 9.1.0 does not match the expected package version 9.3.1

These versions may not work properly together.

It looks like this is your first time using Cypress: 9.1.0

Verified Cypress! C:\Cypress\9.3.1\Cypress

Opening Cypress...

[22552:0126/205620.709:ERROR:gpu_process_host.cc(951)] GPU process launch failed: error_code=18
[22552:0126/205620.725:ERROR:gpu_process_host.cc(951)] GPU process launch failed: error_code=18
[22552:0126/205620.742:ERROR:gpu_process_host.cc(951)] GPU process launch failed: error_code=18
[22552:0126/205620.758:ERROR:gpu_process_host.cc(951)] GPU process launch failed: error_code=18
[22552:0126/205620.772:ERROR:gpu_process_host.cc(951)] GPU process launch failed: error_code=18
[22552:0126/205620.799:ERROR:gpu_process_host.cc(951)] GPU process launch failed: error_code=18
[22552:0126/205620.712:ERROR:gpu_process_host.cc(951)] GPU process launch failed: error_code=18
[22552:0126/205620.788:ERROR:gpu_process_host.cc(951)] GPU process launch failed: error_code=18
[22552:0126/205620.793:ERROR:gpu_process_host.cc(951)] GPU process launch failed: error_code=18
[22552:0126/205628.793:FATAL:gpu_data_manager_impl_private.cc(417)] GPU process isn't usable. Goodbye.

Desired behavior

Cypress test runner should be successfully open.

Test code to reproduce

  1. To install the cypress latest version using the below command. (As GitHub has been blocked on-premise, we are using the below command for the installation)
    CYPRESS_INSTALL_BINARY='C:/CypressInstallables/cypress-win-9.1.0.zip' CYPRESS_CACHE_FOLDER='C:/Cypress' npm i cypress --sev-dev

  2. Cypress 9.3.1 got successfully installed.

  3. Environment variable has been set in the System variables.
    CYPRESS_RUN_BINARY=C:\Cypress\9.3.1\Cypress\Cypress.exe

  4. npx cypress open

Cypress Version

9.3.1

Other

No response

@Praveentrp
Copy link
Author

Hi @jennifer-shehane - Could you please look into the issue.

@Praveentrp Praveentrp changed the title Windows 10_Getting an error "GPU process launch failed: error_code=18" while opening cypress test runner. Windows 10_Getting an error "GPU process launch failed: error_code=18" while trying to open cypress test runner. Jan 26, 2022
@tbiethman
Copy link
Contributor

Maybe related: electron/electron#32074

@tbiethman tbiethman added the stage: needs investigating Someone from Cypress needs to look at this label Jan 26, 2022
@Praveentrp
Copy link
Author

Praveentrp commented Jan 29, 2022

Hi @tbiethman - Thanks for looking into it. The impacted number of users is pretty high on respective to this issue in Windows 10 machine. We are currently blocked. Kindly look into this issue as a priority and provide a resolution on the same.

@flotwig
Copy link
Contributor

flotwig commented Jan 31, 2022

@Praveentrp Can you try launching the app with the environment variable ELECTRON_EXTRA_LAUNCH_ARGS=--disable-gpu-sandbox?

@Praveentrp
Copy link
Author

Praveentrp commented Jan 31, 2022

Thanks, @flotwig for your reply.

Cypress test runner is successfully getting launched after adding this environment variable "ELECTRON_EXTRA_LAUNCH_ARGS=--disable-gpu-sandbox" and now I am not getting this error "GPU process launch failed:".

But I am getting the below error while trying to run the customized execution command.

`Still waiting to connect to chrome, retrying in 1 second (attempt 60/62)
Still waiting to connect to chrome, retrying in 1 second (attempt 61/62)
Still waiting to connect to chrome, retrying in 1 second (attempt 62/62)
Cypress failed to make a connection to the Chrome DevTools Protocol after retrying for 50 seconds.

This usually indicates there was a problem opening the chrome browser.`

Could you please help us to resolve this issue as well?

FYI @jennifer-shehane @tbiethman

@narayananpalani
Copy link

As @Praveentrp mentioned, it is also affecting Win10 of both Microsoft Surface Laptops and HP EliteBooks across cypress user community.

@FlorianeTy
Copy link

FlorianeTy commented Mar 9, 2022

Hi, we have the same problem in our company and adding environment variable doesn't correcting the problem.
We're working on HP Elitebook and Windows 10, about ten employees are impacted in my department.

image

Could you please investigate the issue ?

@QuentinDEME97
Copy link

It looks like there's something with --no-sandbox argument whenever this kind of error occurs...

@nunorbatista
Copy link

any progress? I'm seeing the same error

@cezarsmpio
Copy link

Same here after resolving X display issues.

@cypress-bot cypress-bot bot added stage: backlog and removed stage: needs investigating Someone from Cypress needs to look at this labels Apr 29, 2022
@Brunight
Copy link

Brunight commented May 9, 2022

Same here, running in a Ubuntu WSL 2 instance inside Windows 11

@jakohans76
Copy link

I have the same issue on my Win10. I can open Cypress with v8.5.0 but it crashes with above error message since v8.6.0.

@SaajidNawwar
Copy link

I'm having the same issue. I get 'GPU process exited unexpectedly: exit_code=34'

@Praveentrp
Copy link
Author

Solution:

  1. Try opening your IDE/git bash in non-admin mode.
  2. Run the command "./node_modules./bin/cypress open"
  3. Click on the feature file which you want to execute.

This has resolved my issue. Hope it will resolve for you guys as well.

@SaajidNawwar
Copy link

@Praveentrp I tried executing it without admin mode yet I got the same error.

@Pradyyy-rgb
Copy link

Hello everyone, I have been facing the exact same issue as mentioned above,

Spec: Laptop:Microsoft surface and with every browser it has shown different kind of error,
Cypress 9.5.3 installed not from web
Env variable: Name: ELECTRON_EXTRA_LAUNCH_ARGS, Value: --disable-gpu-sandbox npx cypress run
Name: NVM_HOME, Value: c:/users/username/AppData/Roaming/nvm
System variable: HTTP_Proxy, value: 'proxy set' with port 8080

When I open the runner with ./node_modules./bin/cypress open on an admin git bash it open the runner successfully
Then I select my browser as chrome
And I click on the action.spec.js

Actual behavior:
image

image

same error when running with Edge
Then opened with Electron

error:
image

When I run it with npx cypress open from the admin terminal , It throws
Uploading image.png…

I'm not allowed to run it as non admin

@cypress-app-bot
Copy link
Collaborator

This issue has not had any activity in 180 days. Cypress evolves quickly and the reported behavior should be tested on the latest version of Cypress to verify the behavior is still occurring. It will be closed in 14 days if no updates are provided.

@cypress-app-bot cypress-app-bot added the stale no activity on this issue for a long period label May 22, 2023
@JonathanFL
Copy link

JonathanFL commented Jun 2, 2023

When I installed Cypress globally on my PC and opened PowerShell (not as admin) in the project directory and ran cypress open from there - then it worked. Hope it also works for others :)

@nagash77
Copy link
Contributor

nagash77 commented Jun 2, 2023

This issue has gone stale and we do not have a way to reproduce this specific behavior at this point. I am going to close this issue for the time being and if a reproducible example or new information comes to light please comment back here and we will see if we can make further progress.

@nagash77 nagash77 closed this as not planned Won't fix, can't repro, duplicate, stale Jun 2, 2023
@pebcakerror
Copy link

just tried cypress for the first time today.

Installed via npm install cypress --save-dev and was getting the GPU process launch failed.

I tried via windows terminal, non-admin powershell, admin powershell, vs code git gui. all had the same error.

When installed as a global npm install -g cypress then running cypress open it was able to run.

However, n0ow there is a new error from

Circular symlink detected: "C:\Users\me\AppData\Local\Application Data" points to "C:\Users\me\AppData\Local"
Error: Circular symlink detected: "C:\Users\me\AppData\Local\Application Data" points to "C:\Users\me\AppData\Local"
    at E._getEntryType (<embedded>:4141:7225)
    at async E._read (<embedded>:4141:5965)

Node 18.17.1 installed via nvm windows

@MikeMcC399
Copy link
Contributor

@pebcakerror

Can you confirm that you are getting exactly the error message
"GPU process launch failed: error_code=18"
including the error code 18?

Have you checked if there is an updated graphics driver available for your system?

Which version of Windows are you running?
Are you running in a virtual environment, or directly in Windows?
Are you running on a mapped drive or Microsoft OneDrive?

I tried installing Cypress globally, like you, on Windows 11, and I did not get any symlink error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale no activity on this issue for a long period
Projects
None yet
Development

No branches or pull requests