Skip to content

Firebase Storage errorFirebase Storage: storage/no-default-bucket

storage/no-default-bucket is the Firebase Storage error when the app was initialized without a storageBucket value. The SDK has no default bucket, so getStorage() succeeds but the first ref() or upload call throws.

Short answer

Open the Firebase console, go to Storage, and copy the bucket name. Put it in storageBucket in the Firebase config, check that the production build gets the same value from its environment variables, and rebuild. If Storage was never set up, set it up first, which needs the Blaze plan.

Rather not fix it yourself? App Fix Ticket starts with a fixed-price diagnosis, then a fixed price for the fix before any fix work.

Why there is no bucket, and the fix

  1. 01

    storageBucket is missing from the config

    “You must specify your Cloud Storage bucket name when initializing the JavaScript SDK.” Firebase, Get started with Cloud Storage on Web

    A config copied before Storage was set up, or trimmed by hand, has no bucket. Add the exact name shown in the console.

    const app = initializeApp({
      apiKey: 'your-api-key',
      projectId: 'your-project',
      storageBucket: 'your-project.firebasestorage.app',
    });
    const storage = getStorage(app);
  2. 02

    The production build lacks the env variable

    Works locally, fails live: the hosting provider has no VITE_ or NEXT_PUBLIC_ variable for the bucket, so the value is undefined. Add it there and redeploy.

  3. 03

    The bucket name format is wrong

    “Depending on when you created your default bucket, the bucket name will be in one of the following formats:” Firebase, Get started with Cloud Storage on Web

    Default buckets created since September 2024 use the firebasestorage.app format; older ones use appspot.com. Copy the name from the console instead of guessing.

  4. 04

    Storage was never set up

    “To provision a new Cloud Storage for Firebase default bucket, your Firebase project must be on the pay-as-you-go Blaze pricing plan.” Firebase, Cloud Storage for Firebase FAQ (September 2024 changes)

    Also check: if the console shows no bucket, create it under Storage. A new default bucket needs the Blaze plan.

Checked against the vendor’s docs on : Firebase docs: Handle errors for Cloud Storage on Web; Firebase docs: Get started with Cloud Storage on Web; Firebase docs: Storage changes FAQ.

Rather hand it over?

Fixed scope, fixed price, paid upfront. The work happens in writing; no call needed.

“Very responsive, attentive to fixing bugs, and completed the project as needed! Thank you!”
A buyer in the United States, July 2022. Shopify on Fiverr
All 127 Fiverr reviews

Related: Firebase Storage requires the Blaze plan · Firebase storage/unauthorized · Firebase storage/object-not-found · Firebase No Firebase App [DEFAULT]

Questions

More on this error

Can I use a bucket other than the default?

Yes. Pass its gs:// URL as the second argument to getStorage, and the default bucket setting no longer matters for those calls.

Does Spark plan still work for Storage?

No. Since the September 2024 changes, Cloud Storage for Firebase needs the Blaze plan, even for default buckets. Blaze still includes no-cost usage.

Can you fix it for me?

If one bug is the whole problem, the App Fix Ticket covers it: a written diagnosis first, then the fix. If the app has more going on, the Launch Check is a written check of the whole app. Each issue found is rated critical, high, medium or low, with where it is and how it was confirmed. No issues worth fixing, no charge. If the Launch Check finds nothing rated medium or higher, Simon refunds the full $450. You keep the report either way. This applies to the first 10 Launch Checks bought after October 30, 2026.

A different error?

Describe it and get a written quote

Send the error and what you were doing. You get a written scope, a fixed price and a timeline; Simon replies by email, usually within one business day.