Skip to main content

Easy Solution for Cypress verification timed out error message

After installing cypress on windows if a user is getting the below error message to open cypress then need to perform step 1 and step 2 to resolve the cypress verification time out issue

Cypress verification timed out.

This command failed with the following output:

C:\Users\Admin\AppData\Local\Cypress\Cache\9.5.2\Cypress\Cypress.exe –smoke-test –ping=952

Command timed out after 100000 milliseconds: C:\Users\Admin\AppData\Local\Cypress\Cache\9.5.2\Cypress\Cypress.exe –smoke-test –ping=952
Timed out

Platform: win32-x64 (10.0.19044)
Cypress Version: 9.5.2

To resolve the above error run below two commands from the command line.

step 1) set CYPRESS_VERIFY_TIMEOUT=100000

step 2) npx cypress verify

✔ Verified Cypress! C:\Users\Admin\AppData\Local\Cypress\Cache\9.5.2\Cypress

After changing the Environment variable value user will be able to open or launch cypress

npx cypress open

Use of the package.json file?

Package.json is a file found in all npm packages and is normally found in the project root.

It contains various metadata about the project.

This file provides information to npm so that it can identify the project and handle its dependencies.

 It can also contain other metadata, such as a project description, the project’s version.

A Node.js project’s package.json file is usually found in the root directory.

This example of package.json file used for writing code using cypress

{“devDependencies”: {“cypress”: “9.5.2”}}

What are devDependencies in the package.json file?

Dependencies are specified with a simple hash of package name to version range. The version range is a string that has one or more space-separated descriptions. Dependencies can also be identified with a tarball or gitUrl.

devDependencies: Packages that are only needed for local development and testing.

What is tarball?

The tarball is a compressed file format. You need to unpack it before running the npm command.

What is "dependencies" in package.json file?

"dependencies": Packages required by your application in production.

How to Configure cypress with Microsoft Visual Editor Code

To configure or set up cypress with Microsoft Code Editor important prerequisite is machine should have cypress and visual editor code installed. Refer Installation of cypress on windows if not installed. You can download and setup Microsoft visual editor code from the official website and perform the setup.

Once both cypress and Editor are available on the machine then perform the below steps.

Step 1) Open Visual Studio Code.

Step 2) Create a new folder to store the project files or Open any existing project folder to store files.

Step 3) Click on New File menu as shown below.

Welcome window Code
New file Code

Step 4) Type package.json and save it.

Step 5) In Package.json file need to mention cypress for dev dependency. To do this we have multiple ways. From Terminal Menu Click on New Terminal Menu. We can use this terminal within IDE.

Open Terminal in Code editor
Terminal within IDE

Step 6) Type command “npm install –save-dev cypress” on Terminal and Wait because this will search for package.json file to install the dev dependencies. so add the below code in a package.json file (use IntelliSense if require to type)

   “devDependencies”: {    “cypress”:”^9.1.1″    }

While writing this blog 9.1.1 was the latest version so use IntelliSense to get the latest version in place of copy-paste.

Save the file and Hit the command “npm install –save-dev cypress” on the terminal.

The terminal will display the below message after installation

PS E:\Cypress Projects> npm install –save-dev cypress
npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should
use the URLSearchParams API instead.

added 163 packages, and audited 164 packages in 49s

24 packages are looking for funding
run npm fund for details

found 0 vulnerabilities
PS E:\Cypress Projects>

devDependencies in package.json file
Installing Cypress Dev Dependencies from Termal using Code Editor.

The above command will install the latest version of cypress within your project.

All helpful methods after pressing dot in code editor are coming from node_modules -> @types -> index.d.ts file.

index.d.ts file from where intellisense is coming from
Successful installation of cypress with dev dependencies within the project folder using the code editor.

Step 7) How to create Cypress package

In Terminal type command “npx cypress open” and press enter.

It will show a message like this

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

✔ Verified Cypress! C:\Users\Admin\AppData\Local\Cypress\Cache\9.1.1\Cypress

Opening Cypress…

In any case, if you receive an error message like

Cypress verification timed out.

This command failed with the following output:

C:\Users\Admin\AppData\Local\Cypress\Cache\9.1.1\Cypress\Cypress.exe –smoke-test –ping=221

Command timed out after 30000 milliseconds: C:\Users\Admin\AppData\Local\Cypress\Cache\9.1.1\Cypress\Cypress.exe –smoke-test –ping=221
Timed out

