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

Cypress test runner hangs immediately on running cypress open #6378

Closed
jenkshields opened this issue Feb 8, 2020 · 14 comments
Closed

Cypress test runner hangs immediately on running cypress open #6378

jenkshields opened this issue Feb 8, 2020 · 14 comments
Labels
type: duplicate This issue or pull request already exists

Comments

@jenkshields
Copy link

Current behavior:

When running yarn run cypress open, the Cypress Test Runner opens but immediately hangs. There is no output in the terminal, unless I force quit Cypress, when it logs The Test Runner unexpectedly exited via a exit event with signal SIGKILL (which is to be expected).

Manually opening the globally installed app works fine.

Note! I ran into #6377 when installing, and worked around by installing rjxs and rxjs-compat - unsure if that could be related.

Desired behavior:

Cypress Test Runner should open normally.

Test code to reproduce

No tests are written - I've tried this both in a project without a cypress folder, and in one which has the folder filled with test examples with the same result.

Versions

Cypress 4.0.1
Mac OS Catalina 10.15.3 Beta (19D62e)
Firefox Nightly 74.0a1
yarn v2

@thenakedthunder
Copy link

thenakedthunder commented Feb 14, 2020

Hi, same happened to me. For me the problem arouse when I changed my build routine from 'npm run build' to 'yarn build'. I kinda think the problem is the location of the build output, it changed, or the cypress files cannot be found etc. It does not work with 'npx cypress open' either.

F**k these package managers man, I sometimes feel I spend more time figuring out what went wrong again with my packages than with coding... So much of making your life easier.

UPDATE: I had no trouble at install, and there is no log message at force quitting for me.

@ghost
Copy link

ghost commented Feb 18, 2020

I would like to update this issue with some details.

Cypress package version: 4.0.2
Cypress binary version: 4.0.2
OS: GNU/Linux 5.3.0-28-generic x86_64

Firstly, Cypress hangs only on yarn cypress open or yarn cypress version
After a couple of minutes, the Cypress window (when running yarn cypress open) is starting but it doesn't have any content, just grey background.
I've tried to run cypress with the command
$ DEBUG=cypress:* yarn cypress open

Full debug output is here https://pastebin.com/BD98wtPE
Here's some errors that are shown even when the debug variable is unset.

[23738:0218/135347.475650:INFO:CONSOLE(11588)] "failed to compile wasm module: RangeError: WebAssembly.Compile is disallowed on the main thread, if the buffer size is larger than 4KB. Use WebAssembly.compile, or compile on a worker thread.", source: /home/dasloboda/projects/cypressYarn2/.pnp.js (11588)
[23738:0218/135347.475717:INFO:CONSOLE(11597)] "Uncaught RangeError: WebAssembly.Compile is disallowed on the main thread, if the buffer size is larger than 4KB. Use WebAssembly.compile, or compile on a worker thread.", source: /home/dasloboda/projects/cypressYarn2/.pnp.js (11597)

Also, when I try to click electron menus I get something like this (links do work, however)

[23738:0218/135639.489121:WARNING:x11_util.cc(1399)] X error received: serial 1164, error_code 3 (BadWindow (invalid Window parameter)), request_code 3, minor_code 0 (X_GetWindowAttributes)
[23738:0218/135639.489210:WARNING:x11_util.cc(1399)] X error received: serial 1176, error_code 3 (BadWindow (invalid Window parameter)), request_code 3, minor_code 0 (X_GetWindowAttributes)
[23738:0218/135639.489239:WARNING:x11_util.cc(1399)] X error received: serial 1188, error_code 3 (BadWindow (invalid Window parameter)), request_code 3, minor_code 0 (X_GetWindowAttributes)
[23738:0218/135709.316160:WARNING:x11_util.cc(1399)] X error received: serial 18541, error_code 3 (BadWindow (invalid Window parameter)), request_code 3, minor_code 0 (X_GetWindowAttributes)
[23738:0218/135709.316275:WARNING:x11_util.cc(1399)] X error received: serial 18553, error_code 3 (BadWindow (invalid Window parameter)), request_code 3, minor_code 0 (X_GetWindowAttributes)
[23738:0218/135709.316318:WARNING:x11_util.cc(1399)] X error received: serial 18565, error_code 3 (BadWindow (invalid Window parameter)), request_code 3, minor_code 0 (X_GetWindowAttributes)
[23738:0218/135711.782936:WARNING:x11_util.cc(1399)] X error received: serial 23090, error_code 3 (BadWindow (invalid Window parameter)), request_code 3, minor_code 0 (X_GetWindowAttributes)
[23738:0218/135711.783052:WARNING:x11_util.cc(1399)] X error received: serial 23102, error_code 3 (BadWindow (invalid Window parameter)), request_code 3, minor_code 0 (X_GetWindowAttributes)
[23738:0218/135711.783093:WARNING:x11_util.cc(1399)] X error received: serial 23114, error_code 3 (BadWindow (invalid Window parameter)), request_code 3, minor_code 0 (X_GetWindowAttributes)
[23738:0218/135712.007010:WARNING:x11_util.cc(1399)] X error received: serial 24981, error_code 3 (BadWindow (invalid Window parameter)), request_code 3, minor_code 0 (X_GetWindowAttributes)
[23738:0218/135712.007063:WARNING:x11_util.cc(1399)] X error received: serial 24993, error_code 3 (BadWindow (invalid Window parameter)), request_code 3, minor_code 0 (X_GetWindowAttributes)
[23738:0218/135712.007079:WARNING:x11_util.cc(1399)] X error received: serial 25005, error_code 3 (BadWindow (invalid Window parameter)), request_code 3, minor_code 0 (X_GetWindowAttributes)

