App Finishers

Fix guide · updated 2026-11-16

Supabase Storage "Bucket not found"

{"statusCode":"404","error":"Bucket not found","message":"Bucket not found","code":"NoSuchBucket"}

Your app's images don't show, or an upload fails, and opening the file's address shows {"statusCode":"404","error":"Bucket not found"}. Often the bucket is right there in your dashboard. We ran Supabase Storage ourselves (version 1.95, November 2026) and tried the usual mistakes: it answers "Bucket not found" in three situations, and in one of them the bucket exists but is private. Here's how to tell which one you have, and the fix.

What the error means

Supabase Storage looks a bucket up by its exact name. It answers "Bucket not found" when:

Despite the "404" in the message, the HTTP status is 400, so your browser's console shows 400 (Bad Request). That's normal for Supabase Storage: the real status sits in statusCode.

The one-minute check

In the Supabase dashboard, open the SQL Editor and run:

select id, name, public from storage.buckets;

This lists every bucket with its exact name and whether it's public. Now find the bucket name your app uses: in the code it's supabase.storage.from('avatars'), and in a failing file address it comes right after /public/, like https://abcdefghijklmnop.supabase.co/storage/v1/object/public/avatars/photo.png. The part before .supabase.co is the project that answered: it must match the reference in your dashboard's address, after /project/.

1. Images don't show: a public link to a private bucket

getPublicUrl() never asks Supabase anything: it only writes an address, so it can't fail and it can't warn you. If the bucket is private, which is the default for new buckets, that address answers "Bucket not found" to everyone, you included. It's the most common version of this error: the upload works, the check above shows the bucket with public = false, and every image is broken.

First decide: should anyone with the link be able to see these files? Profile pictures, product photos and blog images, usually yes. Then make the bucket public: in Storage, edit the bucket and turn on Public bucket, or run:

update storage.buckets set public = true where id = 'avatars';

Public only opens reading. Uploads and deletes still need your storage policies.

For private files (invoices, ID scans, anything personal), keep the bucket private and give each viewer a link that expires:

const { data, error } = await supabase.storage
  .from('documents')
  .createSignedUrl(path, 60 * 60);   // valid for one hour
// use data.signedUrl as the image or download address

A signed link only works for files the signed-in user may read under your policies. Without such a policy, Supabase answers "Object not found".

2. There's no bucket with that exact name

Names must match exactly, capitals included: avatars, Avatars, avatar and user-avatars are four different buckets. If the name in your code isn't in the check's list, one of these happened:

Create the bucket once, with the exact name your code uses: Storage → New bucket, turning on Public bucket if case 1 applies, or in SQL (the form Supabase's docs give):

insert into storage.buckets (id, name, public)
values ('avatars', 'avatars', true);

On an upload, "Bucket not found" means this case. Storage checks the bucket before your policies: in our test, an upload to a missing bucket said "Bucket not found" even without any permission, and an upload to a real bucket without a policy said "new row violates row-level security policy" instead.

3. getBucket() says it doesn't exist, listBuckets() is empty

From the browser, getBucket() and listBuckets() read the bucket list as your user, through Row Level Security. Storage turns Row Level Security on for that list and adds no policy to it, so getBucket('avatars') answers "Bucket not found" and listBuckets() returns an empty list, while the bucket exists. With the service key, the same getBucket worked in our test.

This usually comes from code that checks for the bucket and creates it if it's missing. The check fails, then createBucket() fails too, with "new row violates row-level security policy". Your app doesn't need either: delete that code, create the bucket once (case 2), and upload straight to it.

"Object not found" instead?

The neighbour error, {"statusCode":"404","error":"not_found","message":"Object not found","code":"NoSuchKey"}, means Storage found no file at that path, or none your user may read:

All the causes, tested: Supabase Storage "Object not found".

If an AI tool built your app

Give your AI tool this prompt:

List every supabase.storage.from('...') call in the app: the bucket name, and whether it uploads, downloads, uses getPublicUrl or uses createSignedUrl. Remove any code that calls getBucket, listBuckets or createBucket at runtime to check for or create a bucket. Don't change anything else.

Then compare its list with the one-minute check: every bucket name must exist exactly, and every bucket used with getPublicUrl must have public = true.

Not quite your error?

Still stuck?

Copy the exact address that fails (from the browser's Network tab, or by opening the broken image in a new tab) and the result of the one-minute check. The bucket name and project in that address, next to the real list of buckets, settle almost every case. The Storage logs in your dashboard show each refused request too.

Other Supabase problems? See Supabase fixes.