Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cypress - Failed to deserialize the V8 snapshot blob

Tags:

cypress

When trying to run Cypress for the first time in Visual Studio code, I receive the following output:

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

  ×  Verifying Cypress can run C:\Users\username\AppData\Local\Cypress\Cache\6.4.0\Cypress
    → Cypress Version: 6.4.0
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.

----------

#
Fatal error in , line 0
Failed to deserialize the V8 snapshot blob. This can mean that the snapshot blob file is corrupted or missing.

How can this issue be resolved so that Cypress will run and execute the tests for the application?

like image 582
dwilli Avatar asked Feb 23 '21 19:02

dwilli


2 Answers

You can also prune your cache since this is a know problem for many versions.

./node_modules/.bin/cypress cache clear

Then run

./node_modules/.bin/cypress install --force

This worked for me.

Windows (10 in my case) users: to run the commands above you have to allow scripts execution policies with Set-ExecutionPolicy RemoteSigned -Scope Process issued at your terminal. The terminal must run with admin privileges for this.

like image 129
Pablo Vahanian Avatar answered Oct 24 '22 22:10

Pablo Vahanian


I found the solution that worked in my case in this GitHub issue

The solution was to rename the Cypress cache and then reinstall Cypress from the application directory.

On Windows, the Cypress cache is in \AppData\Local\Cypress\Cache

npm install cypress
like image 35
dwilli Avatar answered Oct 24 '22 22:10

dwilli