cli icon indicating copy to clipboard operation
cli copied to clipboard

Config does not match

Open SaavanNanavati opened this issue 11 months ago • 7 comments

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:

  1. Create brand new Supabase project
  2. Run supabase link --project-ref <project-id>
  3. There will be an error in config.toml diff.

Expected behavior

It should match.

Screenshots

image

System information

  • OS: MacOS
  • Version of supabase-js: 2.47.10
  • Version of Node.js: 20.12.2

SaavanNanavati avatar Dec 30 '24 20:12 SaavanNanavati

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"]

SaavanNanavati avatar Dec 30 '24 20:12 SaavanNanavati

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

KevinKra avatar Jan 01 '25 19:01 KevinKra

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.

dickensaround avatar Jan 22 '25 04:01 dickensaround

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 avatar Feb 06 '25 14:02 nene

@nene Thanks for noting the correct path to the settings. I've edited the comment.

dickensaround avatar Feb 06 '25 15:02 dickensaround

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.

dickensaround avatar Mar 21 '25 18:03 dickensaround

Hi, I've moved this issue over from the supabase repo.

Hallidayo avatar Jun 07 '25 16:06 Hallidayo

Re-linking actually did not show the warnings for me.. Maybe fixed in (or before) 2.34.3?

Zeta611 avatar Aug 15 '25 06:08 Zeta611