Platform: win32-x64 (10.0.19043)
Cypress Version: 9.1.1

Solution for the above error is Relaunch cypress one more time. If that doesn’t work then change

VERIFY_TEST_RUNNER_TIMEOUT_MS value to 100000 Which is by default is 30000. ” VERIFY_TEST_RUNNER_TIMEOUT_MS ” is available under verify.js file located “node_modules\cypress\lib\tasks\verify.js” Save the changes and type command “npx cypress open” and press enter.

After successful configuration, the user will see cypress Test runner window like below.

Example Specs by Cypress with industry standards
cypress window after successful configuration and installation with code

Refer to use package.json for more information.

How to Uninstall cypress using windows command line

Step1) Open command Prompt (type cmd in search and press Enter)

Step 2) Type command ” npm uninstall cypress”

The system will start uninstalling cypress and will show the below message.

C:\Users\Admin>npm uninstall cypress

removed 163 packages, and audited 1 package in 15s

found 0 vulnerabilities

Step 3) If you get below error then try to navigate to the directory where cypress is installed from the command line

npm ERR! code EPERM
npm ERR! syscall mkdir
npm ERR! path E:\
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, mkdir ‘E:\’
npm ERR! [Error: EPERM: operation not permitted, mkdir ‘E:\’] {
npm ERR! errno: -4048,
npm ERR! code: ‘EPERM’,
npm ERR! syscall: ‘mkdir’,
npm ERR! path: ‘E:\’
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It’s possible that the file was already in use (by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.”

Step 4) Navigate to the directory where cypress is installed using the cd command in the command line

Step 5) Type command “npm uninstall cypress” and press enter

After a couple of seconds, the system will uninstall cypress and will show the below message.

removed 163 packages, and audited 1 package in 6s

found 0 vulnerabilities

If you want to reinstall cypress from step 1 on windows then follow the article install cypress on windows.

To remove dependencies from the package.json file we can use the command “npm uninstall <name> –save”

This will uninstall cypress and also remove dependencies from the package.json file.

How to Install Cypress on Windows using npm

Users can install cypress on windows by giving the single command “npm install cypress”. But to run this command it is important that npm is installed on the machine.

How to check if npm is installed on the machine or not?

Navigate to command prompt and type command npm -v

If windows show any version then npm is installed on a machine. If no version is specified then follow the article to install npm on windows.

Once NPM is available on windows then type the command “npm install cypress” and press enter.

After successful installation type command “npx cypress –version” and press enter to check if cypress is installed or not.

C:\Users\Admin>npx cypress –version
Cypress package version: 9.1.1
Cypress binary version: 9.1.1
Electron version: 15.2.0
Bundled Node version:

After successful installation of cypress system will create 1 directory node_modules and 1 package.json file.

Where node_module contain multiple folders like below

node_module directory listing
Node Module Cypress Installation Folder

package.json file will look like

package.json file
package.json dependencies

To uninstall cypress from windows using the command line follow this article Uninstall Cypress from Windows command line.

Cypress End-to-end Web automation tool is easy to use.

Cypress is capable to test anything which runs on a chrome browser. The architecture surrounding Cypress is built to handle modern JavaScript frameworks.

Cypress is the best tool to automate web app built on the latest React, Angular, Vue, Elm, etc. frameworks.

Cypress is easy to install just by using the command “npm install cypress”

Do not compare cypress with selenium. Both have different architecture to identify elements. End to end Web automation is possible with cypress. Cypress can perform unit testing, Database Testing, UI Testing.

Cypress is an open-source front-end testing tool built for modern applications.

Cypress is not selenium. Cypress is built with the new architecture. Cypress uses the same run-loop in place of communicating with different drivers like selenium.

Cypress does not depend on third-party drivers.

When users want to automate any project then they have to install Frameworks like mocha, jasmine , QUnit, Karma.

With Assertion libraries like Chai, Expect.JS

Install Selenium. Use of Protractor, Webdriver along with Additional libraries like Sinon, Test Double.

But using Cypress provides an all-in-one in testing framework, assertions library with mocking and stubbing, everything without selenium.

Below are Top 8 Features of Cypress

  1. Time Travel
  2. Real Time Reloads
  3. Spies, Stubs and Clocks
  4. Consistent Results
  5. Debuggability
  6. Automatic Waiting
  7. Network Traffic Control
  8. Screen shot and Videos.

Cypress has support for Chrome-family browsers (including Electron and Chromium-based Microsoft Edge) and Firefox.