Troubleshooting

Common auth, RLS, realtime, and build issues.

Common issues when onboarding or deploying Creative Hub.

Auth issues

SymptomFix
Redirect loop on loginCheck NEXT_PUBLIC_SITE_URL matches actual URL
OAuth code errorAdd callback URL to Supabase redirect list
Skip login missingSet DEV_AUTH_BYPASS=true in .env.local only
Magic link rate limitUse Google sign-in instead

RLS errors

"Row level security" or empty results often mean the user is not a project member. Check hub_project_members.

Realtime not updating

  • Confirm table is in the Realtime publication (migrations enable this)
  • Check browser console for channel subscription errors
  • Verify user has SELECT permission via RLS on the row

Build failures

bash
npm run typecheck   # isolate TS errors
npm run build       # full Next.js build

See AGENTS.md for Next.js 16 breaking changes.