cross-origin error React Origin: On your device OSI layer 7 · Application Last updated 14 Oct 2026

Error: A cross-origin error was thrown. React doesn't have access to the actual error object in development.

An error happened in a script loaded from another origin, so the browser hid the details from React.

Exact message you may see A cross-origin error was thrownReact doesn't have access to the actual error object
Seen on: React

Meaning

Development builds served from a different port/host or scripts without crossorigin hide error details. Often seen with CDN React builds or source-map/devtools setups.

Common causes

  • Scripts loaded cross-origin without crossorigin="anonymous"
  • Code evaluated via eval-based source maps in some setups

⚡ Quick fix

  1. Serve scripts same-origin in development
  2. Add crossorigin="anonymous" and CORS headers on the script host
  3. Check the browser console for the original error

Detailed fix by platform

React

  1. <script crossorigin src="https://unpkg.com/react@18/umd/react.development.js"></script>

How to diagnose

  1. Source — Which script origin?
  2. Recent change — Did it start after a deploy, upgrade, or configuration change? Compare with the last working version.

🔧 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):

blocked a frame — SecurityError: Blocked a frame with origin "x" from accessing a cross-origin frame. (JavaScript)blocked a frameCORS — CORS Error: No 'Access-Control-Allow-Origin' header is present (API)CORSCSP violation — Refused to load the script because it violates the following Content Security Policy directive (JavaScript)CSP violationMinified React error — Error: Minified React error #31; visit https://react.dev/errors/31 for the full message (React)Minified React errorMixed Content — Mixed Content: The page was loaded over HTTPS, but requested an insecure resource (API)Mixed ContentSameSite cookie blocked — This Set-Cookie was blocked because it had the "SameSite=Lax" attribute but came from a cross-site response / SameSite=None requires Secure (Authentication)SameSite cookie block…Script error. — Script error. (at line 0) — cross-origin error details hidden (JavaScript)Script error.cross-ori…

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.