Cypress: Request cannot be constructed from a URL that includes credentials: /__cypress/runner/./wasm/mappings.wasm

Created on 26 May 2020  路  9Comments  路  Source: cypress-io/cypress

Current behavior:

When upgrading to 4.6.0 (worked with 4.4.1 and 4.5.0) we get the following error:
image
with our Angular (v8) stopped working.

Desired behavior:

Cypress working at all.

Test code to reproduce

in .npmrc we have

CYPRESS_INSTALL_BINARY=<proxy url to cdn to download 4.6.0 win32-x64 zip>

CYPRESS_CRASH_REPORTS=0

Our cypress.json file:

{
  "fixturesFolder": "cypress/fixtures",
  "integrationFolder": "cypress/integration",
  "pluginsFile": "cypress/plugins/index.js",
  "screenshotsFolder": "cypress/screenshots",
  "videosFolder": "cypress/videos",
  "supportFile": "cypress/support/index.js",

  "baseUrl": "http://username:password@localhost:4200/",
  "viewportWidth": 1400,
  "viewportHeight": 1024,
  "defaultCommandTimeout": 15000
}

with cypress folder placed outside the webapp folder.


The only version in

C:\Users\\AppData\Local\Cypress\Cache

is v4.6.0.

Versions

Cypress 4.6.0
Doesn't work in either Electron, Chrome or Firefox.
Running in Windows 10.

regression v4.6.0

Most helpful comment

The code for this is done in cypress-io/cypress#7555, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

All 9 comments

We meet the same issue with cypress 4.6.0 when try to use basic auth in url

Same problem while migrating to 4.6 trying to use

CYPRESS_baseUrl=http://username:password@localhost:8080

Just upgraded cypress to 4.6.0 my tests stopped working because I have basic auth in the url.
When I run the same test with 4.4.1, it passes.

Anyone verified if the issue is still there in 4.7.0? Haven't had time to do it myself but didn't see anything about it in the channels I think.

I can easily recreate this with the following:

spec.js

// completely empty spec file

cypress.json

{
  "baseUrl": "http://username:password@localhost:4200/"
}

Stack trace

I see some wasm related things in our source_map_utils that were added as part of https://github.com/cypress-io/cypress/pull/3930 which I think it likely related: https://github.com/cypress-io/cypress/blob/develop/packages/driver/src/cypress/source_map_utils.js#L14:L14

Screen Shot 2020-05-29 at 5 37 57 PM

cypress_runner.js:185076 TypeError: The following error originated from your test code, not from Cypress.

  > Failed to execute 'fetch' on 'Window': Request cannot be constructed from a URL that includes credentials: /__cypress/runner/./wasm/mappings.wasm

When Cypress detects uncaught errors originating from your test code it will automatically fail the current test.

Cypress could not associate this error to any specific test.

We dynamically generated a new test to display this failure.

Check your console for the stack trace or click this message to see where it originated from.
    at readWasm (http://username:password@localhost:4200/__cypress/runner/cypress_runner.js:133978:12)
    at wasm (http://username:password@localhost:4200/__cypress/runner/cypress_runner.js:136683:16)
    at http://username:password@localhost:4200/__cypress/runner/cypress_runner.js:134277:14
From previous event:
    at Object.initializeSourceMapConsumer (http://username:password@localhost:4200/__cypress/runner/cypress_runner.js:162277:18)
    at extractSourceMap (http://username:password@localhost:4200/__cypress/runner/cypress_runner.js:161406:26)
From previous event:
    at Object.runScripts (http://username:password@localhost:4200/__cypress/runner/cypress_runner.js:161426:6)
    at $Cypress.onSpecWindow (http://username:password@localhost:4200/__cypress/runner/cypress_runner.js:152436:20)

Workaround

Downgrade to 4.5.0

The code for this is done in cypress-io/cypress#7555, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

Anyone verified if the issue is still there in 4.7.0? Haven't had time to do it myself but didn't see anything about it in the channels I think.

Same for 4.7.0

This exists in 4.6.0 and 4.7.0, it will be fixed in our next release.

Released in 4.8.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v4.8.0, please open a new issue.

Was this page helpful?
0 / 5 - 0 ratings