Skip to content

"branch was not dumped" error #139

@osaxma

Description

@osaxma

Bug report

Describe the bug

I was trying to switch to a new branch while supabase start was running and I ran into multiple errors.

I'm not sure if this is a bug or I should've stopped the process first or I'm doing something wrong here (please advise).

Here are the steps that I took including the error messages:

  • I had a supabase start process running.

  • Then on another terminal, I created a branch as follow:

    [~/supabase_project]$ supabase db branch create new_api  
    Created branch new_api.
    
  • Then I switched to it:

    [~/supabase_project]$ supabase db switch new_api
    Switched to branch new_api.
    
  • I went to the other terminal where the supababase start process was running and I found this message (and the process exited already):

    Error restoring branch new_api: Branch was not dumped.
    Error restoring branch main: Branch was not dumped.
    Error: Error starting database: ERROR:  database "new_api" does not exist
    
  • I tried supabase start again and I got the following message:

    [~/supabase_project]$ supabase start   
    Error: Error switching to branch new_api: ERROR:  database "new_api" does not exist
    
  • When I listed the branch, the one that I created was already deleted.

    [~/supabase_project]$ supabase db branch list    
    * main
    
  • I ran supabase start once again, it worked but I received the following message:

    [~/supabase_project]$ supabase start                                                          
    Error restoring branch main: Branch was not dumped.
    Started local development setup.
    
  • I stopped the process and I ran the command again to see if the error occurs, but I got another error :

    [~/supabase_project]$ supabase start                                                        
    Error: Error starting database: ERROR:  database "main" does not exist
    

    maybe related to Cannot start supabase after stopping #135

  • When I ran list branches, I still see main.

    [~/supabase_project]$ supabase db branch list                                                      
    * main
    

System information

  • OS: macOS
  • supabase cli version: 0.15.15%

Additional Context:

I didn't create a git branch when I did all of the above. I was not sure if I'm supposed to do it or supabase cli will take care of it.

By the way, this was a fresh project, before creating the branch, I ran the following sequence of commands:

[~/supabase_project]$ supabase db remote set <url>
[~/supabase_project]$ supabase db remote commit
[~/supabase_project]$ supabase db reset
[~/supabase_project]$ supabase migration new first_migration
# <------- written some migration  in first_migration---------->
[~/supabase_project]$ supabase db reset

I haven't pushed first_migration to remote.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions