Common Issues
database
Data Not Saving to Database in My AI App
You fill out a form or perform an action in your app, it looks like it works, but when you refresh the page the data is gone. The database isn't saving anything, or data disappears after a page reload.
Error Messages You Might See
new row violates row-level security policy
relation does not exist
column does not exist
42501: permission denied
23505: duplicate key value violates unique constraint
Common Causes
- Database connection is failing silently
- Row Level Security (RLS) policies are blocking inserts/updates
- The app is saving to local state but not making the API call to the database
- Database table structure doesn't match what the app is trying to save
- Missing or wrong database URL in production environment variables
How to Fix It
- Open browser Network tab (F12 > Network) and watch for API calls when you submit data — check for errors
- If using Supabase, go to the SQL editor and check if the table exists and has the right columns
- Check RLS policies — they're the #1 cause of data not saving in Supabase apps
- Verify your database connection string in environment variables
- Check the server/API logs for database errors
Real developers can help you.
Describe what's wrong in plain English. No technical knowledge needed.
Get HelpFrequently Asked Questions
Data saves but disappears after refresh. What's happening?
The app is probably saving to local state (React state, for example) but not actually calling the database API. Check the Network tab for API calls when you submit.
I see a 'row-level security' error. What does that mean?
RLS is a Supabase feature that controls who can read/write data. The AI probably created tables without proper RLS policies. You need to add policies that allow your users to insert and read their own data.