How to fix storage/invalid-event-name: Event name must be running, progress, or pause in Firebase

FirebaseINTERMEDIATEMEDIUMUpdated Dec 12, 2025· 107 views

Firebase Storage throws this error when you subscribe to upload task updates with an unsupported event label. The SDK only recognizes the built-in state listeners that report running, paused, or progress updates, so any other event string triggers the invalid-event-name payload.

Quick fix

Fixes storage/invalid-event-name

const uploadTask = storageRef.put(file);

uploadTask.on(
  "progress",
  (snapshot) => {
    const pct = (snapshot.bytesTransferred / snapshot.totalBytes) * 100;
    console.log(`Upload is ${pct.toFixed(1)}% complete`);
  },
  (error) => console.error("Upload listener failed", error),
  () => console.log("Upload completed")
);
  1. Use the federated UploadTask listeners that Firebase Storage documents
  2. Double-check wrapper libraries and bindings
  3. Consolidate your listeners behind the documented TaskState enums
firebase — error
const uploadTask = storageRef.put(file);
uploadTask.on(
"progress",
(snapshot) => {
const pct = (snapshot.bytesTransferred / snapshot.totalBytes) * 100;
console.log(`Upload is ${pct.toFixed(1)}% complete`);
},
(error) => console.error("Upload listener failed", error),
() => console.log("Upload completed")
);
storage/invalid-event-name: Event name must be running, progress, or pause

What this error means

You are passing a literal event name to Firebase Storage's upload listener that the SDK does not understand. UploadTask events are limited to the names that describe the task state transitions (for example "running", "pause", or "progress") so that the storage client can map each handler to the correct progress callback. Trying to use other labels—like "state_changed", "resume", or a custom string—throws the FirebaseError with code storage/invalid-event-name because the listener registry only knows about the three supported events.

Typical symptoms

  • The upload immediately rejects and the caught FirebaseError reads: "storage/invalid-event-name: Event name must be running, progress, or pause"
  • Your progress observer never fires and you see the error stack trace pointing at UploadTask.on()
  • Uploads still succeed on the backend, but the SDK aborts the listener setup
  • This happens every time you try to watch for resumable uploads across web, React Native, or Node.js

Common causes

  1. Passing a typo or unsupported string instead of one of the three allowed event labels
  2. Copy/pasting listener code from other Firebase products that expect event names such as "state_changed"
  3. Using a wrapper library (AngularFire, React Native Firebase) without checking which event label it forwards to the underlying SDK
  4. Trying to subscribe to a custom event when you actually need to respond to one of the built-in upload task states

How to fix "storage/invalid-event-name: Event name must be running, progress, or pause"

1Use the federated UploadTask listeners that Firebase Storage documents

Always call UploadTask.on with one of the supported labels and attach your callbacks to that event. The web SDK exposes the progress, running, and pause states, so your listener should look like this:

ts
const uploadTask = storageRef.put(file);

uploadTask.on(
  "progress",
  (snapshot) => {
    const pct = (snapshot.bytesTransferred / snapshot.totalBytes) * 100;
    console.log(`Upload is ${pct.toFixed(1)}% complete`);
  },
  (error) => console.error("Upload listener failed", error),
  () => console.log("Upload completed")
);

Replace "progress" with "running" or "pause" if you need to monitor that specific state; do not invent new event names or fall back to deprecated labels.

2Double-check wrapper libraries and bindings

Frameworks like AngularFire, React Native Firebase, or native wrappers often re-expose the upload task API but may translate your event names before hitting the SDK. Locate the wrapper that builds the observer or onStateChanged call and ensure it forwards one of the supported strings. If you're calling the wrapper with a custom event (or using a shorthand like task.on("state_changed")), switch to the library's progress helper or explicitly pass "progress", "running", or "pause" so the underlying SDK does not throw the invalid-event-name error.

3Consolidate your listeners behind the documented TaskState enums

Avoid hand-typed strings by importing the Firebase Storage enum helpers. The reference doc lists the states you can expect (TaskState) and keeps the permitted values centralized. For example:

ts
import { TaskState } from "firebase/storage";

uploadTask.on(TaskState.Progress, ...); // TypeScript enum maps to "progress"

Using the enum also prevents typos ("progres" or "paused") and automatically updates if Firebase ever renames the constants, which keeps your listener code aligned with the supported event names.

Frequently asked questions

What does "storage/invalid-event-name" mean?
You are passing a literal event name to Firebase Storage's upload listener that the SDK does not understand. UploadTask events are limited to the names that describe the task state transitions (for example "running", "pause", or "progress") so that the storage client can map each handler to the correct progress callback. Trying to use other labels—like "state_changed", "resume", or a custom string—throws the FirebaseError with code storage/invalid-event-name because the listener registry only knows about the three supported events.
How do I fix "storage/invalid-event-name"?
Firebase Storage throws this error when you subscribe to upload task updates with an unsupported event label. The SDK only recognizes the built-in state listeners that report running, paused, or progress updates, so any other event string triggers the invalid-event-name payload.
What causes "storage/invalid-event-name"?
Passing a typo or unsupported string instead of one of the three allowed event labels Copy/pasting listener code from other Firebase products that expect event names such as "state_changed" Using a wrapper library (AngularFire, React Native Firebase) without checking which event label it forwards to the underlying SDK
Is the "storage/invalid-event-name" error serious?
It is a medium-severity error — more of a blocker than a risk. The steps above resolve it.

Official resources & further reading