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

The futex facility returned an unexpected error code tutorial install for Cypress 9 on WSL 2 #21075

Closed
bananabrann opened this issue Apr 13, 2022 · 10 comments
Labels
topic: installation Issue during installation or downloading Cypress

Comments

@bananabrann
Copy link

bananabrann commented Apr 13, 2022

Current behavior

When installing Cypress on WSL 2, node_modules/.bin/cypress open fails, and Cypress is not usable.

I realize that it's probably me and not Cypress, but I am at a loss because I have spent two hours meticulously combing through the tutorial config values making sure they're accurate. (Every item listed in the "Other" section on this issue)

Debug logs

  • Including DEBUG=cypress:* produces no additional logs. Edit below

From the project root with package.json, running node_modules/.bin/cypress open:

[25136:0413/173111.714169:ERROR:browser_main_loop.cc(1400)] Unable to open X display.
The futex facility returned an unexpected error code.
The Test Runner unexpectedly exited via a exit event with signal SIGABRT

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-x64 (Ubuntu - 20.04)
Cypress Version: 9.5.4          

Edit 4/14, logs are showing now

lee@DESKTOP-BHC5NFB:~/Developer/bananabrann/bananabrann.dev$ DEBUG=cypress:* npx cypress open
  cypress:cli:cli cli starts with arguments ["/home/lee/.nvm/versions/node/v16.13.0/bin/node","/home/lee/Developer/bananabrann/bananabrann.dev/node_modules/.bin/cypress","open"] +0ms
  cypress:cli NODE_OPTIONS is not set +0ms
  cypress:cli:cli program parsing arguments +1ms
  cypress:cli:cli opening Cypress +2ms
  cypress:cli parsed cli options {} +79ms
  cypress:cli opening from options {"project":"/home/lee/Developer/bananabrann/bananabrann.dev"} +0ms
  cypress:cli command line arguments ["--project","/home/lee/Developer/bananabrann/bananabrann.dev"] +0ms
  cypress:cli verifying Cypress app +0ms
  cypress:cli checking environment variables +1ms
  cypress:cli checking if executable exists /home/lee/.cache/Cypress/9.5.4/Cypress/Cypress +3ms
  cypress:cli Binary is executable? : true +2ms
  cypress:cli binaryDir is  /home/lee/.cache/Cypress/9.5.4/Cypress +0ms
  cypress:cli Reading binary package.json from: /home/lee/.cache/Cypress/9.5.4/Cypress/resources/app/package.json +0ms
  cypress:cli Found binary version 9.5.4 installed in: /home/lee/.cache/Cypress/9.5.4/Cypress +2ms
  cypress:cli could not read binary_state.json file at "/home/lee/.cache/Cypress/9.5.4/binary_state.json" +3ms
  cypress:cli {} +0ms
  cypress:cli is Verified ? undefined +1ms
  cypress:cli running binary verification check 9.5.4 +0ms
It looks like this is your first time using Cypress: 9.5.4


  cypress:cli clearing out the verified version +6ms
  cypress:cli DISPLAY environment variable is set to 192.168.50.218:0.0 on Linux
  cypress:cli Assuming this DISPLAY points at working X11 server,
  cypress:cli Cypress will not spawn own Xvfb
  cypress:cli 
  cypress:cli NOTE: if the X11 server is NOT working, Cypress will exit without explanation,
  cypress:cli   see https://github.com/cypress-io/cypress/issues/4034
  cypress:cli Solution: Unset the DISPLAY variable and try again:
  cypress:cli   DISPLAY= npx cypress run ... +0ms
  cypress:cli needs Xvfb? false +1ms
  cypress:cli spawning, should retry on display problem? true +1ms
  cypress:cli disabling Electron sandbox +0ms
  cypress:cli running smoke test +0ms
  cypress:cli using Cypress executable /home/lee/.cache/Cypress/9.5.4/Cypress/Cypress +0ms
  cypress:cli smoke test command: /home/lee/.cache/Cypress/9.5.4/Cypress/Cypress --no-sandbox --smoke-test --ping=513 +0ms
  cypress:cli smoke test timeout 30000 ms +0ms
  cypress:cli Smoke test failed: Error: Command timed out after 30000 milliseconds: /home/lee/.cache/Cypress/9.5.4/Cypress/Cypress --no-sandbox --smoke-test --ping=513
