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.
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 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
- Pass the correct region to
getFunctions - Set
invoker: "public"/cors: truefor 2nd gen callables - Check the deployed URL in the console
Detailed fix by platform
JavaScript
- javascript
const functions = getFunctions(app, "europe-west1"); const fn = httpsCallable(functions, "createInvoice");
How to diagnose
- Region — Matches?
- Invoker — public?
- 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:
Similar errors
- backend spec Firebase deploy: User code failed to load. Cannot determine backend specification
- Cloud 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
- 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
Most viewed in Google Cloud / Firebase
- Missing or insufficient permissions Firestore: FirebaseError: [code=permission-denied]: Missing or insufficient permissions
- Container failed to start Cloud Run: The user-provided container failed to start and listen on the port defined provided by the PORT=8080 environment variable
- 409: The resource already exists Compute Engine: ERROR: (gcloud.compute.instances.create) Could not fetch resource: The resource 'projects/p/zones/z/instances/vm-1' already exists
Other ways to find it
Where this error sits
Origin: Platform & cloud. Errors that are often confused with or caused by this one (click to open):
🧠 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.
Report a correction or suggest an improvement
Last updated 18 Nov 2026