Local server unable to start due to analytics bucket
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:
- executing
supabase stop --no-backupon the project terminal - erasing docker images and volumes
- running
supabase start - 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.
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!
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
Can also confirm that I'm running into the same issue! Guess it's time for an extended coffee!
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.
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
Seeing the same error. Was able to unblock by rolling back:
npm install [email protected] --save-dev
Could you run
supabase linkagain just to make sure all the local versions match your hosted project?
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 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.
@danieldunderfelt another alternative is to
rm supabase/.temp/storage-versionso 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
@sweatybridge what you suggested fixed my local environment. Thank you.
Remove the temp folder in /supabase dir and run npx supabase start again and you will be good.
Thanks @sweatybridge. Your fix worked for me.
Thanks @sweatybridge 🫶
This has been fixed in beta channel as well.
npx supabase@beta start
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 Good to know. I was just about to try the fix. I will hold off for now...
@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
@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 😆
@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 - 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 😅