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

verify fails with error: Smoke test failed: Error: Command was killed with SIGTRAP (Debugger breakpoint) #26145

Closed
oscar-b opened this issue Mar 17, 2023 · 6 comments
Assignees

Comments

@oscar-b
Copy link

oscar-b commented Mar 17, 2023

Current behavior

When trying to run Cypress tests on a particular self hosted Github Action runner, it crashes during verify with the error: Smoke test failed: Error: Command was killed with SIGTRAP (Debugger breakpoint)

This seems to be isolated to a particular node, which has worked before and is provisioned in the same manner as the other ones.

Cypress is running in Docker image cypress/included:12.8.1.

Desired behavior

No response

Test code to reproduce

.

Cypress Version

12.8.1

Node version

v18.15.0

Operating System

Docker on Ubuntu 22.04

Debug Logs

I would prefer emailing the full log instead, if possible.



2023-03-17T20:12:23.404Z cypress:cli:cli cli starts with arguments ["/__w/_tool/node/18.15.0/x64/bin/node","/__w/-snip-/node_modules/.bin/cypress","verify"]
2023-03-17T20:12:23.406Z cypress:cli NODE_OPTIONS is not set
2023-03-17T20:12:23.406Z cypress:cli:cli program parsing arguments
2023-03-17T20:12:23.409Z cypress:cli parsed cli options {}
2023-03-17T20:12:23.494Z cypress:cli Using CYPRESS_VERIFY_TIMEOUT from environment variable
2023-03-17T20:12:23.494Z cypress:cli verifying Cypress app
2023-03-17T20:12:23.495Z cypress:cli Using CYPRESS_CACHE_FOLDER from environment variable
2023-03-17T20:12:23.495Z cypress:cli Using CYPRESS_CACHE_FOLDER from environment variable
2023-03-17T20:12:23.495Z cypress:cli using environment variable CYPRESS_CACHE_FOLDER /root/.cache/Cypress
2023-03-17T20:12:23.496Z cypress:cli checking environment variables
2023-03-17T20:12:23.499Z cypress:cli checking if executable exists /root/.cache/Cypress/12.8.1/Cypress/Cypress
2023-03-17T20:12:23.501Z cypress:cli Binary is executable? : true
2023-03-17T20:12:23.501Z cypress:cli binaryDir is  /root/.cache/Cypress/12.8.1/Cypress
2023-03-17T20:12:23.502Z cypress:cli Reading binary package.json from: /root/.cache/Cypress/12.8.1/Cypress/resources/app/package.json
2023-03-17T20:12:23.504Z cypress:cli Found binary version 12.8.1 installed in: /root/.cache/Cypress/12.8.1/Cypress
2023-03-17T20:12:23.506Z cypress:cli could not read binary_state.json file at "/root/.cache/Cypress/12.8.1/binary_state.json"
2023-03-17T20:12:23.506Z cypress:cli {}
2023-03-17T20:12:23.506Z cypress:cli is Verified ? undefined
2023-03-17T20:12:23.506Z cypress:cli force verify
2023-03-17T20:12:23.507Z cypress:cli running binary verification check 12.8.1
[STARTED] Task without title.
2023-03-17T20:12:23.511Z cypress:cli clearing out the verified version
2023-03-17T20:12:23.513Z cypress:cli undefined DISPLAY environment variable
2023-03-17T20:12:23.513Z cypress:cli Cypress will spawn its own Xvfb
2023-03-17T20:12:23.513Z cypress:cli needs Xvfb? true
2023-03-17T20:12:23.513Z cypress:cli Starting Xvfb
2023-03-17T20:12:23.514Z xvfb lock filename /tmp/.X99-lock
2023-03-17T20:12:23.514Z xvfb lock filename /tmp/.X99-lock
2023-03-17T20:12:23.515Z xvfb setting DISPLAY :99
2023-03-17T20:12:23.519Z xvfb all Xvfb arguments [ ':99', '-screen', '0', '1280x1024x24' ]
2023-03-17T20:12:23.528Z xvfb checking if started by looking for the lock file /tmp/.X99-lock
2023-03-17T20:12:23.534Z cypress:xvfb _XSERVTransmkdir: ERROR: euid != 0,directory /tmp/.X11-unix will not be created.

2023-03-17T20:12:23.539Z xvfb checking if started by looking for the lock file /tmp/.X99-lock
2023-03-17T20:12:23.539Z xvfb lock file /tmp/.X99-lock found after 10 ms
2023-03-17T20:12:23.540Z cypress:cli disabling Electron sandbox
2023-03-17T20:12:23.540Z cypress:cli running smoke test
2023-03-17T20:12:23.540Z cypress:cli using Cypress executable /root/.cache/Cypress/12.8.1/Cypress/Cypress
2023-03-17T20:12:23.540Z cypress:cli smoke test command: /root/.cache/Cypress/12.8.1/Cypress/Cypress --no-sandbox --smoke-test --ping=672
2023-03-17T20:12:23.540Z cypress:cli smoke test timeout 120000 ms
2023-03-17T20:12:24.840Z cypress:cli Smoke test failed: Error: Command was killed with SIGTRAP (Debugger breakpoint): /root/.cache/Cypress/12.8.1/Cypress/Cypress --no-sandbox --smoke-test --ping=672

Other

Docker version 23.0.1, build a5ee5b1
8GB RAM

@lmiller1990
Copy link
Contributor

lmiller1990 commented Mar 20, 2023

Sounds similar to #26104
Also similar issue to another user on a self hosted runner, but he believes that the issue is on his end: #26123

If you want to send the full log to v-lachlan@cypress.io that'd be fine! I'm not sure it'll contain anything useful, but always good to have.

@lmiller1990 lmiller1990 self-assigned this Mar 20, 2023
@oscar-b
Copy link
Author

oscar-b commented Mar 20, 2023

Sounds similar to #26104 Also similar issue to another user on a self hosted runner, but he believes that the issue is on his end: #26123

If you want to send the full log to v-lachlan@cypress.io that'd be fine! I'm not sure it'll contain anything useful, but always good to have.

I sent you the full logs by email. What stands out here for me is that it's running in the Cypress docker-container :/

@oscar-b
Copy link
Author

oscar-b commented Mar 20, 2023

Oh this is really odd, it's related to no running as root it seems. I have --user 4300 (our github-actions user) added to the docker command, and now I saw the examples of running Cypress images without root: https://github.com/cypress-io/cypress-docker-images/tree/master/examples

However, running with --user 4300 works sometimes, and has worked for several months?

Really odd, but I assume I should set up the image the suggested way.

@oscar-b
Copy link
Author

oscar-b commented Mar 20, 2023

Running the container with --user 4300 actually means that the user still is in the root group, thus having access to the Cypress executable and the cache (which is moved in the example repo so that the user should have access to it).

This should work?

docker run -it --rm --user 4300  --entrypoint="id" cypress/included:12.8.1
uid=4300 gid=0(root) groups=0(root)

@oscar-b
Copy link
Author

oscar-b commented Mar 20, 2023

Seems like I was able to fix it with the info in this ticket

cypress-io/cypress-docker-images#847 (comment)

@oscar-b oscar-b closed this as completed Mar 20, 2023
@lmiller1990
Copy link
Contributor

Great, glad you found a fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants