How to fix functions/not-found in Firebase
Firebase returns a "functions/not-found" error when a callable function does not exist or has not been deployed. This typically means the function name is mismatched, the function was deleted, or the deployment failed silently.
Quick fix
Fixes functions/not-found
firebase deploy --only functions- Verify the function is deployed
- Deploy the function
- Verify function name matches in client code
- Fix emulator endpoint for local development
firebase deploy --only functionsfunctions/not-found
What this error means
The "functions/not-found" error occurs when your client code attempts to call a Firebase Cloud Function that either does not exist on the server, has not been deployed, or cannot be found at the specified location. This is a 404 Not Found error that can happen during development (using the emulator), testing, or in production. The error indicates that the Firebase backend cannot locate the function endpoint you are trying to reach, which prevents the function from executing.
Typical symptoms
- Callable functions return a 404 error when invoked from client code
- Error message shows "Error: 404 Not Found" or "functions/not-found"
- Functions work in production but fail in the Firebase emulator
- Function calls hang and then timeout without completing
- Recently deployed functions are not accessible via their endpoints
Common causes
- Function has not been deployed yet (most common)
- Function name in client code does not match deployed function name
- Function was deleted or renamed without updating client code
- Using incorrect emulator endpoint when calling functions locally
- Cloud Functions or Cloud Build API is not enabled in Google Cloud
- Build failed silently during deployment (check deploy logs)
How to fix "functions/not-found"
Check the Firebase Console to confirm your function exists and is deployed.
1. Go to [Firebase Console](https://console.firebase.google.com)
2. Select your project
3. Navigate to Functions
4. Look for your function name in the list
5. Confirm it shows a green checkmark and is in a "Deployed" state
If the function is not listed, proceed to step 2.
If the function is not deployed, deploy it using the Firebase CLI:
firebase deploy --only functionsTo deploy a specific function:
firebase deploy --only functions:myFunctionNameWait for the deployment to complete. You should see output like:
✔ Deploy complete!Check that the function name in your client code exactly matches the deployed function name.
In your functions/index.ts (backend):
export const helloWorld = functions.https.onCall((data, context) => {
return { message: "Hello from Firebase!" };
});In your client code:
import { getFunctions, httpsCallable } from "firebase/functions";
const functions = getFunctions();
const helloWorld = httpsCallable(functions, "helloWorld"); // Must match exactly
await helloWorld({ data: "test" });Function names are case-sensitive.
If you are using the Firebase emulator and getting a 404 error, use the complete function URL instead of just the emulator host.
Instead of:
useFunctionsEmulator(functions, "localhost", 5001);Use:
if (process.env.NODE_ENV === "development") {
connectFunctionsEmulator(functions, "localhost", 5001);
}Or use the full project-specific URL:
const helloWorld = httpsCallable(
functions,
"helloWorld",
{ timeout: 10000 }
);Start the emulator with:
firebase emulators:start --only functionsEnsure the necessary APIs are enabled in your Google Cloud project:
1. Go to [Google Cloud Console](https://console.cloud.google.com)
2. Select your project
3. Navigate to APIs & Services > Enabled APIs & services
4. Search for and enable these APIs:
- Cloud Functions API
- Cloud Build API
- Cloud Logging API
If deploying functions that use Firebase Services (Messaging, Database, etc.), also enable the corresponding APIs in the Cloud Console.
If the deploy command succeeds but the function is not callable, check the build logs:
firebase functions:logOr check the Cloud Build logs in the Google Cloud Console:
1. Go to [Google Cloud Console](https://console.cloud.google.com)
2. Navigate to Cloud Build > History
3. Look for your recent builds
4. Click on a failed build to see error details
Common build failures include:
- TypeScript compilation errors
- Missing dependencies in package.json
- Runtime errors in function initialization
Advanced notes
For Express-based Cloud Functions, ensure your routes match the incoming requests. Firebase passes requests with an empty string as the path when accessing the function directly (without a trailing slash), so you may need to normalize the request URL. Additionally, if serving functions through Firebase Hosting rewrites, ensure your firebase.json rewrite rules are ordered correctly—Hosting applies the first matching rule, so more specific rules should come before general ones.
Frequently asked questions
- What does "functions/not-found" mean?
- The "functions/not-found" error occurs when your client code attempts to call a Firebase Cloud Function that either does not exist on the server, has not been deployed, or cannot be found at the specified location. This is a 404 Not Found error that can happen during development (using the emulator), testing, or in production. The error indicates that the Firebase backend cannot locate the function endpoint you are trying to reach, which prevents the function from executing.
- How do I fix "functions/not-found"?
- Firebase returns a "functions/not-found" error when a callable function does not exist or has not been deployed. This typically means the function name is mismatched, the function was deleted, or the deployment failed silently.
- What causes "functions/not-found"?
- Function has not been deployed yet (most common) Function name in client code does not match deployed function name Function was deleted or renamed without updating client code
- Is the "functions/not-found" error serious?
- It is a medium-severity error — more of a blocker than a risk. The steps above resolve it.
Official resources & further reading
- 📚Firebase Official Documentation
- 📖firebase.google.com - get started(Official Docs)
- 📖firebase.google.com - FirebaseFunctionsException.Code(Official Docs)
- 🐙github.com - 2329(GitHub)
- 🐙github.com - 1454(GitHub)
- 📖firebase.google.com - full config(Official Docs)