Skip to content

'Cypress could not verify that this server is running' error with baseUrl in component test after updating to v13 #27990

@nik2202

Description

@nik2202

Current behavior

In the UI it displays the warning "cannot connect base url"
image
But here it is possible to ignore and execute the tests.

With the CLI it fails:
image

Desired behavior

Before I updated it to version 13 it was working and it was not required to define the baseUrl for component tests. And the command npx nx component-test core-tables works without problems

Test code to reproduce

import { defineConfig } from 'cypress';
import { nxComponentTestingPreset } from '@nrwl/angular/plugins/component-testing';

export default defineConfig({
  component: {
    ...nxComponentTestingPreset(__filename),
    video: false,
    reporter: '../../../node_modules/cypress-multi-reporters',
    reporterOptions: {
      configFile: 'reporter.json'
    },
    screenshotsFolder: '../../../dist/cypress/libs/reports/mochawesome/screenshots/about'
  }
});

Cypress Version

13.2.0

Node version

v18.15.0

Operating System

Windows 10

Debug Logs

> nx run core-tables:component-test

DevTools listening on ws://127.0.0.1:59615/devtools/browser/3a1d1242-0013-46a8-9bd2-6d4ea7994825
Browserslist: caniuse-lite is outdated. Please run:
  npx update-browserslist-db@latest
  Why you should do it regularly: https://github.com/browserslist/update-db#readme
- Generating browser application bundles (phase: setup)...
Cypress could not verify that this server is running:

  > http://localhost:8080

We are verifying this server because it has been configured as your baseUrl.

Cypress automatically waits until your server is accessible before running tests.

We will try connecting to it 3 more times...
We will try connecting to it 2 more times...
We will try connecting to it 1 more time...

Browserslist: caniuse-lite is outdated. Please run:
  npx update-browserslist-db@latest
  Why you should do it regularly: https://github.com/browserslist/update-db#readme
Cypress failed to verify that your server is running.

Please start this server and then run Cypress again.

Other

nx version: 15.7.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    CTIssue related to component testingstage: needs informationNot enough info to reproduce the issuestaleno activity on this issue for a long periodtype: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions