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

Auth User and User cant be created for log in on apps #5421

Open
1 task done
pmanester opened this issue Jan 18, 2025 · 0 comments
Open
1 task done

Auth User and User cant be created for log in on apps #5421

pmanester opened this issue Jan 18, 2025 · 0 comments

Comments

@pmanester
Copy link

Describe the bug

bolt.new's Supabase integration has issues with migration management. It generates duplicate migrations that attempt to recreate existing database objects, leading to constraint violations and policy conflicts. The system needs to properly track migration state and prevent duplicate operations across multiple migration files.

i have been working with this issue on 2 or 3 appas now and have burnt at least 10 million tokens, if not more, trying to get it fixed

Link to the Bolt URL that caused the error

https://bolt.new/~/sb1-ffoczrjm

Validations

  • Please make your project public or accessible by URL. This will allow anyone trying to help you to easily reproduce the issue and provide assistance.

Steps to reproduce

try logging into my app in preview and it just cant fix the log in issue, i asked bolt.new to Analise the issue and this is what he stated.

The core problem appears to be with how Supabase migrations are being handled in bolt.new:

Multiple migration files are being created with overlapping/duplicate operations:

Creating the same tables multiple times
Inserting the same demo data multiple times
Creating the same RLS policies multiple times
The migrations are not being properly sequenced or tracked:

Later migrations try to recreate tables that already exist
Try to insert data with IDs that already exist
Try to create policies that already exist
The error chain shows this clearly:

Error 1: "duplicate key value violates unique constraint "users_email_key""
Error 2: "policy "Anyone can view active properties" for table "properties" already exists"
Error 3: "duplicate key value violates unique constraint "users_pkey""

Expected behavior

Should be clean log in as the system created log in credentials for testing

Screen Recording / Screenshot

No response

Platform

Browser name = Chrome
Full version = 131.0.0.0
Major version = 131
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
performance.memory = {
  "totalJSHeapSize": 203267077,
  "usedJSHeapSize": 196051213,
  "jsHeapSizeLimit": 4294705152
}
Username = pmanester
Chat ID = 3b2b1104cc16
Client version = b03c990
Server version = b03c990

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant