cli icon indicating copy to clipboard operation
cli copied to clipboard

Supabase CLI just hangs with no response (supabase login, supabase init)

Open dilly-sixmo opened this issue 1 year ago • 11 comments

I'm having an issue using the Supabase CLI where it's just hanging forever without any output. Here's what happened.

  1. I installed the Supabase CLI w/ Scoop on windows
  2. I used supabase login to set my access token (it worked initially)
  3. I created my project folder, initialized git, and tried to use supabase init
  4. I was told I had to have Docker running, which I didnt, so I installed Docker Desktop, updated WSL, and got Docker running
  5. Now I'm unable to use supabase init or supabase login. The commands display no output and they just hang requiring me to Ctrl+C out.

I've tried reinstalling supabase and restarting my computer. I found Issue 819 which is a similar issue but nothing there helped me to resolve this.

What can I do? Is there some way I can logout? supabase logout is not a valid command. I'm thinking maybe if I could log out it might work but I have no idea how to do that.

dilly-sixmo avatar Apr 06 '23 15:04 dilly-sixmo

Thanks for detailed steps to reproduce. I'm going to take a look at this today or tmr and get back to you.

sweatybridge avatar Apr 06 '23 16:04 sweatybridge

I just want to add some more info. I tried to use the Supabase CLI from another machine (which already had it & Docker installed as I was testing self-hosting a week ago on it) and I got the same result with supabase login and supabase init (hanging, no output). I was using the scoop 1.48 version.

Additionally, I removed Supabase CLI from scoop and installed it into a new project folder using NPM. This gave me version 1.49.4 of the Supbase CLI. Using npx supabase login and npx supabase init once again hung without any output.

dilly-sixmo avatar Apr 06 '23 18:04 dilly-sixmo

And now it randomly started working after another computer restart. I have no idea what the cause of this was. I restarted the computer before and it didn't fix it and I tried another computer and it didn't work so why it works now is befuddling.

I would suggest that the supabase CLI commands be more verbose with their output, so that if it does fail, you're not completely in the dark as to what's going on.

dilly-sixmo avatar Apr 06 '23 20:04 dilly-sixmo

Yup adding more verbose logs would definitely help pinpoint such errors. It's surprising to me that supabase init hangs because its implementation is rather straightforward.

sweatybridge avatar Apr 07 '23 01:04 sweatybridge

I seemed to be having better luck using PowerShell rather than the normal command line.

dilly-sixmo avatar Apr 19 '23 15:04 dilly-sixmo

It'd definitely make it better if there was a log saying the keyring was about to be used or whatever wrapper for it is being used.

gtarsia avatar Apr 24 '23 03:04 gtarsia

Same here, npx supabase login lags and can't input anything. npm -v 9.6.0

kitharvey avatar Jun 12 '23 15:06 kitharvey

Same with scoop. I'm using windows 11. both are asking for access token but I can't input anything.

kitharvey avatar Jun 12 '23 15:06 kitharvey

I just realize you can input anything, paste or type, but it's not showing what you input. Paste token then login works on my end.

kitharvey avatar Jun 14 '23 08:06 kitharvey

I typed the access token manually in the terminal, and that worked for me. However, as I was typing, there was no indication that I was actually typing anything.

chescript avatar Sep 01 '23 11:09 chescript

I had the same issue and found the solution in this thread. Supabase tries to store the SUPABASE_ACCESS_TOKEN and SUPABASE_DB_PASSWORD in some system keychain (e.g. gnome), and hangs without response.

See if you can get debug output with --debug after exporting both your access token and db password with

export SUPABASE_ACCESS_TOKEN=...
export SUPABASE_DB_PASSWORD=...

Following Bewinxed's comment sudo service gdm stop for killing the gnome desktop client.

With desktop client down and both variables exported, I was able to login and link.

JungeWerther avatar Nov 02 '23 11:11 JungeWerther

Closing this as supabase login will now login through the browser by default.

Also supabase logout command is now available.

sweatybridge avatar Mar 27 '24 05:03 sweatybridge