cli: Failed to retrieve project status
Describe the bug When using the supabase cli in my release workflow, I get the following error:
Unexpected error retrieving remote project status: {"message":"Failed to retrieve project status"}
At first, it was saying in the --debug output that the password was wrong. At this point I reset my db password, and my PAT. I then ran the command again and now I am at the point where I get the error above. The strange thing is that I had not changed anything and the and the last release I ran was 11/17/2024 and everything worked fine.
The only difference is that with that release I was running the Supabase CLI version v1.207.9. The release today that I am running I have changed it to use Supabase CLI version v2.0.0.
Another strange thing is that if I run the same commands locally, it works fine.
Entire Workflow Job
run_db_migrations:
name: Run Database Migrations
needs: [get_version, run_prerelease_validation]
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Setup Supabase CLI (${{ vars.SUPABASE_CLI_VERSION }})
uses: supabase/setup-cli@v1
with:
version: ${{ vars.SUPABASE_CLI_VERSION }}
- name: Login to Supabase
run: |
$token = "${{ inputs.release-type == 'Preview' && secrets.EA_SUPA_PAT_STANDARD_PREV || secrets.EA_SUPA_PAT_STANDARD_PROD }}";
supabase login --token "$token";
- name: Link to Supabase Project
env:
SUPABASE_DB_PASSWORD: "${{ inputs.release-type == 'Preview' && secrets.EA_SUPA_DB_PASS_PREV || secrets.EA_SUPA_DB_PASS_PROD }}"
run: |
$projRefId = "${{ inputs.release-type == 'Preview' && vars.EA_SUPA_PROJ_REF_ID_PREV || vars.EA_SUPA_PROJ_REF_ID_PROD }}";
supabase link --project-ref "$projRefId";
- name: Reset Database
run: echo "y" | supabase db reset --linked;
[!NOTE] I am running on ubuntu latest and using powershell for the shell. The step that I am getting the errors are when I run the
- name: Link to Supabase Projectstep when trying to link to the correct project. In this scenario, it is my preview environment that I am releasing to.
For the repuction steps, all I can say is to create a test project and use the same job in a test workflow as shown above. I would do this myself, but I am currently on the free account and I already have the max of 2 projects. I will admit I have not tried an emptly blank project to see if I can repoduce the issue.
I have already triple checked and reset my PAT secrets and db passwords and this did not get me very far. Before
I reset the password, I was getting a ‘wrong password’ message in the verbose debug logs of the supabase link command,
but once I reset all the PAT and password values, I then started getting the message above.
To Reproduce Steps to reproduce the behavior:
- Create new empty project
- Push project to a linked project in supabase
- Create simple workflow with the same job using the same commands as above
- Manually execute workflow and see what error messages are shown
Expected behavior I expected the entire workflow to work as normal just as before, even after I updated the Supabase CLI version being used in the workflow.
Screenshots
If applicable, add screenshots to help explain your problem.
System information
Rerun the failing command with --create-ticket flag.
- Ticket ID: [e.g. ab1ac733e31e4f928a4d7c8402543712]
- Version of OS: Ubuntu 22.04.05
- Version of CLI: v2.0.0
- Version of Docker: N/A - Problem only occurs in my GitHub workflow
- Versions of services: [output from
supabase servicescommand]SERVICE NAME LOCAL LINKED supabase/gotrue │ v2.164.0 │ v2.164.0 postgrest/postgrest │ v12.2.1 │ v12.2.1 supabase/realtime │ v2.33.58 │ - supabase/storage-api │ v1.14.1 │ v1.14.1 supabase/edge-runtime │ v1.65.3 │ - supabase/studio │ 20241202-71e5240 │ - supabase/postgres-meta │ v0.84.2 │ - supabase/logflare │ 1.4.0 │ - supabase/supavisor │ 1.1.56 │ -
Additional context N/A
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 20 (8 by maintainers)
That’s very strange if it works locally but not in GitHub action.
Could you double check token access token you added to GitHub? Is it from your personal access token?
That is very strange indeed. I know we had pooler outage recently but since
supabase linkis working for you locally, that shouldn’t have impacted your project.Perhaps you can try skipping the link step and run reset with
--db-urlflag. You can obtain the pooler connection string from the connect button on dashboard.I went into supabase and generated a new db password and then updated the
EA_SUPA_DB_PASS_PREVsecret. I ran the release workflow again and I am still getting the EXACT same message as before.Indeed, this is strange . . . 🤔
Ok this is a different error now. It’s complaining about db password being incorrect.
We are looking into password-less authentication on the platform side for the next few months. Meanwhile can you also double check that your database password is correctly set in GitHub secret?
I’m referring to this env var in your action
The
SUPABASE_ACCESS_TOKENshould be a PAT from your Supabase account.I was wondering if that was the issue. I logged in yesterday and made sure that the project was active before using the command.
I am building an application for a client, and we absolutely plan on upgrading to pro. We are just not quite there yet. I would expect in the next 3 months or so.
I got the following result which means that it all seems to be working:
The version of the supabase CLI that I am using is v2.6.8
Hello, sorry for the late reply.
If this happens on a free project, I suspect the error is due to your preview project being paused after 7 days of inactivity. We added some validations in recent CLI versions to make sure that projects are in active healthy state before you can link.
Since we don’t expose an API to resume your project, the only way is to resume manually from the dashboard. If you want to keep your projects running, you can either send some requests periodically or as I would shamelessly recommend, upgrade to Pro.
You will also get more features, resources, and support on all your projects when you switch to Pro plan, including
Hi @CalvinWilkinson, to help me narrow down the issue, could you try setting the access token via env var instead?
You can also remove the login step before this.