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

Supabase db remote commit failing #121

Closed
oliviercperrier opened this issue Dec 27, 2021 · 6 comments
Closed

Supabase db remote commit failing #121

oliviercperrier opened this issue Dec 27, 2021 · 6 comments
Labels
bug Something isn't working

Comments

@oliviercperrier
Copy link

Bug report

Describe the bug

When running supabase db remote commit the following error occur: Error: unexpected end of JSON input

To Reproduce

  1. Run: supabase init
  2. Run: supabase db remote set [your-db-url]
  3. Run: supabase db remote commit
  4. See error

Expected behavior

Should work as excepted and as said in the documentation: https://github.com/supabase/cli/tree/main/examples/tour

Screenshots

If applicable, add screenshots to help explain your problem.

System information

  • OS: macOS
  • Version of supabase cli: 0.15.10
@oliviercperrier oliviercperrier added the bug Something isn't working label Dec 27, 2021
@soedirgo
Copy link
Member

Could be the same issue as #116 - I've updated the CLI to validate the URL passed to db remote set in v0.15.12.

@damianfrizzi
Copy link

damianfrizzi commented Jan 6, 2022

I have the same problem using 0.15.15. What I have tried:

  • I have created a new Supabase project and used a password that does not contain any characters that require url encoding. Setting the remote db is possible but it fails when executing the commit command.
  • I built the latest version from the source code and applied it to my project. For me it fails here. Maybe it's related to Some logging is included in the diff output pgadmin4#24?
  • Since the old link command worked for me at some point, I tried to downgrade the cli to 0.12.4. I checked out 68e580d and ran the old link command by building from source (I also had to cherry-pick this). I got the message Finished `supabase link`. although no XX_link.sql migration was created.

I have no experience with Go, so I don't know if this information is helpful.

@jamesyu
Copy link

jamesyu commented Jan 18, 2022

I am also getting this, on a relatively simple db that I just set up.

I don't believe there's anything in the password that requires url escaping.

Any word on this issue?

@soedirgo
Copy link
Member

I haven't been able to replicate this, but I think it might be what Damian linked above (some logging in the schema diff). I'm currently working on other open issues, but will loop back once I have any updates.

@soedirgo soedirgo pinned this issue Jan 19, 2022
@damianfrizzi
Copy link

damianfrizzi commented Feb 2, 2022

I just tried the latest cli version 0.17.0 with a fresh supabase project and it worked.

I created a dump of the old database structure and applied it to the new supabase project via a migration. On the old, "broken" project there were some tables that had "supabase-admin" as an owner. I had to change this to "postgres". Not sure this is related to this issue, though.

@soedirgo soedirgo unpinned this issue Feb 7, 2022
@soedirgo
Copy link
Member

Closing this for staleness - there's been a lot of change since this issue was raised, so if anyone's still bumping into this, please create a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants