cli: `supabase link` hangs after adding database password

Bug report

Describe the bug

Installed supabase using homebrew and I’m trying to link my local project. After inserting the database password and hitting enter, the process hangs and I can’t do anything else. Ctrl + C does not work either. Any password I add and it just hangs, even if it’s correct or not. I also tried restarting the project but got the same behavior.

To Reproduce

  1. Install with homebrew
  2. supabase link --project-ref=abc
  3. Insert db password, hit enter

Expected behavior

Command should continue and show error/sucess.

Screenshots

Code_K7xkf6n8SR

It just hangs like this forever.

System information

  • OS: Windows WSL2
  • Browser (if applies) -
  • Version of supabase-js: 2.8.0 (but I don’t think it affects the issue)
  • Version of supabase-cli: 1.40.4
  • Version of Node.js: 16.19 or 18.14

Additional context

n/a

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 19 (4 by maintainers)

Most upvoted comments

I had same issue in WSL2. Most likely you have WSLg (some GUI linux app) installed, which leads to some Gnome password (gnome keyring) manager which is actually leading to this command hanging. What happens actually is UI popup to unlock vault is not appearing in Windows and it looks like command is hanging and you are not able to kill it.

In order to avoid this I actually use one distro without GUI apps which leads to supabase to use dotfiles to store credentials and everything works like on OSX or real Linux.

You can try top to find and kill gnome keyring by ID and it should start just fine next time you exec supabase link, but on next call you end up with same issue.

During my research I bumped into https://stackoverflow.com/questions/72528100/how-to-unlock-gnome-keyring-on-debian-headless-wsl-2-and-make-it-work-in-pytho and many more essentially leading to same problem.