Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
blindahl opened this issue May 26, 2020 · 9 comments · Fixed by #7555
Assignees
Labels
type: regression A bug that didn't appear until a specific Cy version release v4.6.0 🐛 Issue present since 4.6.0

Comments

@blindahl
Copy link

blindahl commented May 26, 2020

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<username>\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.

@alekspog
Copy link

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

@CKuB
Copy link

CKuB commented May 26, 2020

Same problem while migrating to 4.6 trying to use

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

@ykelanemer
Copy link

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.

@blindahl
Copy link
Author

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.

@jennifer-shehane
Copy link
Member

jennifer-shehane commented May 29, 2020

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 #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

@jennifer-shehane jennifer-shehane added the v4.6.0 🐛 Issue present since 4.6.0 label May 29, 2020
@cypress-bot cypress-bot bot added the stage: needs investigating Someone from Cypress needs to look at this label May 29, 2020
@jennifer-shehane jennifer-shehane added type: regression A bug that didn't appear until a specific Cy version release stage: needs investigating Someone from Cypress needs to look at this and removed stage: needs investigating Someone from Cypress needs to look at this labels May 29, 2020
@chrisbreiding chrisbreiding self-assigned this May 29, 2020
@cypress-bot cypress-bot bot added stage: work in progress stage: needs review The PR code is done & tested, needs review and removed stage: needs investigating Someone from Cypress needs to look at this stage: work in progress labels Jun 1, 2020
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jun 2, 2020

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.

@cypress-bot cypress-bot bot removed the stage: needs review The PR code is done & tested, needs review label Jun 2, 2020
@cnasikas
Copy link

cnasikas commented Jun 2, 2020

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

@jennifer-shehane
Copy link
Member

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

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jun 8, 2020

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.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Jun 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: regression A bug that didn't appear until a specific Cy version release v4.6.0 🐛 Issue present since 4.6.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants