Troubleshooting
Fixes for the failures that show up on a first run.
These are the failures that show up on a first clone or a first deploy. Each one names the symptom and the place to look.
Prisma on Windows
Symptom. prisma:seed or the app container exits with a Prisma engine error after a Windows checkout.
Dev Compose bind-mounts the repo into Alpine. A client generated on Windows does not load there. Run Next on the host, with only Postgres in Docker, or regenerate inside the container:
docker compose -f docker-compose.dev.yml exec app npx prisma generateProduction Compose does not bind-mount the host, so this is a development issue.
The agent never leaves "queued"
Symptom. A Pro research run stays queued.
The worker is a separate process. Dev Compose starts it. A host npm run dev does not. Start npm run worker in a second terminal. In production the worker container has to be running node dist/worker.mjs.
Chat returns 400 or 402
Symptom. OSS chat fails immediately.
400 means OPENAI_API_KEY is missing. 402 means the wallet is empty. The model is not called in either case. Add credits by signing in as the seed user, or by completing Checkout.
Uploads fail, chat still opens
Symptom. On Pro, a knowledge upload errors and chat still answers.
Embeddings require OPENAI_API_KEY even when chat is using Anthropic or Google. The upload fails closed. Chat continues, with search unavailable. ALLOW_MOCK_EMBEDDINGS is a local substitute only.
Compose will not start in production
Symptom. docker compose up exits before the app is healthy.
Production Compose has no fallback for AUTH_SECRET, POSTGRES_USER, POSTGRES_PASSWORD, POSTGRES_DB, NEXTAUTH_URL, NEXT_PUBLIC_APP_URL, or GF_SECURITY_ADMIN_PASSWORD. An empty value counts as missing. The full list is in Configuration.
Too many redirects behind Cloudflare
Symptom. The public URL loops, with ERR_TOO_MANY_REDIRECTS.
Caddy terminates TLS itself. Cloudflare's Flexible mode proxies HTTP to that HTTPS origin. Set the zone to Full (strict), or turn the record to DNS only.
A Stripe event did nothing
Symptom. Checkout succeeded in Stripe and the plan in the app did not change.
Compare STRIPE_APP_ID with the metadata on the event. A foreign appId is acknowledged with HTTP 200 and does not write the plan. Also confirm the endpoint is https://<your-domain>/api/webhooks/stripe and the signing secret in .env is the one Stripe shows for that endpoint.
Where to go next
Account and license questions are in the FAQ.
