Supabase db remote commit failing
Bug report
Describe the bug
When running supabase db remote commit the following error occur: Error: unexpected end of JSON input
To Reproduce
- Run:
supabase init - Run:
supabase db remote set [your-db-url] - Run:
supabase db remote commit - 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
Could be the same issue as https://github.com/supabase/cli/issues/116 - I've updated the CLI to validate the URL passed to db remote set in v0.15.12.
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 https://github.com/supabase/pgadmin4/issues/24?
- Since the old
linkcommand worked for me at some point, I tried to downgrade the cli to0.12.4. I checked out68e580dand ran the oldlinkcommand by building from source (I also had to cherry-pick this). I got the messageFinished `supabase link`.although noXX_link.sqlmigration was created.
I have no experience with Go, so I don't know if this information is helpful.
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?
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.
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.
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.