Timed out
2022-04-14T19:04:03.992Z cypress:ts register TypeScript project /home/lee/.cache/Cypress/9.5.4/Cypress/resources/app/packages/ts/tsconfig.json fast? true
2022-04-14T19:04:04.137Z cypress:ts Running without ts-node hook in environment "production"
2022-04-14T19:04:04.350Z cypress:server:appdata path: /home/lee/.config/Cypress/cy/production/browsers
2022-04-14T19:04:04.780Z cypress:server:appdata path: /home/lee/.config/Cypress/cy/production
2022-04-14T19:04:04.889Z cypress:server:appdata path: /home/lee/.config/Cypress/cy/production/cache
2022-04-14T19:04:05.112Z cypress:server:cypress starting cypress with argv [ '/home/lee/.cache/Cypress/9.5.4/Cypress/Cypress', '--no-sandbox', '--smoke-test', '--ping=513' ]
2022-04-14T19:04:05.113Z cypress:server:args argv array: [ '/home/lee/.cache/Cypress/9.5.4/Cypress/Cypress', '--no-sandbox', '--smoke-test', '--ping=513' ]
2022-04-14T19:04:05.115Z cypress:server:args parsed argv options { options: { _: [ '/home/lee/.cache/Cypress/9.5.4/Cypress/Cypress' ], sandbox: false, 'smoke-test': true, smokeTest: true, ping: 513 } }
2022-04-14T19:04:05.116Z cypress:server:args argv parsed: { _: [ '/home/lee/.cache/Cypress/9.5.4/Cypress/Cypress' ], sandbox: false, smokeTest: true, ping: 513, invokedFromCli: false, cwd: '/home/lee/Developer/bananabrann/bananabrann.dev', testingType: 'e2e' }
2022-04-14T19:04:05.117Z cypress:server:util:proxy found proxy environment variables { npm_config_noproxy: '' }
2022-04-14T19:04:05.117Z cypress:server:args options { _: [ '/home/lee/.cache/Cypress/9.5.4/Cypress/Cypress' ], sandbox: false, smokeTest: true, ping: 513, invokedFromCli: false, cwd: '/home/lee/Developer/bananabrann/bananabrann.dev', testingType: 'e2e', config: {} }
2022-04-14T19:04:05.117Z cypress:server:args argv options: { _: [ '/home/lee/.cache/Cypress/9.5.4/Cypress/Cypress' ], sandbox: false, smokeTest: true, ping: 513, invokedFromCli: false, cwd: '/home/lee/Developer/bananabrann/bananabrann.dev', testingType: 'e2e', config: {}, pong: 513 }
2022-04-14T19:04:05.118Z cypress:server:cypress from argv [ '/home/lee/.cache/Cypress/9.5.4/Cypress/Cypress', '--no-sandbox', '--smoke-test', '--ping=513' ] got options { _: [ '/home/lee/.cache/Cypress/9.5.4/Cypress/Cypress' ], sandbox: false, smokeTest: true, ping: 513, invokedFromCli: false, cwd: '/home/lee/Developer/bananabrann/bananabrann.dev', testingType: 'e2e', config: {}, pong: 513 }
    at timeoutKill (/home/lee/Developer/bananabrann/bananabrann.dev/node_modules/execa/lib/kill.js:65:23)
    at Timeout._onTimeout (/home/lee/Developer/bananabrann/bananabrann.dev/node_modules/execa/lib/kill.js:81:4)
    at listOnTimeout (node:internal/timers:557:17)
    at processTimers (node:internal/timers:500:7) {
  timedOut: true,
  signal: 'SIGTERM',
  originalMessage: 'Timed out',
  shortMessage: 'Command timed out after 30000 milliseconds: /home/lee/.cache/Cypress/9.5.4/Cypress/Cypress --no-sandbox --smoke-test --ping=513\n' +
    'Timed out',
  command: '/home/lee/.cache/Cypress/9.5.4/Cypress/Cypress --no-sandbox --smoke-test --ping=513',
  exitCode: undefined,
  signalDescription: 'Termination',
  stdout: '',
  stderr: '2022-04-14T19:04:03.992Z cypress:ts register TypeScript project /home/lee/.cache/Cypress/9.5.4/Cypress/resources/app/packages/ts/tsconfig.json fast? true\n' +
    '2022-04-14T19:04:04.137Z cypress:ts Running without ts-node hook in environment "production"\n' +
    '2022-04-14T19:04:04.350Z cypress:server:appdata path: /home/lee/.config/Cypress/cy/production/browsers\n' +
    '2022-04-14T19:04:04.780Z cypress:server:appdata path: /home/lee/.config/Cypress/cy/production\n' +
    '2022-04-14T19:04:04.889Z cypress:server:appdata path: /home/lee/.config/Cypress/cy/production/cache\n' +
    "2022-04-14T19:04:05.112Z cypress:server:cypress starting cypress with argv [ '/home/lee/.cache/Cypress/9.5.4/Cypress/Cypress', '--no-sandbox', '--smoke-test', '--ping=513' ]\n" +
    "2022-04-14T19:04:05.113Z cypress:server:args argv array: [ '/home/lee/.cache/Cypress/9.5.4/Cypress/Cypress', '--no-sandbox', '--smoke-test', '--ping=513' ]\n" +
    "2022-04-14T19:04:05.115Z cypress:server:args parsed argv options { options: { _: [ '/home/lee/.cache/Cypress/9.5.4/Cypress/Cypress' ], sandbox: false, 'smoke-test': true, smokeTest: true, ping: 513 } }\n" +
    "2022-04-14T19:04:05.116Z cypress:server:args argv parsed: { _: [ '/home/lee/.cache/Cypress/9.5.4/Cypress/Cypress' ], sandbox: false, smokeTest: true, ping: 513, invokedFromCli: false, cwd: '/home/lee/Developer/bananabrann/bananabrann.dev', testingType: 'e2e' }\n" +
    "2022-04-14T19:04:05.117Z cypress:server:util:proxy found proxy environment variables { npm_config_noproxy: '' }\n" +
    "2022-04-14T19:04:05.117Z cypress:server:args options { _: [ '/home/lee/.cache/Cypress/9.5.4/Cypress/Cypress' ], sandbox: false, smokeTest: true, ping: 513, invokedFromCli: false, cwd: '/home/lee/Developer/bananabrann/bananabrann.dev', testingType: 'e2e', config: {} }\n" +
    "2022-04-14T19:04:05.117Z cypress:server:args argv options: { _: [ '/home/lee/.cache/Cypress/9.5.4/Cypress/Cypress' ], sandbox: false, smokeTest: true, ping: 513, invokedFromCli: false, cwd: '/home/lee/Developer/bananabrann/bananabrann.dev', testingType: 'e2e', config: {}, pong: 513 }\n" +
    "2022-04-14T19:04:05.118Z cypress:server:cypress from argv [ '/home/lee/.cache/Cypress/9.5.4/Cypress/Cypress', '--no-sandbox', '--smoke-test', '--ping=513' ] got options { _: [ '/home/lee/.cache/Cypress/9.5.4/Cypress/Cypress' ], sandbox: false, smokeTest: true, ping: 513, invokedFromCli: false, cwd: '/home/lee/Developer/bananabrann/bananabrann.dev', testingType: 'e2e', config: {}, pong: 513 }",
  failed: true,
  isCanceled: false,
  killed: false
} +30s
  cypress:cli error message: 2022-04-14T19:04:03.992Z cypress:ts register TypeScript project /home/lee/.cache/Cypress/9.5.4/Cypress/resources/app/packages/ts/tsconfig.json fast? true
2022-04-14T19:04:04.137Z cypress:ts Running without ts-node hook in environment "production"
2022-04-14T19:04:04.350Z cypress:server:appdata path: /home/lee/.config/Cypress/cy/production/browsers
2022-04-14T19:04:04.780Z cypress:server:appdata path: /home/lee/.config/Cypress/cy/production
2022-04-14T19:04:04.889Z cypress:server:appdata path: /home/lee/.config/Cypress/cy/production/cache
2022-04-14T19:04:05.112Z cypress:server:cypress starting cypress with argv [ '/home/lee/.cache/Cypress/9.5.4/Cypress/Cypress', '--no-sandbox', '--smoke-test', '--ping=513' ]
2022-04-14T19:04:05.113Z cypress:server:args argv array: [ '/home/lee/.cache/Cypress/9.5.4/Cypress/Cypress', '--no-sandbox', '--smoke-test', '--ping=513' ]
2022-04-14T19:04:05.115Z cypress:server:args parsed argv options { options: { _: [ '/home/lee/.cache/Cypress/9.5.4/Cypress/Cypress' ], sandbox: false, 'smoke-test': true, smokeTest: true, ping: 513 } }
2022-04-14T19:04:05.116Z cypress:server:args argv parsed: { _: [ '/home/lee/.cache/Cypress/9.5.4/Cypress/Cypress' ], sandbox: false, smokeTest: true, ping: 513, invokedFromCli: false, cwd: '/home/lee/Developer/bananabrann/bananabrann.dev', testingType: 'e2e' }
2022-04-14T19:04:05.117Z cypress:server:util:proxy found proxy environment variables { npm_config_noproxy: '' }
2022-04-14T19:04:05.117Z cypress:server:args options { _: [ '/home/lee/.cache/Cypress/9.5.4/Cypress/Cypress' ], sandbox: false, smokeTest: true, ping: 513, invokedFromCli: false, cwd: '/home/lee/Developer/bananabrann/bananabrann.dev', testingType: 'e2e', config: {} }
2022-04-14T19:04:05.117Z cypress:server:args argv options: { _: [ '/home/lee/.cache/Cypress/9.5.4/Cypress/Cypress' ], sandbox: false, smokeTest: true, ping: 513, invokedFromCli: false, cwd: '/home/lee/Developer/bananabrann/bananabrann.dev', testingType: 'e2e', config: {}, pong: 513 }
2022-04-14T19:04:05.118Z cypress:server:cypress from argv [ '/home/lee/.cache/Cypress/9.5.4/Cypress/Cypress', '--no-sandbox', '--smoke-test', '--ping=513' ] got options { _: [ '/home/lee/.cache/Cypress/9.5.4/Cypress/Cypress' ], sandbox: false, smokeTest: true, ping: 513, invokedFromCli: false, cwd: '/home/lee/Developer/bananabrann/bananabrann.dev', testingType: 'e2e', config: {}, pong: 513 } +1ms

Cypress verification timed out.

This command failed with the following output:

/home/lee/.cache/Cypress/9.5.4/Cypress/Cypress --no-sandbox --smoke-test --ping=513

----------

2022-04-14T19:04:03.992Z cypress:ts register TypeScript project /home/lee/.cache/Cypress/9.5.4/Cypress/resources/app/packages/ts/tsconfig.json fast? true
2022-04-14T19:04:04.137Z cypress:ts Running without ts-node hook in environment "production"
2022-04-14T19:04:04.350Z cypress:server:appdata path: /home/lee/.config/Cypress/cy/production/browsers
2022-04-14T19:04:04.780Z cypress:server:appdata path: /home/lee/.config/Cypress/cy/production
2022-04-14T19:04:04.889Z cypress:server:appdata path: /home/lee/.config/Cypress/cy/production/cache
2022-04-14T19:04:05.112Z cypress:server:cypress starting cypress with argv [ '/home/lee/.cache/Cypress/9.5.4/Cypress/Cypress', '--no-sandbox', '--smoke-test', '--ping=513' ]
2022-04-14T19:04:05.113Z cypress:server:args argv array: [ '/home/lee/.cache/Cypress/9.5.4/Cypress/Cypress', '--no-sandbox', '--smoke-test', '--ping=513' ]
2022-04-14T19:04:05.115Z cypress:server:args parsed argv options { options: { _: [ '/home/lee/.cache/Cypress/9.5.4/Cypress/Cypress' ], sandbox: false, 'smoke-test': true, smokeTest: true, ping: 513 } }
2022-04-14T19:04:05.116Z cypress:server:args argv parsed: { _: [ '/home/lee/.cache/Cypress/9.5.4/Cypress/Cypress' ], sandbox: false, smokeTest: true, ping: 513, invokedFromCli: false, cwd: '/home/lee/Developer/bananabrann/bananabrann.dev', testingType: 'e2e' }
2022-04-14T19:04:05.117Z cypress:server:util:proxy found proxy environment variables { npm_config_noproxy: '' }
2022-04-14T19:04:05.117Z cypress:server:args options { _: [ '/home/lee/.cache/Cypress/9.5.4/Cypress/Cypress' ], sandbox: false, smokeTest: true, ping: 513, invokedFromCli: false, cwd: '/home/lee/Developer/bananabrann/bananabrann.dev', testingType: 'e2e', config: {} }
2022-04-14T19:04:05.117Z cypress:server:args argv options: { _: [ '/home/lee/.cache/Cypress/9.5.4/Cypress/Cypress' ], sandbox: false, smokeTest: true, ping: 513, invokedFromCli: false, cwd: '/home/lee/Developer/bananabrann/bananabrann.dev', testingType: 'e2e', config: {}, pong: 513 }
2022-04-14T19:04:05.118Z cypress:server:cypress from argv [ '/home/lee/.cache/Cypress/9.5.4/Cypress/Cypress', '--no-sandbox', '--smoke-test', '--ping=513' ] got options { _: [ '/home/lee/.cache/Cypress/9.5.4/Cypress/Cypress' ], sandbox: false, smokeTest: true, ping: 513, invokedFromCli: false, cwd: '/home/lee/Developer/bananabrann/bananabrann.dev', testingType: 'e2e', config: {}, pong: 513 }

----------

Platform: linux-x64 (Ubuntu - 20.04)
Cypress Version: 9.5.4

Edit 4/14
Error looks similar to #18183

Cypress Version

9.5.4

Package Manager

npm

Operating system

other

Other

Everything from the WSL2 installation guide appears to be working in as-expected condition.

  • This is occuring not in any integrated terminal in a code editor. This is just the regular, default terminal for WSL2.
    Screenshot 2022-04-13 173757

  • Windows firewall inbound allowing everything for VcxSrv.exe
    Screenshot 2022-04-13 173719

  • Echoing DISPLAY produces an IP address as expected.

  • WSL2 has been restarted, and ~/.bashrc is properly sourced (Numbers '1' to '7' is just to hide my IP. The 0.0 is real.)

lee@DESKTOP-BHC5NFB ~/$ echo $DISPLAY
123.45.6.7:0.0
  • /etc/sudoers.d/dbus appears to be set up correctly.
    Screenshot 2022-04-13 174309

  • Everything from the tutorial has been added ~/.bashrc
    Screenshot 2022-04-13 174429

  • In Windows' command prompt (on my native machine, completely outside of WSL2), wsl -l -v says I am indeed running WSL
    Screenshot 2022-04-13 173551
    2

@bananabrann bananabrann added the topic: installation Issue during installation or downloading Cypress label Apr 13, 2022
@bananabrann
Copy link
Author

Taking shots in the dark at this point to hopefully provide some more clues:

  1. Followed the suggestion mentioned in Presence of DISPLAY env var causes "Cypress failed to start" #4034 and Dependencies missing while using your docker image #1556 and unset DISPLAY variable.
[2087:0413/185241.030517:ERROR:bus.cc(392)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[2259:0413/185241.126059:ERROR:gpu_init.cc(453)] Passthrough is not supported, GL is swiftshader, ANGLE is 

So I guess that part was correct, I can definitively cross issues with the IP off the list of culprits.

  1. I did a full network reset and rebooted, no changes.

@bananabrann
Copy link
Author

bananabrann commented Apr 14, 2022

(Hopefully) more clues:

  1. Using Next.js's example app for Cypress yields the same result.
npx create-next-app@latest --example with-cypress mycoolapp
  1. Adding an -ac flag to the properties of VcXsrc.exe does not work.

@bananabrann
Copy link
Author

None of the steps here work as well, issue seemingly is only with Cypress:
microsoft/WSL#4106 (comment)

@protoEvangelion
Copy link

@bananabrann I'm also experiencing this but on mac + docker!

image

@bananabrann
Copy link
Author

@rdotg Dang. Bummer to see others with it too, but thanks for letting me know I'm not the only one.

My current work around is not to use Cypress on Windows. If I want to do anything with my tests/Cypress, I switch to my laptop (Ubuntu 20). 😕

@fergarcia5
Copy link

any news about this issue?

@github-actions
Copy link
Contributor

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.

@github-actions github-actions bot added the stale no activity on this issue for a long period label May 12, 2023
@bananabrann
Copy link
Author

bananabrann commented May 13, 2023

Issue is still present, I never could get it to work 😔 Our team moved to other testing software for one of our projects

@cypress-app-bot cypress-app-bot removed the stale no activity on this issue for a long period label May 15, 2023
@nagash77
Copy link
Contributor

@bananabrann Cypress does not support WSL or WSL 2 at this time. I am going to close this issue.

@nagash77 nagash77 closed this as not planned Won't fix, can't repro, duplicate, stale May 15, 2023
@stoikerty
Copy link

Try running export DISPLAY=:0 and running npx cypress open again. Tricky one to figure out, it worked for me.

I found the solution here: electron/electron#24211 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: installation Issue during installation or downloading Cypress
Projects
None yet
Development

No branches or pull requests

6 participants