Firebase callable function blocked by CORS or 403: wrong region or function not invokable

The browser reports a CORS error calling httpsCallable, usually because the function URL/region is wrong or unauthenticated invocation is blocked.

Exact message you may see Access to fetch at cloudfunctions.net has been blocked by CORS policy callablehttpsCallable CORS errorfunctions/not-found CallableFirebase callable function CORSResponse to preflight request doesn't pass access control check cloudfunctions
Seen on: Firebase JavaScript

Meaning

Initialise the client with the function's region (getFunctions(app, "europe-west1")), make sure the callable exists, and for 2nd gen allow invocations (invoker: "public") and configure cors. A CORS error often hides a 404/403 from the wrong region.

Common causes

  • Function region differs from the client's
  • Function name typo / not deployed
  • 2nd gen function not public
  • Org policy blocks allUsers
  • Wrong emulator port settings

⚡ Quick fix

  1. Pass the correct region to getFunctions
  2. Set invoker: "public"/cors: true for 2nd gen callables
  3. Check the deployed URL in the console

Detailed fix by platform

JavaScript

  1. javascript
    const functions = getFunctions(app, "europe-west1");
    const fn = httpsCallable(functions, "createInvoice");

How to diagnose

  1. Region — Matches?
  2. Invoker — public?
  3. Name — Correct?

🔧 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: Platform & cloud. Errors that are often confused with or caused by this one (click to open):

backend spec — Firebase deploy: User code failed to load. Cannot determine backend specification (Google Cloud / Firebase)backend specCloud Run 403: Your client does not have permission to get URL — Cloud Run: Error: Forbidden — Your client does not have permission to get URL / from this server (Google Cloud / Firebase)Cloud Run 403: Your c…CORS: No Access-Control-Allow-Origin (Cloud Storage) — Browser: Access to fetch at 'https://storage.googleapis.com/bucket/file' from origin 'https://app.example.com' has been blocked by CORS policy (Google Cloud / Firebase)CORS: No Access-Contr…deploy — Firebase Functions deploy failed: Node runtime/engine unsupported or build error (Google Cloud / Firebase)deployDRS — Org policy iam.allowedPolicyMemberDomains blocks the IAM binding (domain restricted sharing) (Google Cloud / Firebase)DRSHttpsError — Firebase callable function error: FirebaseError: internal (unhandled exception in the function) (Google Cloud / Firebase)HttpsErrorInvalid function argument — Terraform: Error: Invalid function argument — Invalid value for "list" parameter: list of string required / Call to function "lookup" failed (Terraform)Invalid function argu…no such function — SQLite: no such function: X (SQL)no such functioncallable …

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.