Sistine Docs

Troubleshooting

Common issues and how to resolve them.

Webhooks Not Firing

Symptoms: Payments succeed but credits aren't granted.

Every delivery is recorded, so start by asking the database instead of guessing:

select received_at, provider, event_type, status, attempts, last_error
from webhook_event order by received_at desc limit 20;
What you seeWhat it meansFix
No rows at allProvider never reached usCheck the endpoint URL in the provider dashboard, and that Deployment Protection / an auth wall isn't intercepting requests
status = failed, last_error mentions signatureWrong secret/key deployedpnpm verify:signature https://your-domain.com
status = ignored, reason skip:no-userEvent carries no resolvable user_id — usually a deleted accountManual review / refund
status = ignored, payment-applier-not-implementedOrder landed before credit granting existedpnpm payments:replay
status = processed but no creditsCredit grant is keyed on payment.provider_payment_id; the payment may already have been grantedCheck payment + credit_ledger for that payment

Two things that look like "our endpoint is broken" but aren't:

  • A CDN proxy in front of the app (Cloudflare orange cloud) can rewrite the body, so the signature never verifies. Use DNS-only.
  • Dodo's SDK default tolerance is 5 minutes while retries span ~18 hours. This repo verifies by hand with a 24-hour window for exactly that reason — if you swap in the SDK helper, later retries will all 401 and the events will be lost.

Annual Credits Not Auto-Granting

Symptoms: Users on yearly plans don't receive monthly credits.

  1. Verify cron job is running (check /api/cron/subscription-grants)
  2. Check subscriptionCreditSchedule table for nextGrantAt timestamps
  3. Ensure CRON_SECRET is configured correctly

User Can't Access Admin Panel

  1. Confirm user.role = 'admin' in the database
  2. Check features/admin/components/admin-guard.tsx logic
  3. Ensure the user's session is valid (try logging out and back in)

Email Not Sending

  1. Verify RESEND_API_KEY is set correctly
  2. Check Resend dashboard for delivery logs
  3. In development, emails may use onboarding@resend.dev as sender
  4. For production, verify your sending domain in Resend

AI API Returning Errors

  1. Check VOLCANO_ENGINE_API_KEY is valid
  2. Verify VOLCANO_ENGINE_API_URL endpoint
  3. Check your Volcano Engine quota/balance
  4. Review server logs for specific error messages

Database Connection Issues

  1. Verify DATABASE_URL connection string
  2. Ensure ?sslmode=require for cloud databases
  3. Check if your IP is allowlisted (if using IP restrictions)
  4. Try connecting directly: psql $DATABASE_URL

Build Errors After Upgrade

If you encounter TypeScript errors after upgrading dependencies:

# Clear Next.js cache
rm -rf .next

# Reinstall dependencies
pnpm install

# Try building again
pnpm build

On this page