cypress
cypress copied to clipboard
Integrity failed to find. Resource blocked only in Cypress. Source rewrite not helps
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
In my case cypress.config.ts setting modifyObstructiveCode: false, fix issue still I would like that to work without this settings in future.
experimentalSourceRewriting: true, fixed it for me.
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.
This issue has been closed due to inactivity.
This is still happening with Cypress 14.2.0, with either of the workarounds mentioned above resolving it.