Kehvyn
Debugging "Error: Can't render headers after they are sent to the client."
I'm trying to figure out how to debug the above error.
This happens whenever I hit "Sign Out" on my Supabase Auth + Solid Start project. It's triggered by
setCookie
in my Supabase server client initialization function.
I'm not sure where to start on this one. I've been able to confirm that the problematic cookie is the Supabase Auth Token by logging out the name and the value when it errors: { name: 'sb-<project>-auth-token', value: '' }
Since the code is fairly small here, I'm just going to post it in full.
The HTML
signOutAction
:
createServerClient
:
This is part of a whole template that I've been working on, so I can also submit the whole thing to GitHub in PR form. 🙂18 replies