cypress icon indicating copy to clipboard operation
cypress copied to clipboard

Integrity failed to find. Resource blocked only in Cypress. Source rewrite not helps

Open senpl opened this issue 1 year ago • 2 comments

Current behavior

Cypress behaves different then browsers. Fails during integrity check. experimentalSourceRewriting: true not solve issues, make errors even worse.

Desired behavior

Cypress behaves like browsers. Load contents and connect to websocket.

Test code to reproduce

Just go to page : cy.visit('https://bmw.autobid.de/'+"en", {failOnStatusCode:false}) Error will appear in console. I produce repro with example of reproduction at: https://github.com/senpl/cypressReproIntegrityBug.git They are not present in browsers.

Cypress Version

13.6.6

Node version

v21.6.1

Operating System

Windows 11

Debug Logs

Failed to find a valid digest in the 'integrity' attribute for resource 'https://bmw.autobid.de/_nuxt/entry.2_-sANE9.js' with computed SHA-384 integrity 'M/xDBO3gmY8W3Hyw50moNlEq8UTXSAurEe0vCcVS3w9yifQYw82fntJQ3gIUnuDN'. The resource has been blocked.

Other

Cypress_ySMzHpBS31

senpl avatar Mar 12 '24 08:03 senpl

In my case cypress.config.ts setting modifyObstructiveCode: false, fix issue still I would like that to work without this settings in future.

senpl avatar Apr 22 '24 07:04 senpl

experimentalSourceRewriting: true, fixed it for me.

pitgrap avatar Jun 26 '24 10:06 pitgrap

This issue has not had any activity in 180 days. Cypress evolves quickly and the reported behavior should be tested on the latest version of Cypress to verify the behavior is still occurring. It will be closed in 14 days if no updates are provided.

cypress-app-bot avatar Dec 24 '24 01:12 cypress-app-bot

This issue has been closed due to inactivity.

cypress-app-bot avatar Jan 07 '25 01:01 cypress-app-bot

This is still happening with Cypress 14.2.0, with either of the workarounds mentioned above resolving it.

colin0117 avatar Mar 26 '25 10:03 colin0117