supabase: Can't Delete User on Locally Deployed Supabase: 'Method Not Allowed' Error
Discussed in https://github.com/orgs/supabase/discussions/32900
<div type='discussions-op-text'>Originally posted by thejufo January 18, 2025
Context:
I’ve recently deployed Supabase locally on my machine, everything worked great until I tried to delete a test user in Supabase Studio http://127.0.0.1:54323 auth section.
Problem:
When I attempt to delete the user, I get this error message:
“Failed to delete selected users: API error happened while trying to communicate with the server.”.
After digging into it a bit, I noticed this seems to be related to the Studio itself. Here’s a screenshot of the request:
What I’ve Tried:
I dug deeper into the source code and found where the delete request is handled. From what I can tell, it should work, but for some reason, it’s not,
Here’s the code snippet:
Question:
Does anyone know what’s going on here? Is there some configuration I missed, or could it be a bug?
I’d really appreciate any advice or ideas on how to fix this!
</div>About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 23
- Comments: 55 (20 by maintainers)
Commits related to this issue
- Bump Vite + switch to Supabase CLI beta https://github.com/supabase/supabase/issues/32901 — committed to AFCMS/malley by AFCMS 2 years ago
I deeply regret every time i upgrade my supabase cli.
So the fix had to be reverted because there were new bugs introduced in the version with the fix for deleting user’s from the dashboard. The new bugs are being fixed and I will post here when a new version is out with the fix again.
This has been fixed in a newer pre-release version
2.15.3and will likely be available in the next public release (I have no ETA on the next public release). You can use the pre-release version now vianpx.Do make sure you backup any project running on existing version of the CLI before running the command below and stop your existing project with the --no-backup flag. Screenshot below showing the backup steps.
This has been merged, but when is it gonna be shipped to production https://github.com/supabase/supabase/pull/32945
Looks like a fix underway: https://github.com/supabase/supabase/pull/32945
This was fixed in the pre-release
2.9.8as I noted above but it seems this fix was reverted for the2.12.1release for some reason. I’ll try and find out what happened tomorrow.@JavierSegoviaCordoba if it failed for you it means you aren’t using the CLI. Please state how you are setting up Supabase locally. My suggestion above is only for those using the CLI. If you are using
docker-compose.ymlyou will need to change the version on thestudioimage in that file to20241202-71e5240.@vilgeforc5 I stated in the post above https://github.com/supabase/supabase/issues/32901#issuecomment-2626905856
@astr0sl0th I just did a clean install of 2.9.6 today and it seems the issue has been fixed. I can see a new docker image was pushed out 2 days ago for the studio so I think this has fixed the issue.
this fixes the problem for me basically, allowing me to put authenticated users with pre-known emails and passwords into seed.sql
https://gist.github.com/khattaksd/4e8f4c89f4e928a2ecaad56d4a17ecd1
@silentworks Confirmed, this issue is resolved. Closing
@silentworks can confirm that the issue was resolved in v2.15.8
Thank you, everyone!
This is now fixed in the latest public release of CLI v2.15.8.
@KatelynKim did you run the following?
supabase stop
npx supabase@2.15.3 start
I’m using the CLI with version 2.12.1. I stopped my containers with “supabase stop --no-backup” before updating, and I ran “supabase stop”, then “supabase start”. I’m experiencing the same error. Is there something I’m not doing here?
@JavierSegoviaCordoba I think you should read the self hosted docs. Email configs aren’t done inside of Studio for self-hosted, its all done through the docker-compose.yml file or the
.envfile provided inside the repo. I also don’t know what Renovate is so cannot help in that regard.You can use
npxto use whichever version you want.or even better as I normally recommend is to pin that version to your project as a devDependency and then you don’t need to worry about it breaking or when you upgrade and there is a bug in a new version you can easily rollback.
and then now you can just call
and it will use the version pinned in that project.
@henry9207 release the whip
@silentworks I can confirm the issue is still happening. I went through all the changes in Supabase CLI since v2.6.8, and it looks like the CLI still includes the old version of the Studio image, even in v2.9.6