Skip to content

Setting CYPRESS_ENV to something other than production returns a cryptic error #1978

Closed
@MichaelHindley

Description

@MichaelHindley

Current behaviour:

If you invoke cypress.run() with record: true with the CYPRESS_ENV env variable set to something different than production, Cypress will fail with a cryptic message:

Warning: We encountered an error talking to our servers.

This run will not be recorded.

This error will not alter the exit code.

RequestError: Error: Invalid URI "/runs"

Desired behavior:

Warning: You are trying to record a test run in a non-production environment.  
This is not supported and this run will not be recorded.

Check the CYPRESS_ENV variable if behaviour is undesirable in the context of this run.

This warning will not alter the exit code.

Steps to reproduce:

Run Cypress with CYPRESS_ENV set to something like dev, with record: true and key: 'key'

Versions

3.0.1 on

  • macOS 10.13.5
  • Debian 8

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: duplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions