๐ URGENT PLEASE! Project unhealthy after fixing RLS โ PostgREST, Auth, Realtime still broken
Hi everyone!
Iโm having a serious issue with my Supabase project and could use some help.
What I'm trying to do
I'm running a production web project on Supabase (hosted, not self-hosted), used as backend for a contact form on my Lovable website.
It was working fine until yesterday. When users tried to submit a form, the app started crashing with 404s and no emails were sent (we use Resend to send emails).
What Iโve already done
After checking the logs, I found that one of my RLS policies on ppc_audit_results was using this:
auth.jwt() ->> 'email'
inside a subquery โ which I now know is problematic and deprecated.
So I rewrote it like this:
request_id IN (
SELECT id
FROM ppc_audit_requests
WHERE email = (SELECT auth.jwt() ->> 'email')
)
I saved the policy, restarted the project, and confirmed that there are no more calls to auth.jwt() inside subqueries or loops.
Current status
After restarting the project, I still see:
PostgREST Unhealthy
Auth Unhealthy
Realtime Unhealthy
Logs include:
TenantNotFound: Tenant not found from Realtime
FATAL: couldn't start new transaction from GoTrue
Some 404s and broken health checks
Environment
Platform: Web/mobile
Website: https://headonic.it/
Supabase Dashboard hosted project (plan: Free)
JS SDK: @supabase/supabase-js@2.39.6
Resend for transactional emails
No self-hosting, all Supabase default setup
What I need
Any ideas why the services are still unhealthy after fixing the policy and restarting?
Could this be a deeper issue with the project provisioning?
Should I recreate the project from scratch or is there a fix for this kind of situation?
Thanks a lot in advance
Iโm having a serious issue with my Supabase project and could use some help.
I'm running a production web project on Supabase (hosted, not self-hosted), used as backend for a contact form on my Lovable website.
It was working fine until yesterday. When users tried to submit a form, the app started crashing with 404s and no emails were sent (we use Resend to send emails).
After checking the logs, I found that one of my RLS policies on ppc_audit_results was using this:
auth.jwt() ->> 'email'
inside a subquery โ which I now know is problematic and deprecated.
So I rewrote it like this:
request_id IN (
SELECT id
FROM ppc_audit_requests
WHERE email = (SELECT auth.jwt() ->> 'email')
)
I saved the policy, restarted the project, and confirmed that there are no more calls to auth.jwt() inside subqueries or loops.
After restarting the project, I still see:
TenantNotFound: Tenant not found from Realtime
FATAL: couldn't start new transaction from GoTrue
Some 404s and broken health checks
Platform: Web/mobile
Website: https://headonic.it/
Supabase Dashboard hosted project (plan: Free)
JS SDK: @supabase/supabase-js@2.39.6
Resend for transactional emails
No self-hosting, all Supabase default setup
Any ideas why the services are still unhealthy after fixing the policy and restarting?
Could this be a deeper issue with the project provisioning?
Should I recreate the project from scratch or is there a fix for this kind of situation?
Thanks a lot in advance
