cli icon indicating copy to clipboard operation
cli copied to clipboard

Local server unable to start due to analytics bucket

Open leandrocabranes opened this issue 1 year ago • 25 comments

Bug report

  • [x] I confirm this is a bug with Supabase, not with my own application.
  • [x] I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

When I try to start local development I get a 500 DatabaseError and the project fails to start.

To Reproduce

Update the supabase cli to version 2.31.4 and restart local development by:

  1. executing supabase stop --no-backup on the project terminal
  2. erasing docker images and volumes
  3. running supabase start
  4. the console outputs the following error:
Error status 500: {"statusCode":"500","code":"DatabaseError","error":"DatabaseError","message":"select * from ((select \"id\", \"name\", \"type\", \"public\", \"owner\", \"created_at\", \"updated_at\", \"file_size_limit\", \"allowed_mime_types\" from \"buckets\") union all (select \"id\", \"id\" as \"name\", \"type\", null as \"public\", null as \"owner\", \"created_at\", \"updated_at\", null as \"file_size_limit\", null as \"allowed_mime_types\" from \"buckets_analytics\")) as \"all_buckets\" - column \"type\" does not exist"}

Expected behavior

The local development server should start with no problem, but it does not.

System information

  • OS: macOS 15.5
  • Supabase-cli: 2.31.4
  • Node.js: 24.4.0

Additional context

It looks like the issue is the new Iceberg Analytics Bucket that is not available yet to execute locally.

leandrocabranes avatar Jul 15 '25 19:07 leandrocabranes

Same here. I managed to break the local Supabase somehow and went to upgrade to try and fix the problem. Then ran into this. I hope it is fixed promptly!

danieldunderfelt avatar Jul 15 '25 20:07 danieldunderfelt

Same behaviour here. no matter what i try the local supabase setup is broken. Did not change anything on my side besides upgrading the cli and now i am receiving the exact same issue as mentioned above. A complete showstopper for any local development

LeonSchallenberg avatar Jul 15 '25 20:07 LeonSchallenberg

Can also confirm that I'm running into the same issue! Guess it's time for an extended coffee!

clydeso avatar Jul 15 '25 23:07 clydeso

I think that since the error is a 500, the error is on the server side (supabase itself), and should be fixed once they do whatever they need to do there. The other thing I think that might fix this, is getting accepted in the Iceberg Analytics Bucket beta, which could explain how this got to production without anyone in the internal team (which of course have access to the Iceberg Analytics Bucket beta program) running into this.

leandrocabranes avatar Jul 16 '25 01:07 leandrocabranes

Could you run supabase link again just to make sure all the local versions match your hosted project?

https://github.com/supabase/supabase/issues/37180#issuecomment-3076566935

sweatybridge avatar Jul 16 '25 03:07 sweatybridge

Seeing the same error. Was able to unblock by rolling back:

npm install [email protected] --save-dev

schmingle avatar Jul 16 '25 06:07 schmingle

Could you run supabase link again just to make sure all the local versions match your hosted project?

supabase/supabase#37180 (comment)

This doesn't help. I have removed the .temp folder, ran link many times, to no avail. I just started using 3.31.2 which works, any version above that is catastrophically broken @sweatybridge

danieldunderfelt avatar Jul 16 '25 06:07 danieldunderfelt

@danieldunderfelt another alternative is to rm supabase/.temp/storage-version so the storage schema is updated to latest.

Unfortunately we can't rollback storage version because it would break users who are already using the new one.

Our storage team is already working on a fix so we can roll forward.

sweatybridge avatar Jul 16 '25 07:07 sweatybridge

@danieldunderfelt another alternative is to rm supabase/.temp/storage-version so the storage schema is updated to latest.

Unfortunately we can't rollback storage version because it would break users who are already using the new one.

Our storage team is already working on a fix so we can roll forward.

I encountered the same issue, and applying this fix resolved it. thank you @sweatybridge

dev-hcg-smg avatar Jul 16 '25 07:07 dev-hcg-smg

@sweatybridge what you suggested fixed my local environment. Thank you.

leandrocabranes avatar Jul 16 '25 13:07 leandrocabranes

Remove the temp folder in /supabase dir and run npx supabase start again and you will be good.

seanpham99 avatar Jul 16 '25 13:07 seanpham99

Thanks @sweatybridge. Your fix worked for me.

jamestakeshi avatar Jul 16 '25 15:07 jamestakeshi

Thanks @sweatybridge 🫶

eeston avatar Jul 16 '25 19:07 eeston

This has been fixed in beta channel as well.

npx supabase@beta start

sweatybridge avatar Jul 18 '25 07:07 sweatybridge

This has been fixed in beta channel as well.

npx supabase@beta start

This doesn't fix my issue. My issue is only fixed if I disable storage locally. The error I see is:

Error: An error occurred running 'storage-schema'. Rolled back this migration. No further migrations were run. Reason: cannot drop function foldername(text) because other objects depend on it

I have deleted the temp folder, used the beta release. Nothing working when storage is enabled.

joelpierre avatar Jul 18 '25 09:07 joelpierre

@joelpierre Good to know. I was just about to try the fix. I will hold off for now...

HarrisConsulting avatar Jul 18 '25 12:07 HarrisConsulting

@joelpierre Good to know. I was just about to try the fix. I will hold off for now...

Yep. Setting

[storage]
enabled = false

Got me up and running though I just can't upload anything to the local buckets

joelpierre avatar Jul 18 '25 13:07 joelpierre

@leandrocabranes - Can you leave this open as it isn't solved for everyone, and isn't solved. Your "fix" was just to rollback to a previous version. Some of us can't do that for other reason 😆

joelpierre avatar Jul 20 '25 00:07 joelpierre

@leandrocabranes - Can you leave this open as it isn't solved for everyone, and isn't solved. Your "fix" was just to rollback to a previous version. Some of us can't do that for other reason 😆

Sure @joelpierre, I can reopen the issue. The actual fix was disabling the local storage. But there should come a fix from the supabase team.

leandrocabranes avatar Jul 20 '25 00:07 leandrocabranes

@leandrocabranes - Can you leave this open as it isn't solved for everyone, and isn't solved. Your "fix" was just to rollback to a previous version. Some of us can't do that for other reason 😆

Sure @joelpierre, I can reopen the issue. The actual fix was disabling the local storage. But there should come a fix from the supabase team.

Thanks dude, yeah thats actually an issue for me because I need the storage locally 😅

joelpierre avatar Jul 20 '25 00:07 joelpierre