Cypress: Installing cypress 4.0.2 gives binary permission error on Mac OS

Created on 20 Feb 2020  路  13Comments  路  Source: cypress-io/cypress

When installing 4.0.2 I get this error on Mac OS:

Cypress cannot run because this binary file does not have executable permissions here:

/Users/alexbjorlig/Library/Caches/Cypress/4.0.2/Cypress.app/Contents/MacOS/Cypress

Reasons this may happen:

- node was installed as 'root' or with 'sudo'
- the cypress npm package as 'root' or with 'sudo'

Please check that you have the appropriate user permissions.

----------

Platform: darwin (18.7.0)
Cypress Version: 4.0.2

4.0.1 works fine, but does log this message when opening:

GVA info: Successfully connected to the Intel plugin, offline Gen75 
2020-02-20 11:00:05.527 Cypress Helper (GPU)[87672:2880474] PLClientLogging: unknown permission type 2

Most helpful comment

Can also run cypress cache clear https://on.cypress.io/command-line#cypress-cache-clear

All 13 comments

Did you use sudo to install cypress?

no

Can you run this command, paste the output here
ls -ltr /Users/alexbjorlig/Library/Caches/Cypress/4.0.2/Cypress.app/Contents/MacOS/Cypress

That command is one single line

Responds with -rw------- 1 alexbjorlig staff 207104 14 Feb 23:37 /Users/alexbjorlig/Library/Caches/Cypress/4.0.2/Cypress.app/Contents/MacOS/Cypress

run this command

chmod 755 /Users/alexbjorlig/Library/Caches/Cypress/4.0.2/Cypress.app/Contents/MacOS/Cypress

You should be able to install after that.

After running that command, I get this error:

Cypress failed to start.

This is usually caused by a missing library or dependency.

The error below should indicate which dependency is missing.

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

If you are using Docker, we provide containers with all required dependencies installed.

----------

dyld: Library not loaded: @rpath/Electron Framework.framework/Electron Framework
Referenced from: /Users/alexbjorlig/Library/Caches/Cypress/4.0.2/Cypress.app/Contents/MacOS/Cypress
Reason: no suitable image found.  Did find:
/Users/alexbjorlig/Library/Caches/Cypress/4.0.2/Cypress.app/Contents/MacOS/../Frameworks/Electron Framework.framework/Electron Framework: file too short
/Users/alexbjorlig/Library/Caches/Cypress/4.0.2/Cypress.app/Contents/MacOS/../Frameworks/Electron Framework.framework/Electron Framework: stat() failed with errno=1

----------

Platform: darwin (18.7.0)
Cypress Version: 4.0.2

Your earlier issue has been solved, for the new error just install the missing dependancy files by going to that link mentioned in the error.

@Sumedh-k I don't think the link works? When I paste it into the address bar, I'm redirected to a page with CI setup, with a apt-get snippet. Not exactly useful on a Mac?

Also I'm missing an explanation why this happening for 4.0.2, and _not_ 4.0.1?

As per your file permission it looks like 4.0.2 was installed with sudo which I belive is the cause of all these issues, maybe the other libraries were not installed/accesible properly due to that.

Can you reinstall 4.0.2 by deleting the cache folder first.

If you still get errors after that then wait for someone from the Cypress team to reply.

Hi @Sumedh-k thanks for taking your time to look at this. How do I delete the cache folder?

Remove this /Users/alexbjorlig/Library/Caches/Cypress/

Can also run cypress cache clear https://on.cypress.io/command-line#cypress-cache-clear

Closing as resolved.

If you're experiencing a bug similar to this in Cypress, please open a new issue with a fully reproducible example that we can run. There may be a specific edge case with the issue that we need more detail to fix.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

weskor picture weskor  路  3Comments

egucciar picture egucciar  路  3Comments

zbigniewkalinowski picture zbigniewkalinowski  路  3Comments

Francismb picture Francismb  路  3Comments

jennifer-shehane picture jennifer-shehane  路  3Comments