Warning for 'integrity' attribute, unknown error while trying to verify integrity with `experimentalSourceRewriting` on
See original GitHub issueTest code to reproduce the issue
it('fails to pass SRI', function () {
cy.visit('https://mail.protonmail.com/login')
})
Current behavior:
When running Cypress against the site, resources on the page are immediately blocked due to invalid hashes and Cypress crashing.
Console error:
Versions:
Cypress 4.6.0 Chrome 81.0.4044.138 macOS Catalina 10.15.13
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Blazor WebAssembly Application fails to load due to integrity ...
Unknown error occurred while trying to verify integrity. Failed to load resource: the server responded with a status of 403 (forbidden); Failed ...
Read more >Unknown error occurred while trying to verify Failed to find a ...
Unknown error occurred while trying to verify Failed to find a valid digest in the 'integrity' attribute for resource wth computed SHA-256 integrity....
Read more >Changelog - Cypress Documentation
Configuring a custom browser no longer logs a warning when trying to use that ... This fixes spawn UNKNOWN errors when launching Cypress...
Read more >i have faced an error on blazor webassembly when i refresh ...
Failed to find a valid digest in the 'integrity' attribute for resource ... login:1 Unknown error occurred while trying to verify integrity.
Read more >cli/types/cypress.d.ts - Fossies
1484 * Invoking by a property path will always result in any. ... NOTE: Setting this flag to true removes Subresource Integrity (SRI)....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for opening an issue and providing a reproducible example!
I can recreate the issue and verify that passing
experimentalSourceRewriting
totrue
does not resolve the original integrity issue from #2393.4.6.0 with
experimentalSourceRewriting: false
Script tags
4.6.0 with
experimentalSourceRewriting: true
Script tags
The SHA’s are actually the same in the stripped version as the non-stripped.
I suppose we could attempt to rewrite all calls to
window.fetch
andfetch
so that theintegrity
property is ignored (withexperimentalSourceRewriting: true
). Outside of that, I don’t see a solution.