Cypress won't start, blank screen. Mac m1 - cypress

I recently started getting this error where cypress only shows a blank screen and I can't seem to figure it out yet.
I've tried:
removing/reinstalling node_modules
running yarn
My cypress version in package.json:
"cypress": "^10.3.0",
When I run yarn cypress I get this message, and cypress opens with a blank screen:
objc[35990]: Class WebSwapCGLLayer is implemented in both /System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebCore.framework/Versions/A/Frameworks/libANGLE-shared.dylib (0x222c25b50) and /Users/[username]/Library/Caches/Cypress/10.3.0/Cypress.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libGLESv2.dylib (0x10923d3c8). One of the two will be used. Which one is undefined.

I was able to get it running again, after clearing cypress cache.
npm uninstall -g cypress
npm i -g cypress#10.9
yarn cypress cache clear
yarn install
run with yarn cypress
https://docs.cypress.io/guides/references/troubleshooting#Clear-Cypress-cache

Related

Error executing "npm run test" with cypress

I'm learning cypress, but I came across this error.
When running npm run test the cypress window open for a while, but a couple seconds later it close, then this error appears:
I already installed the lastest cypress version and it didn't work.
Try running cypress cache clear and then npm install cypress --save-dev again.
then try running it with ./node_modules/.bin/cypress open.
Can you try these steps:
Delete node_modules folder
Run npm install -D cypress
Run npx cypress open
SOLVED: The problem was admin permission. When the blank window opened for a while, I clicked on the windows and authorized it again as adm. It worked!
I had authorized as adm before, but I don't know why it was happening.
Thanks you all guys for trying to help me.

Bootstrap does not load into my laravel project through building assets

This is because I am having problems with npm run dev.
I don't get any errors but I don't get the "webpack compiled successfully" message when I run npm run dev.
Here's what the terminal screen looks like when I run the command:
It crashes as shown in the screenshot without getting "webpack compiled successfully".
What do you advise me to do?

Using Yarn to install Cypress fails

I tried installing Cypress via Yarn as the directions specify and am getting the following error.
I also notice not all the usual cypress folders were created.
What am I doing wrong here?
Given
yarn add cypress --dev
yarn run cypress open
Actual
Error
Expect
Cypress to run and have some basic examples
First install the yarn package globally by running npm install -g yarn and restart your terminal.
After you can try with this command:
yarn add cypress

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

Getting an error while installing Cypress.io. I followed the steps in the documentation and still getting the following error:
Cypress cannot run because this binary file does not have executable permissions here:
/Library/Caches/Cypress/6.8.0/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.
You can also try clearing the cache with 'cypress cache clear' and reinstalling.
The folder structure is app/e2e/, and basically right now only contains the yarn.lock & package.json.
Commands I ran were:
yarn init
yarn add cypress
yarn run cypress open
then tried:
sudo yarn add cypress
yarn run cypress open
still didn't work, so then I tried:
cypress cache clear
which still didn't work...
After following a few threads here on SO and some on the cypress repo, here's what helped me, and I hope it helps someone else.
In my case, I deleted the existing e2e folder(probably not needed) and then made a new e2e folder inside my app and then ran the following:
yarn init
yarn add cypress
yarn run cypress install // this was the key
yarn run cypress open
Now I get all the base files that come with a fresh install of cypress.

Percy - Cypress - Error: Could not find browser revision 756035. Run "npm install" or "yarn install" to download a browser binary

Im trying to set up a simple visual test with cypress and Percy.
Following the tutorial I installed percy as part of my cypress package, however when I attempt to run.
npx percy exec -- cypress run. I am met with the message:
Error: Could not find browser revision 756035. Run "npm install" or "yarn install" to download a browser binary.
Anyone else had this issue?
May be worth noting, when I run npx cypress run, the tests run as expected.
Something went wrong with npm install process, most likely the decompress failed which does not return a error.
Easiest way is to remove node_modules and install again.

Resources