0%
Vibe44 Logo

Troubleshooting

Searchable reference for common issues. Ctrl+F your error message.

Quick triage: npm run type-check. If it passes, the issue is environmental (env vars, service connectivity), not code.

Quick Reference

IssueFix
Port in useRun npx kill-port 3000, then npm run dev
TypeScript errorsnpm run type-check
DB out of syncnpm run db:push
Build failsCheck .env.local, npm run build locally
Auth brokenVerify Supabase env vars
Setup wizard failsRe-run with --dry-run, then resume or reset the project checkpoint
Payments failingCheck webhook secret env var
AI silentGEMINI_API_KEY missing or invalid
Dark mode brokenSemantic tokens (bg-background), not bg-white
Motion too largem from motion/react, not framer-motion
Translation missingnpx tsx scripts/find-missing-locale-keys.ts

️ Development

Setup Wizard

The setup wizard checkpoints each project under ~/.vibe44/setup-wizard/{projectHash}.json. It never persists apiKeys.

ProblemFix
Interrupted prompt flownpm run setup-wizard -- --resume
Bad saved answersnpm run setup-wizard -- --reset
Need to preview generated env filesnpm run setup-wizard --dry-run or npm run setup-wizard -- --dry-run
Dry-run prints redacted secretsAdd --show-secrets only in a private terminal
Existing .env.local conflictUse merge, backup-and-overwrite, overwrite, or abort; --yes defaults to merge
Database schema not appliedPaste the contents of supabase/schema.sql into the Supabase SQL Editor, or use Supabase MCP.
Vitest or build tools fail with spawn EPERM on WindowsRe-run outside the sandbox or with worker spawning permitted

Port in Use

Error: listen EADDRINUSE: address already in use :::3000
npx kill-port 3000
npm run dev

Node Version

Requires 20+. node -v. Use nvm use 20 if needed.

Dependencies

rm -rf node_modules package-lock.json
npm install

Authentication

ProblemFix
"Invalid login credentials"Verify email confirmed in Supabase Auth
Magic link not arrivingCheck spam, Supabase → Auth → Logs
Session not persistingVerify NEXT_PUBLIC_SUPABASE_URL, test incognito
OAuth redirect failsAdd {NEXT_PUBLIC_APP_URL}/auth/callback to provider console
OAuth cancel redirects to localhostUpdate Site URL in Supabase Dashboard (Auth -> URL Configuration) to your production domain (e.g. https://vibe44.com)
Sidebar missing after loginLogin must use window.location.href (hard nav)
"Auth error" after verify/verified calls signOut() to clear stale session
Duplicate email successExpected. Check data.user?.identities — empty = exists
/auth/callback crashRoute parses error params, redirects with toast
MFA bypassed via OAuthproxy.ts checks AAL2, redirects if not met
Passkey MFA flashhandlePasskeyLogin() mounts MfaChallenge inline
Feature page still accessibleServer-side is[Feature]Enabled() guards
Sidebar hydration crashStable IDs in Radix tooltips/collapsibles
Email verified page shows twiceServer-side OTP action redirects immediately to /verified
useTranslations crashNeeds NextIntlClientProvider wrapper

Password Reset: 401 / PKCE

  1. /auth/callback calls exchangeCodeForSession(code)
  2. redirectTo: {NEXT_PUBLIC_APP_URL}/auth/callback?next=/reset-password
  3. /reset-password NOT in AUTH_ROUTES
  4. After reset: signOut() to invalidate

️ Database & Supabase

ProblemFix
"relation does not exist"npm run db:push
RLS blocking queriesCheck policies, verify role
Drizzle migration errorsnpm run db:generate then db:push
Standalone index crashInside pgTable() third arg (Drizzle #5064)
Pool exhaustedPooled connection (port 6543)
Supabase 429Client-side caching
Avatar upload RLS errorUses service role client; see api/user/avatar

Payments

ProblemFix
Webhook not processingVerify {PROVIDER}_WEBHOOK_SECRET
"Customer not found"Check stripe_customer_id in profiles
Subscription not updatingEnable webhook events in provider dashboard
Duplicate subscription/purchaseConfirm the latest provider-resource unique indexes are applied
Test → live failsSwitch to live keys, update endpoint URL
Creem 401Verify CREEM_WEBHOOK_SECRET
Creem duplicate retriesConfirm sandbox payloads include durable event.id
Dodo orphaned recordssyncSubscriptionToDb requires valid userId
Sentry not capturingVerify @sentry/nextjs, providers use captureError()
Health false-positiveCheck provider-specific env vars

Local Webhooks

stripe listen --forward-to localhost:3000/api/webhooks/stripe
ngrok http 3000  # All others

AI & Voice

ProblemFix
"API key not valid"Verify GEMINI_API_KEY, enable API
Embeddings failingEnsure @google/genai SDK is up to date
Widget not loadingisAiChatEnabled() returns true
RAG emptyRe-embed after model change, enable pgvector
Mic deniedHTTPS (or localhost), check permissions
Audio silentCheck ELEVENLABS_API_KEY, user must interact first
Murf audio rejectedConfirm the provider audioFile URL is public HTTPS and passes SSRF checks

Frontend & Styling

ProblemFix
Hydration mismatchuseEffect for dynamic values, suppressHydrationWarning
Dark mode brokenbg-background / text-foreground, never hardcoded
Card inconsistentUse GlowCard, not inline glassmorphism
Chart colors wrongCHART_COLORS from @/lib/constants/chart-colors
Motion too largeimport { m } from "motion/react"
Empty src warningAvatarImage normalizes "" to undefined; uses object-cover for 1:1 crop
React Compiler loopuseCallback with explicit deps

Analytics

ProblemFix
Not loadingVerify NEXT_EXTERNAL_ANALYTICS_PROVIDER, provider env vars, and stored analytics consent
Mixpanel not trackingEnsure NEXT_PUBLIC_MIXPANEL_TOKEN is set correctly and consent is granted
PostHog not trackingHost URL must start with https:
GA4 ID rejectedOnly G- prefix (not UA-)
DataFast not loadingSet both NEXT_PUBLIC_DATAFAST_WEBSITE_ID and NEXT_PUBLIC_DATAFAST_DOMAIN
Duplicate pageviewsVerify manual page tracking is not duplicated outside AnalyticsProvider
SSR hydration"use client" on analytics components
PII leaktrackSignup() excludes email; scripts stay disabled until explicit analytics consent

Build & Deploy

ProblemFix
Build failingnpm run type-check, verify env vars
Vercel env missingProject Settings → correct environment, redeploy
Railway env missingVariables tab,railway variables CLI
CSP errorsproxy.ts nonce-based CSP + strict-dynamic
500 in productionRuntime logs, verify DATABASE_URL + API keys

Passkeys & MFA

ProblemFix
Registration failsChrome 67+, Firefox 60+, Safari 14+, HTTPS
Challenge expiredComplete within 60 seconds
"Invalid TOTP"Sync authenticator clock (30s windows)
AAL2 not reachedgetAuthenticatorAssuranceLevel() to verify

i18n

ProblemFix
Switcher not visibleisI18nEnabled() returns true in lib/config/app.ts
Translations not loadingCheck locales/frontend/{locale}.ts
Wrong namespaceuseTranslations('namespace') matches top-level key
Cache staleRemove .next, then run npm run dev

Background Jobs

ProblemFix
Not executingEnsure BACKGROUND_JOBS_PROVIDER is set (qstash or trigger) and correct keys are provided in .env.local.
QStash failuresVerify QSTASH_TOKEN, current/next signing keys, and ensure webhook signature verification passes in production.
Trigger.dev failVerify TRIGGER_SECRET_KEY and TRIGGER_PROJECT_ID are set.
Dev disconnectedFor Trigger.dev: run npx trigger.dev dev alongside npm run dev. For QStash: use a local tunnel (e.g., ngrok).
Failing silentlyCheck your active provider's dashboard (Upstash QStash schedule history or Trigger.dev Run logs).

oRPC API

ProblemFix
/api/rpc/* 404Verify app/api/rpc/[...path]/route.ts exists
Validation failsZod schema matches payload
Generic 500Use ORPCError("NOT_FOUND") with i18n
Wrong base URLlib/rpc/client.ts derives from config.app.url
Namespace missCommon.serverErrors (not bare serverErrors)

Unit Testing (Vitest)

ProblemFix
redirect throwsMock with vi.fn() wrapper
Class mock failsUse function() not arrow
Module mock broken@/lib/... paths match vitest.config.ts aliases
Stale mock refWrapper functions, not vi.resetModules()
db.update() chainMock full chain:.set().where()
getTranslations mismatchvi.fn().mockImplementation(async () => (key) => key)
MFA enrollMfa failsMock mfa.listFactors() → { totp: [] }
npm test                                      # All
npm test -- tests/unit/actions/billing.test.ts # Single
npm test -- --reporter=verbose                # Verbose

Super-Admin

ProblemFix
Can't access /super-admin/*role = 'super-admin' in profiles
Redirects to dashboardSUPABASE_SECRET_KEY set
Actions not loggingRLS allows super-admin inserts to activity_logs
Role change no effectUser must re-login

Copyright © 2026 Vibe44. Built with ❤️ by Scale with Alap.