How to fix functions/not-found in Firebase

FirebaseBEGINNERMEDIUMUpdated Dec 22, 2025· 115 views

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
  1. Verify the function is deployed
  2. Deploy the function
  3. Verify function name matches in client code
  4. Fix emulator endpoint for local development
firebase — error
firebase deploy --only functions
functions/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

  1. Function has not been deployed yet (most common)
  2. Function name in client code does not match deployed function name
  3. Function was deleted or renamed without updating client code
  4. Using incorrect emulator endpoint when calling functions locally
  5. Cloud Functions or Cloud Build API is not enabled in Google Cloud
  6. Build failed silently during deployment (check deploy logs)

How to fix "functions/not-found"

1Verify the function is deployed

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.

2Deploy the function

If the function is not deployed, deploy it using the Firebase CLI:

bash
firebase deploy --only functions

To deploy a specific function:

bash
firebase deploy --only functions:myFunctionName

Wait for the deployment to complete. You should see output like:

bash
✔  Deploy complete!
3Verify function name matches in client code

Check that the function name in your client code exactly matches the deployed function name.

In your functions/index.ts (backend):

typescript
export const helloWorld = functions.https.onCall((data, context) => {
  return { message: "Hello from Firebase!" };
});

In your client code:

typescript
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.

4Fix emulator endpoint for local development

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:

typescript
useFunctionsEmulator(functions, "localhost", 5001);

Use:

typescript
if (process.env.NODE_ENV === "development") {
  connectFunctionsEmulator(functions, "localhost", 5001);
}

Or use the full project-specific URL:

typescript
const helloWorld = httpsCallable(
  functions,
  "helloWorld",
  { timeout: 10000 }
);

Start the emulator with:

bash
firebase emulators:start --only functions
5Enable required Google Cloud APIs

Ensure 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.

6Check deployment logs for silent failures

If the deploy command succeeds but the function is not callable, check the build logs:

bash
firebase functions:log

Or 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