Failed to find a valid digest in the 'integrity' attribute Browser Origin: On your device Last updated 15 Oct 2026

Console: Failed to find a valid digest in the 'integrity' attribute for resource … with computed SHA-256 integrity

A <script> or <link> with an integrity hash was blocked because the downloaded file does not match that hash.

Exact message you may see Failed to find a valid digest in the 'integrity' attributehas been blocked. The resource has an integrity metadataNone of the "sha384" hashes in the integrity attribute match the content of the subresourceintegrity attribute mismatch
Seen on: Chrome Firefox Safari JavaScript

Meaning

Subresource Integrity protects against modified CDN files. The browser prints the actual computed hash. A mismatch means the file changed (new version, different minification), the hash was copied for another URL, or a proxy altered the content. Regenerate the hash for the exact URL you serve.

Common causes

  • CDN file updated and integrity not updated
  • Hash computed for a different URL, version or file
  • Proxy/CDN injecting or minifying content
  • Missing crossorigin="anonymous" on a cross-origin resource
  • Line-ending or encoding changes in a self-hosted file

⚡ Quick fix

  1. Recompute the hash from the exact served file
  2. Add crossorigin="anonymous" to cross-origin resources
  3. Pin the CDN version in the URL

Detailed fix by platform

Linux

  1. curl -s https://cdn.example.com/lib.min.js | openssl dgst -sha384 -binary | openssl base64 -A then use sha384-<output>
  2. Or use srihash.org

JavaScript

  1. <script src="https://cdn.example.com/lib@1.2.3/lib.min.js" integrity="sha384-..." crossorigin="anonymous"></script>

How to diagnose

  1. Hash — Does the computed hash differ from the attribute?
  2. URL — Exact same URL/version?
  3. CORS — crossorigin set?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: On your device. Errors that are often confused with or caused by this one (click to open):

Aw, Snap! — Chrome: Aw, Snap! Something went wrong while displaying this webpage. Error code: STATUS_ACCESS_VIOLATION / SIGILL / Out of Memory (Browser)Aw, Snap!BadDigest — Upload error: checksum mismatch (BadDigest / Content-MD5 did not match / XAmzContentSHA256Mismatch) (API)BadDigestcf-cache-status: DYNAMIC — Cloudflare not caching: cf-cache-status DYNAMIC / BYPASS / MISS every time (Cloudflare)cf-cache-status: DYNA…CSP violation — Refused to load the script because it violates the following Content Security Policy directive (JavaScript)CSP violationDevTools failed to load source map — DevTools: Failed to load source map — Could not load content for https://…/app.js.map: HTTP error: status code 404 (Browser)DevTools failed to lo…module MIME type — Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html" (JavaScript)module MIME typeRefused to apply style from — Console: Refused to apply style from 'https://…/style.css' because its MIME type ('text/html') is not a supported stylesheet MIME type (Browser)Refused to apply styl…Failed to…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.