cli
cli copied to clipboard
Config does not match
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
It's not possible to run supabase link on a brand new project. How can I use Supabase locally?
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
- Create brand new Supabase project
- Run
supabase link --project-ref <project-id> - There will be an error in
config.tomldiff.
Expected behavior
It should match.
Screenshots
System information
- OS: MacOS
- Version of supabase-js: 2.47.10
- Version of Node.js: 20.12.2
Also, even when I try updating my config.toml to match the external one, the diff still always fails for this:
additional_redirect_urls = ["https://127.0.0.1:3000"]
Yep, having the exact same issue.
I tried creating a new remote project, created a new local repository, fresh supabase init, same issue. Also like your example, I can fix all the "diffs" except for additional_redirect_urls = ["https://127.0.0.1:3000"] ...
I have the latest version of supabase and my supabase cli is at 2.2.1
The workaround for this for me was to go into the control panel for my remote project, navigate to Dashboard -> Authentication -> URL Configuration, then add that URL under Redirect URLs.
For whatever reason, that then gave me a few new things I needed to change in my local config.toml to get it to reconcile (specifically: [auth.mfa.totp] enroll_enabled and verify_enabled; as well as [auth.email] otp_expiry), but once I finished messing around with all of those it linked, then I was able to restore whatever settings I felt necessary and delete the redirect URL in the remote project control panel.
For what it's worth, this is the second project I've started since December where I went through this. I don't remember what I did to solve it the first time, but noticed that the additional_redirect_urls parameter isn't in that first project's file at all so I must have removed it entirely, although that didn't seem to work this time.
If the linker would even just observe the line being commented out, that would be useful.
Edited 2/6/2025 to correct the path to settings per the comment from @nene.
The workaround suggested by @dickensaround worked for me. It also caused the exact same further problem of additional differences appearing (just as described by @dickensaround) which I also had to fix.
PS. I initially went looking for this "URL Configuration" in "Dashboard -> Project Settings -> Authentication" and was frustrated of not being able to find it. Finally I discovered that I instead had to look in "Dashboard -> Authentication -> URL Configuration".
@nene Thanks for noting the correct path to the settings. I've edited the comment.
I received a notice today:
WARNING: You are running different service versions locally than your linked project:
supabase/gotrue:v2.168.0 => v2.170.0
Run supabase link to update them.
When I run the command, I now have this in my diff:
-email_sent = 2
+email_sent = 60
When I do a find in my config, that value isn't in there so I can't complete the update.
Hi, I've moved this issue over from the supabase repo.
Re-linking actually did not show the warnings for me.. Maybe fixed in (or before) 2.34.3?