Cypress: Cypress 3.3.0 smoke test segmentation fault and permission problems

Created on 20 May 2019  ยท  9Comments  ยท  Source: cypress-io/cypress

Current behavior:

Today I started test in project, which was working fine before and it failed:

$ npx cypress open
It looks like this is your first time usin

 \  Verifying Cypress can run C:\Users\t.s ร—  Verifying Cypress can run C:\Users\t.sess\Cache\3.3.0\Cypress
   โ†’ Cypress Version: 3.3.0
Cypress failed to start.

This is usually caused by a missing librar

The error below should indicate which depe

https://on.cypress.io/required-dependencie

If you are using Docker, we provide containdencies installed.

----------

Command failed: C:\Users\t.sutlanaev\AppDa0\Cypress\Cypress.exe --smoke-test --ping=

----------

Platform: win32 (10.0.17134)
Cypress Version: 3.3.0

(Sorry for clipped logs, git bash's terminal cannot copy it properly)

Then I just tried to run the command, which cypress said was not working:

$ 'C:\Users\t.sutlanaev\AppData\Local\Cypress.exe' --smoke-test --ping=223

Segmentation fault

After that I tried to reinstall it:

$ npx cypress install --force

Cypress 3.3.0 is installed in C:\Users\t.sutlanaev\AppData\Local\Cypress\Cache\3.3.0

Installing Cypress (version: 3.3.0)

 โˆš  Downloaded Cypress
 ร—  Unzipping Cypress      
   โ†’ Cypress Version: 3.3.0
    Finishing Installation 
The Cypress App could not be unzipped.

Search for an existing issue or open a GitHub issue
at

https://github.com/cypress-io/cypress/issues

----------

Error: EPERM: operation not permitted, mkdir 'C:\Users\t.sutlanaev\AppData\Local\Cypress\Cache\3.3.0'

----------

Platform: win32 (10.0.17134)
Cypress Version: 3.3.0

So right now folder 'AppData\Local\Cypress\Cache\3.3.0' is stuck in this state - I cannot access it in any way even using Administrator. It cannot be deleted or changed, seems like something locked it.
I'd like some instructions how to unlock it now.

The workaround which I've come with is to change

  "devDependencies": {
    "cypress": "^3.2.0",

to

  "devDependencies": {
    "cypress": "3.2.0",

Now version is fixed on 3.2.0, which is still working fine.

Desired behavior:

Should not fail this way.
Should not lock the folder indefinitely.

Steps to reproduce: (app code and test code)

I suppose any test would fail with 3.3.0 on Windows 10. Don't know what to add here.

Versions

Cypress 3.3.0, Windows 10

windows duplicate

Most helpful comment

Similar for me with Cypress 3.3.1, Dockerfile with cypress/base:10.
Locally everything is fine. In TFS:

2019-05-23T10:46:43.8313880Z [?25l[10:46:43]  Verifying Cypress can run /root/.cache/Cypress/3.3.1/Cypress [started]
2019-05-23T10:46:54.7127190Z [10:46:54]  Verifying Cypress can run /root/.cache/Cypress/3.3.1/Cypress [failed]
2019-05-23T10:46:54.7252050Z [10:46:54] โ†’ Cypress verification timed out.
2019-05-23T10:46:54.7413660Z 
2019-05-23T10:46:54.7469380Z This command failed with the following output:
2019-05-23T10:46:54.7481870Z 
2019-05-23T10:46:54.7794280Z /root/.cache/Cypress/3.3.1/Cypress/Cypress --smoke-test --ping=634
2019-05-23T10:46:54.7810850Z 
2019-05-23T10:46:54.8189620Z ----------
2019-05-23T10:46:54.8202830Z 
2019-05-23T10:46:54.8324050Z Command failed: /root/.cache/Cypress/3.3.1/Cypress/Cypress --smoke-test --ping=634
2019-05-23T10:46:54.8386170Z 
2019-05-23T10:46:54.8506160Z ----------
2019-05-23T10:46:54.8517910Z 
2019-05-23T10:46:54.8539900Z Platform: linux (Debian - 9.8)
2019-05-23T10:46:54.8815540Z Cypress Version: 3.3.1

All 9 comments

Similar for me with Cypress 3.3.1, Dockerfile with cypress/base:10.
Locally everything is fine. In TFS:

2019-05-23T10:46:43.8313880Z [?25l[10:46:43]  Verifying Cypress can run /root/.cache/Cypress/3.3.1/Cypress [started]
2019-05-23T10:46:54.7127190Z [10:46:54]  Verifying Cypress can run /root/.cache/Cypress/3.3.1/Cypress [failed]
2019-05-23T10:46:54.7252050Z [10:46:54] โ†’ Cypress verification timed out.
2019-05-23T10:46:54.7413660Z 
2019-05-23T10:46:54.7469380Z This command failed with the following output:
2019-05-23T10:46:54.7481870Z 
2019-05-23T10:46:54.7794280Z /root/.cache/Cypress/3.3.1/Cypress/Cypress --smoke-test --ping=634
2019-05-23T10:46:54.7810850Z 
2019-05-23T10:46:54.8189620Z ----------
2019-05-23T10:46:54.8202830Z 
2019-05-23T10:46:54.8324050Z Command failed: /root/.cache/Cypress/3.3.1/Cypress/Cypress --smoke-test --ping=634
2019-05-23T10:46:54.8386170Z 
2019-05-23T10:46:54.8506160Z ----------
2019-05-23T10:46:54.8517910Z 
2019-05-23T10:46:54.8539900Z Platform: linux (Debian - 9.8)
2019-05-23T10:46:54.8815540Z Cypress Version: 3.3.1

I have a similar issue as @viraxslot .

 D:\cypress>set DEBUG=cypress*

D:\cypress>node_modules\.bin\cypress run
  cypress:cli cli starts with arguments ["C:\\Program Files\\nodejs\\node.exe","D:\\cypress\\node_modules\\cypress\\bin\\cypress","run"] +0ms
  cypress:cli NODE_OPTIONS is not set +0ms
  cypress:cli program parsing arguments +8ms
  cypress:cli running Cypress +2ms
  cypress:cli parsed cli options {} +2s
  cypress:cli verifying Cypress app +0ms
  cypress:cli checking environment variables +3ms
  cypress:cli checking if executable exists C:\Users\ob\AppData\Local\Cypress\Cache\3.3.1\Cypress\Cypress.exe +7ms
  cypress:cli Binary is executable? : true +4ms
  cypress:cli binaryDir is  C:\Users\ob\AppData\Local\Cypress\Cache\3.3.1\Cypress +3ms
  cypress:cli Reading binary package.json from: C:\Users\ob\AppData\Local\Cypress\Cache\3.3.1\Cypress\resources\app\package.json +0ms
  cypress:cli Found binary version 3.3.1 installed in: C:\Users\ob\AppData\Local\Cypress\Cache\3.3.1\Cypress +7ms
  cypress:cli could not read binary_state.json file +8ms
  cypress:cli {} +1ms
  cypress:cli is Verified ? undefined +6ms
  cypress:cli running binary verification check 3.3.1 +3ms
It looks like this is your first time using Cypress: 3.3.1

  cypress:cli clearing out the verified version +8ms
  cypress:cli needs Xvfb? false +3ms
  cypress:cli spawning, should retry on display problem? false +1ms
  cypress:cli running smoke test +3ms
  cypress:cli using Cypress executable C:\Users\ob\AppData\Local\Cypress\Cache\3.3.1\Cypress\Cypress.exe +3ms
  cypress:cli smoke test command: C:\Users\ob\AppData\Local\Cypress\Cache\3.3.1\Cypress\Cypress.exe --smoke-test --ping=470 +2ms
 \  Verifying Cypress can run C:\Users\ob\AppData\Local\Cypress\Cache\3.3.1\Cypress
  cypress:cli Smoke test failed: { Error: Command failed: C:\Users\ob\AppData\Local\Cypress\Cache\3.3.1\Cypress\Cypress.exe --smoke-test --ping=470


2019-05-28T08:32:04.637Z cypress:ts Running without ts-node hook in environment "production"
2019-05-28T08:32:06.742Z cypress:server:cypress starting cypress with argv [ 'C:\\Users\\ob\\AppData\\Local\\Cypress\\Cache\\3.3.1\\Cypress\\Cypress.exe', '--smoke-test', '--ping=470' ]

    at makeError (D:\cypress\node_modules\execa\index.js:172:9)
    at Promise.all.then.arr (D:\cypress\node_modules\execa\index.js:277:16)
    at process._tickCallback (internal/process/next_tick.js:68:7)
  code: null,
  stdout:
   '\r\n2019-05-28T08:32:04.637Z cypress:ts Running without ts-node hook in environment "production"\r\n2019-05-28T08:32:06.742Z cypress:server:cypress starting cypress with argv [ \'C:\\\\Users\\\\ob\\\\AppData\\\\Local\\\\Cypress\\\\Cache\\\\3.3.1\\\\Cypress\\\\Cypress.exe\', \'--smoke-test\', \'--ping=470\' ]\r\n',
  stderr: '',
  failed: true,
  signal: 'SIGTERM',
  cmd:
   'C:\\Users\\ob\\AppData\\Local\\Cypress\\Cache\\3.3.1\\Cypress\\Cypress.exe --smoke-test --ping=470',
  timedOut: true,
  killed: true } +11s
  cypress:cli error message: Command failed: C:\Users\ob\AppData\Local\Cypress\Cache\3.3.1\Cypress\Cypress.exe --smoke-test --ping=470


2019-05-28T08:32:04.637Z cypress:ts Running without ts-node hook in environment "production"
2019-05-28T08:32:06.742Z cypress:server:cypress starting cypress with argv [ 'C:\\Users\\ob\\AppData\\Local\\Cypress\\Cache\\3.3.1\\Cypress\\Cypress.exe', '--smoke-test', '--ping=470' ]
 +8ms
 ร—  Verifying Cypress can run C:\Users\ob\AppData\Local\Cypress\Cache\3.3.1\Cypress
   โ†’ Cypress Version: 3.3.1
Cypress verification timed out.

This command failed with the following output:

C:\Users\ob\AppData\Local\Cypress\Cache\3.3.1\Cypress\Cypress.exe --smoke-test --ping=470

----------

Command failed: C:\Users\ob\AppData\Local\Cypress\Cache\3.3.1\Cypress\Cypress.exe --smoke-test --ping=470


2019-05-28T08:32:04.637Z cypress:ts Running without ts-node hook in environment "production"
2019-05-28T08:32:06.742Z cypress:server:cypress starting cypress with argv [ 'C:\\Users\\ob\\AppData\\Local\\Cypress\\Cache\\3.3.1\\Cypress\\Cypress.exe', '--smoke-test', '--ping=470' ]

----------

Platform: win32 (10.0.15063)
Cypress Version: 3.3.1

I have the same issue
macOS Mojave 10.14.5
Cypress 3.3.0 and 3.3.1
Node.js 10.15.1

~/Dev/Projects/Vue/test-cypress(master) ยป npx cypress open                                                                me@Me-MacBook-Pro-2018
It looks like this is your first time using Cypress: 3.3.1

 โœ–  Verifying Cypress can run /Users/me/Library/Caches/Cypress/3.3.1/Cypress.app
   โ†’ Cypress Version: 3.3.1
Cypress verification timed out.

This command failed with the following output:

/Users/me/Library/Caches/Cypress/3.3.1/Cypress.app/Contents/MacOS/Cypress --smoke-test --ping=187

----------

Command failed: /Users/me/Library/Caches/Cypress/3.3.1/Cypress.app/Contents/MacOS/Cypress --smoke-test --ping=187

----------

Platform: darwin (18.6.0)
Cypress Version: 3.3.1

Yes, this is first run for the 3.3.1 version,
I have updated from 3.2.0.

The only way to run the 3.3.1 version is to access it directly ( running the .exe file in windows),
This way it skips the verification process.

I made a fresh installation on Ubuntu 18.04 and got the same error.
But when I run "sudo npx cypress open " it works.

Can it be a permissions related issue?
If it is a permissions issue, it should not happen on windows machines.

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

 โœ–  Verifying Cypress can run /home/reuven/snap/code/common/.cache/Cypress/3.3.1/Cypress
   โ†’ Cypress Version: 3.3.1
Cypress verification timed out.

This command failed with the following output:

/home/reuven/snap/code/common/.cache/Cypress/3.3.1/Cypress/Cypress --smoke-test --ping=305

----------

Command failed: /home/reuven/snap/code/common/.cache/Cypress/3.3.1/Cypress/Cypress --smoke-test --ping=305

----------

Platform: linux (Ubuntu Linux - 18.04)
Cypress Version: 3.3.1

I have closed my Mac, reopened the next day it and now it works...

I had the same issue when starting cypress on win 10. Just running .\node_modules\.bin\cypress verify prior to starting cypress might be good enough, but the below is what worked for me.

  1. Deleted everything under C:\Users\\AppData\Local\Cypress
  2. Reinstalled cypress using .\node_modules.bin\cypress install
  3. Tried to run it using .\node_modules.bin\cypress open which failed with a verification timeout
  4. Ran .\node_modules.bin\cypress verify and the test passed
  5. Cypress should start up now
    ```
    PS C:\Users\\Documents\source\repos\cypress> .\node_modules.bin\cypress install
    Installing Cypress (version: 3.3.1)

โˆš Downloaded Cypress
โˆš Unzipped Cypress
โˆš Finished Installation C:\Users\\AppData\Local\Cypress\Cache\3.3.1

You can now open Cypress by running: node_modules.bin\cypress open

https://on.cypress.io/installing-cypress

PS C:\Users\\Documents\source\repos\cypress> .\node_modules.bin\cypress open
It looks like this is your first time using Cypress: 3.3.1

ร— Verifying Cypress can run C:\Users\\AppData\Local\Cypress\Cache\3.3.1\Cypress
โ†’ Cypress Version: 3.3.1
Cypress verification timed out.

This command failed with the following output:

C:\Users\\AppData\Local\Cypress\Cache\3.3.1\Cypress\Cypress.exe --smoke-test --ping=970


Command failed: C:\Users\\AppData\Local\Cypress\Cache\3.3.1\Cypress\Cypress.exe --smoke-test --ping=970


Platform: win32 (10.0.15063)
Cypress Version: 3.3.1
PS C:\Users\\Documents\source\repos\cypress> .\node_modules.bin\cypress verify
It looks like this is your first time using Cypress: 3.3.1

โˆš Verified Cypress! C:\Users\\AppData\Local\Cypress\Cache\3.3.1\Cypress
PS C:\Users\\Documents\source\repos\cypress> .\node_modules.bin\cypress open

Same problem in our CI process:

Cypress verification timed out.

This command failed with the following output:

/root/.cache/Cypress/3.3.1/Cypress/Cypress --smoke-test --ping=392

----------

Command failed: /root/.cache/Cypress/3.3.1/Cypress/Cypress --smoke-test --ping=392

----------

Platform: linux (Debian - 9.9)
Cypress Version: 3.3.1

CI is a fresh install, I have no issue locally on my dev machine (macOS). This seems consistent with above comments. CI is running Debian FWIW, this doesn't seem OS specific (despite the Windows label).

We will be closing this issue in favor of https://github.com/cypress-io/cypress/issues/4624 in order to direct better focus on the overall problem that is being described in several issues - please add any information about how we can reproduce this bug there. ๐Ÿ™

Was this page helpful?
0 / 5 - 0 ratings

Related issues

simonhaenisch picture simonhaenisch  ยท  3Comments

weskor picture weskor  ยท  3Comments

zbigniewkalinowski picture zbigniewkalinowski  ยท  3Comments

dkreft picture dkreft  ยท  3Comments

brian-mann picture brian-mann  ยท  3Comments