Platform

Troubleshooting

Common issues and how to solve them quickly. If none of these solve your problem, copy the last log from Cloud → Logs into the chat — Master will help you.

Preview is loading indefinitely

  • JavaScript error blocking render — open DevTools → Console.
  • Infinite loop in useEffect due to missing dependencies.
  • Failed API call that does not have .catch().
Hard reload (Cmd/Ctrl + Shift + R) clears the cache.

Edge functions returning 500

  1. Open Cloud → Logs.
  2. Filter by function and status 500.
  3. Click on the record and read the error message + stack trace.

Data not loading (RLS)

If the query returns an empty array without an error, the user probably does not have SELECT permission.

sql
set local "request.jwt.claims" = '{"sub":"<user-uuid>","role":"authenticated"}';
set role authenticated;
select * from public.posts;
reset role;

Auth redirect failing

  • In Cloud → Auth → URL Configuration, set the Site URL to the production URL.
  • Add all dev and preview URLs to Redirect URLs.
  • In signUp, always specify emailRedirectTo.

Timeouts and slow queries

  • Add indexes to the columns you filter and sort by.
  • Limit results (default 1000) and use pagination.
  • Materialized views for heavy aggregations.

Custom domain not working

  • Verify DNS via dig or dnschecker.org.
  • Propagation can take up to 24 hours, usually 5–30 minutes.
  • Cloudflare users: disable proxy (grey cloud, not orange).

AI Gateway 429 / quota

  • Implement exponential backoff (1s, 2s, 4s…).
  • Cache responses in the DB.
  • Upgrade to a paid tier — higher rate limit (60 → 600 req/min).
  • Status 402 = exhausted credit. Top up in Cloud → Billing.

Build failed

In the chat, click on the red "Build failed" label — you'll see the exact TypeScript error. Type "fix build error" and Master will resolve it.

How to read logs

  • Edge function logs — all invocations and console.log outputs
  • Auth logs — sign-up, sign-in, reset password events
  • Database logs — slow queries (nad 100 ms)
  • Realtime logs — client connections and disconnections

When that's not enough

  • Type "I have this error: [paste]" in the chat — Master will read it and suggest a fix.
  • Discord community — answers usually within an hour.
  • For companies: priority support via ticket.