Skip to content

Cypress Tests failing in Headless mode complaining to provided BaseUrl #31208

Open
@MarijaPopovic

Description

@MarijaPopovic

Current behavior

Hello, I’m currently using Cypress to test the login functionality of a running portal. The tests were working perfectly fine when we used the ADFS identity provider. However, after switching to the Auth0 provider, the tests started failing in headless mode(cypress run) but continue to work as expected in headed mode(cypress open).

Cypress throws an error stating that:

Cypress could not verify that this server is running:
...baseUrl
We are verifying this server because it has been configured as your baseUrl.

The link provided under baseUrl is within a VPN that is up and running and the site is accessible when manually tested. Replacing baseUrl with IP address didn't help.

The issue seems to be isolated to headless mode only (headed mode works fine).

Has anyone experienced similar issues when using Auth0 with Cypress in headless mode? Any suggestions on what could be causing this issue or potential solutions would be greatly appreciated!

Desired behavior

Tests should run in headless mode as well as they do in headed

Test code to reproduce

It doesn't reach any test as it is failing after doing cypress:run with mentioned error.
In cypress:open mode it gives this warning where localhost is our baseUrl

Image

Cypress Version

9.6.0

Node version

v16.14.2

Operating System

/

Debug Logs

Other

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions