cli icon indicating copy to clipboard operation
cli copied to clipboard

PostgreSQL container fails with "99-roles.sql: No such file or directory" error causing restart loop

Open arend-vanderveen opened this issue 2 months ago • 2 comments

Bug Description

The Supabase local database container fails to start properly due to a missing 99-roles.sql file, causing a restart loop that prevents database initialization and migration application.

Steps to Reproduce

  1. Install Supabase CLI v2.67.1
  2. Run supabase start
  3. Container enters restart loop with error: psql: error: /docker-entrypoint-initdb.d/init-scripts/99-roles.sql: No such file or directory

Expected Behavior

Database should initialize successfully without errors.

Actual Behavior

Container restarts repeatedly, preventing database from completing initialization.

Environment

  • Supabase CLI Version: 2.67.1
  • OS: macOS 24.6.0 (Darwin ARM64)
  • Docker Version: 28.5.1
  • Project ID: zndanyasplhiqeyawqmz

Error Logs

psql: error: /docker-entrypoint-initdb.d/init-scripts/99-roles.sql: No such file or directory

Additional Context

  • Created placeholder file at supabase/init/init-scripts/99-roles.sql but it's not being copied to container
  • Issue persists across CLI versions (tested 2.65.5 and 2.67.1)
  • Prevents local database reset and migration application

arend-vanderveen avatar Dec 16 '25 17:12 arend-vanderveen

hi @arend-vanderveen thanks for reporting 💚

99-roles.sql isn't a part of the cli,
i believe this is a stale docker volume from a previous setup. try removing all supabase docker volumes and running supabase start fresh.

7ttp avatar Dec 16 '25 19:12 7ttp

This issue has been resolved. I had to:

  1. Delete docker volume, images and containers
  2. Delete supabase/.temp

I was then able to execute the following:

supabase start supabase db reset

Thanks for the suggestion, Arend

On Tue, Dec 16, 2025 at 2:00 PM Vaibhav @.***> wrote:

7ttp left a comment (supabase/cli#4631) https://github.com/supabase/cli/issues/4631#issuecomment-3661961969

hi @arend-vanderveen https://github.com/arend-vanderveen thanks for reporting 💚

99-roles.sql isn't a part of the cli, i believe this is a stale docker volume from a previous setup. try removing all supabase docker volumes and running supabase start fresh.

— Reply to this email directly, view it on GitHub https://github.com/supabase/cli/issues/4631#issuecomment-3661961969, or unsubscribe https://github.com/notifications/unsubscribe-auth/BYGW5FCYDGGEGIEUF4ORC5T4CBJFHAVCNFSM6AAAAACPHCBBKWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTMNRRHE3DCOJWHE . You are receiving this because you were mentioned.Message ID: @.***>

arend-vanderveen avatar Dec 16 '25 19:12 arend-vanderveen

I am back to having the same issue. I have tried changing from postgres 16 to postgres 15 in config.toml but that did not help.

arend-vanderveen avatar Dec 17 '25 21:12 arend-vanderveen