Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to link to a project on expo react-native #1588

Closed
FaysalBsata opened this issue Oct 17, 2023 · 10 comments · Fixed by #1505
Closed

Trying to link to a project on expo react-native #1588

FaysalBsata opened this issue Oct 17, 2023 · 10 comments · Fixed by #1505

Comments

@FaysalBsata
Copy link

Describe the bug
I am doing npx supabase link --project-ref --password
and I'm getting Error status 404: {"message":"Route GET:/version not found","error":"Not Found","statusCode":404}
To Reproduce
Steps to reproduce the behavior:
npx supabase link --project-ref --password

Expected behavior
I expected to finish the command without throwing errors

Desktop (please complete the following information):

  • OS: Mac OS Ventura
  • Version of Node.js v16.20.0
@nkriege
Copy link

nkriege commented Oct 19, 2023

Seems to have been introduced in v1.103.0. Downgrading to v1.102.3 fixes this.

@FaysalBsata
Copy link
Author

@nkriege how can I do that?

@sweatybridge
Copy link
Contributor

Could you check the exit code of supabase link command? I believe linking should have succeeded despite these errors.

You can also verify by running supabase projects list command.

@FaysalBsata
Copy link
Author

Error status 404: {"message":"Route GET:/version not found","error":"Not Found","statusCode":404}
Finished supabase link.
@sweatybridge

@sweatybridge
Copy link
Contributor

Finished supabase link.

This looks good. It's probably because your hosted project is still on storage v2 while we are migrating to v3.

There's nothing to worry about at the moment as it will be fixed eventually when we finish migrating every hosted project.

@sweatybridge
Copy link
Contributor

This has been addressed in the latest beta release.

@landsman
Copy link

landsman commented Oct 24, 2023

I got the same error, latest macOS.

  1. supabase init
  2. supabase link --project-ref xxx
  3. When I ran supabase projects list I saw that the project is successfully linked
  4. but when I ran supabase migration up it tried to run it to localhost database:
failed to connect to `host=localhost user=postgres database=postgres`: dial error (dial tcp 127.0.0.1:54322: connect: connection refused)

What did I miss? In ./supabase/config.toml is no info about linked project / remote db.

@sweatybridge
Copy link
Contributor

Do you want to push migrations to the linked project? Currently that command is supabase db push.

supabase migration up is currently used for local database only. It's pending another refactor here.

@stephencweiss
Copy link

Thanks @nkriege -- this solved it for me:

npx [email protected] link --project-ref <ref>
Need to install the following packages:
  [email protected]
Ok to proceed? (y) y
Enter your database password (or leave blank to skip): 
Finished supabase link.

@landsman
Copy link

Do you want to push migrations to the linked project? Currently that command is supabase db push.

yes, after a few minutes, I figured it out. It works.

I thought that database was only for manipulation with dumps, schema, or something like that, so command named migration caught my eye more.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants