Summary
Signing in to https://hyperspace.sh with Google (the only available auth method) consistently fails. After completing the Google OAuth consent screen, the user is redirected back to the landing page with this URL:
https://hyperspace.sh/?error=server_error&error_code=unexpected_failure&error_description=Database+error+saving+new+user#error=server_error&error_code=unexpected_failure&error_description=Database+error+saving+new+user&sb=
No account is created and there is no way to proceed. The same error also occurs when running hyperspace login from the CLI — so this is not a browser-specific issue; the failure is server-side in the Supabase Auth flow.
Likely cause
This is a known Supabase Auth failure mode. error_description=Database error saving new user is returned when the on_auth_user_created trigger (or equivalent function inserting into public.profiles / public.users) raises an exception during the auth.users insert. Common root causes:
- A
NOT NULL column in the profiles table that the trigger doesn't populate (e.g. username, full_name, avatar_url).
- Missing
GRANTs / RLS policy blocking the trigger's insert under the supabase_auth_admin role.
- A unique constraint collision (e.g.
username derived from email).
- A recent schema change to the profiles table that wasn't reflected in the trigger function.
Because the failure happens inside the Auth transaction, Supabase rolls back and no row exists in auth.users — retrying doesn't help, and there's no client-side workaround.
Reproduction
Web:
- Open https://hyperspace.sh in a fresh browser session (no prior account).
- Click sign in → continue with Google.
- Complete the Google consent flow.
- Redirected to the landing page with the error querystring above.
CLI:
- Run
hyperspace login.
- Complete the Google OAuth in the browser.
- Same
Database error saving new user is returned.
Impact
Sign-up is fully blocked for new users on both web and CLI — Google is the only auth method offered.
Suggested fix
Check the Supabase project logs (Auth → Logs, or select * from auth.audit_log_entries order by created_at desc) for the underlying Postgres exception, then patch the handle_new_user trigger function accordingly. An email/password fallback would also unblock users while this is being investigated.
Environment
- Browser: Zen
- OS: Linux
- Date observed: 2026-05-20
- Affected surfaces: web (hyperspace.sh) and CLI (
hyperspace login)
Summary
Signing in to https://hyperspace.sh with Google (the only available auth method) consistently fails. After completing the Google OAuth consent screen, the user is redirected back to the landing page with this URL:
No account is created and there is no way to proceed. The same error also occurs when running
hyperspace loginfrom the CLI — so this is not a browser-specific issue; the failure is server-side in the Supabase Auth flow.Likely cause
This is a known Supabase Auth failure mode.
error_description=Database error saving new useris returned when theon_auth_user_createdtrigger (or equivalent function inserting intopublic.profiles/public.users) raises an exception during theauth.usersinsert. Common root causes:NOT NULLcolumn in the profiles table that the trigger doesn't populate (e.g.username,full_name,avatar_url).GRANTs / RLS policy blocking the trigger's insert under thesupabase_auth_adminrole.usernamederived from email).Because the failure happens inside the Auth transaction, Supabase rolls back and no row exists in
auth.users— retrying doesn't help, and there's no client-side workaround.Reproduction
Web:
CLI:
hyperspace login.Database error saving new useris returned.Impact
Sign-up is fully blocked for new users on both web and CLI — Google is the only auth method offered.
Suggested fix
Check the Supabase project logs (Auth → Logs, or
select * from auth.audit_log_entries order by created_at desc) for the underlying Postgres exception, then patch thehandle_new_usertrigger function accordingly. An email/password fallback would also unblock users while this is being investigated.Environment
hyperspace login)