@CypressCecelia CypressCecelia added cli stage: needs investigating Someone from Cypress needs to look at this labels Feb 18, 2020
@missing1984
Copy link
Contributor

Running into the same issue with yarn v2. Highly suspect it's yarn v2 Plug'n'Play related.

@ghost
Copy link

ghost commented Mar 2, 2020

It looks like more details and some workaround (which didn't work for me, though) were provided in another issue
#6377

@maxime1992
Copy link

maxime1992 commented Apr 16, 2020

This is happening to me as well and I'm completely stuck ⚠️.
Cypress doesn't work locally at all, no matter how hard I try.

I'm not using yarn 2 so probably not coming from there:

yarn --version
1.21.1

Here's what I tried so far:

Cypress 3.6.0

  • rm -rf node_modules && yarn ➡️ 🔴
  • yarn run cypress cache clear && rm -rf node_modules && yarn ➡️ 🔴

Cypress 4.4.0

  • rm -rf node_modules && yarn ➡️ 🔴
  • yarn run cypress cache clear && rm -rf node_modules && yarn ➡️ 🔴

No matter what, I'm always stuck on that screen:

image

After some time, the only error that showed up in the console was that:

$ cypress open --project ./apps/public-site-e2e
It looks like this is your first time using Cypress: 4.4.0

  ✔  Verified Cypress! /home/maxime/.cache/Cypress/4.4.0/Cypress

Opening Cypress...
[545:0416/121013.504561:WARNING:x11_util.cc(1443)] X error received: serial 4770, error_code 3 (BadWindow (invalid Window parameter)), request_code 3, minor_code 0 (X_GetWindowAttributes)
[545:0416/121013.504660:WARNING:x11_util.cc(1443)] X error received: serial 4782, error_code 3 (BadWindow (invalid Window parameter)), request_code 3, minor_code 0 (X_GetWindowAttributes)
[545:0416/121013.504702:WARNING:x11_util.cc(1443)] X error received: serial 4794, error_code 3 (BadWindow (invalid Window parameter)), request_code 3, minor_code 0 (X_GetWindowAttributes)

I don't think that's relevant but sharing in case.

EDIT: I also tried to reboot the computer in case... Same issue

@DanielCambray
Copy link

Same issue here since yesterday. It was working fine until then. I don't know what to do...

@maxime1992
Copy link

@brian-mann sorry for the ping but it feels like quite a huge issue. We're unable to run cypress at all. I'm still blocked and unable to work on any tests. Something which is quite worrying too: I tried cypress on another Linux machine where it was working fine on few days ago and it's broken too 🤷. On the contrary, my colleagues running it on Mac don't have any issue.

@DanielCambray
Copy link

Indeed, still not working here. I've tried many things, change node version, npm, yarn. Still the same issue.

I have managed to find an alternative, it's not perfect, far less stable, but at least I can run some tests. You can try to launch Cypress with docker. It works on ubuntu :

docker run -it \
  -v $PWD:/e2e \
  -v /tmp/.X11-unix:/tmp/.X11-unix \
  -v /var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket \
  -w /e2e \
  -e DISPLAY=unix${DISPLAY} \
  --network=host \
  --entrypoint cypress \
  cypress/included:4.4.0 open --project .

@maxime1992
Copy link

So painful :( But thanks for sharing the solution @DanielCambray

@curvaton
Copy link

Hi,

I went through the same problem today. I have Ubuntu 18.04. On my side it appears it came from Chromium. I uninstalled it and now everything is back to normal. I found this solution remembering that this morning I had a notification that Chromium had been updated.

@maxime1992
Copy link

Oh my... 😱 @curvaton thanks! I didn't have to reinstall chromium-browser but just remove it.

What's going on... No idea! I still have chromium after "removing" it and now cypress does work 🤷

To be clear I just ran

sudo apt remove --purge chromium-browser

@lujoamel4
Copy link

I tried all of these solutions. However, it didn't work until I have installed cypress@4.4.1.

@flotwig
Copy link
Contributor

flotwig commented Apr 20, 2020

@maxime1992 it sounds like you're running into this bug: #7020 - try cypress@4.4.1

@jennifer-shehane
Copy link
Member

Hey everyone, recently there was an issue where Cypress would hang during opening in Ubuntu due to their changing how Chromium is installed. This was a priority fix for us, which is why we released a patch fix ahead of schedule as 4.4.1. Please upgrade to this version.

These recent comments appear to be unrelated to the original issue that was opened - which involve cypress open not working in Yarn 2. Closing this issue with yarn 2 as duplicate of #6377

@jennifer-shehane jennifer-shehane added type: duplicate This issue or pull request already exists and removed cli stage: needs investigating Someone from Cypress needs to look at this labels Apr 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

10 participants