Troubleshooting
Solutions for common DebugBundle issues: SDK not capturing events, CLI errors, webhook delivery failures, and more.
SDK Not Capturing Events
Events not appearing in .debugbundle/local/events/
-
Check
enabledis notfalse:DebugBundle.init({ projectToken: 'local', enabled: true, // Default, but verify it's not overridden }); -
Check the project token: Use
'local'for local-only mode or a validdbundle_proj_*token for connected mode. -
Check the
projectMode: Inlocal-onlymode, events write to disk. Inconnectedmode withdevelopmentenvironment, events also write to disk. Inconnectedmode withproduction, events send to the API. -
Flush on exit: The SDK flushes on process shutdown, but if your process is killed with
SIGKILL, buffered events are lost. CallDebugBundle.flush()if you need to force a flush. -
Check
sampleRate: A value of0drops all events.
Events not showing in the cloud
- Verify the project token: Run
debugbundle verify cloud --project-id proj_xxx. - Check the endpoint: Ensure
endpointin SDK config points to the correct API URL. - Check rate limits: The API returns
rate_limitederrors in the response. Check your tier's limit. - Check network: Ensure your environment can reach
api.debugbundle.com(or your self-hosted endpoint).
CLI Issues
debugbundle setup fails
- Run from project root: Setup needs to find
package.jsonor a recognized project structure. - Check permissions: Setup creates directories and writes files. Ensure write access to the project directory.
- Re-run with
--non-interactive: If the interactive prompts hang (e.g., in CI), usedebugbundle setup --non-interactive.
debugbundle process — "No events to process"
Events must exist in .debugbundle/local/events/. Verify:
ls .debugbundle/local/events/If empty, your SDK or log ingestion hasn't written events yet. See Local Workflow for capture steps.
debugbundle doctor shows warnings
| Check | Fix |
|---|---|
profile: missing | Run debugbundle setup |
profile: stale | Review and update .debugbundle/profile.json, update last_reviewed_at |
connection: missing | Run debugbundle setup |
auth: missing | Run debugbundle login <member-token> |
skill: missing | Run debugbundle validate --fix |
Authentication errors (exit code 2)
- Check auth file exists:
ls ~/.debugbundle/auth.json - Re-login:
debugbundle login dbundle_mem_xxxxxxxxxxxx - Verify token is valid:
debugbundle whoami - Check token type: Cloud commands require a member token (
dbundle_mem_*), not a project token.
Cleaning up intentional smoke incidents
Treat open incidents as actionable work. After a fix is verified, or after an intentional smoke, dogfood, or verification incident has served its purpose, resolve it.
- Review the open queue:
debugbundle incidents --status open --json - Resolve the intentional incidents:
debugbundle resolve <incident-id> - Re-check the queue:
debugbundle incidents --status open --json
If you use jq, you can batch-resolve common synthetic titles:
debugbundle incidents --status open --json \
| jq -r '.incidents[] | select(.title | test("smoke test|dogfood|verification|synthetic"; "i")) | .incident_id' \
| xargs -n1 debugbundle resolveWebhook Delivery Failures
Deliveries stuck in retrying
- Check your endpoint is reachable: DebugBundle sends POST requests to your URL. Ensure it returns 2xx.
- Check response time: If your endpoint is too slow, deliveries may time out.
- Verify the URL:
debugbundle webhook list --project-id proj_xxxto confirm the URL is correct.
Signature verification fails
- Use the raw request body: Parse the HMAC from the raw string body, not the parsed JSON. Middleware that modifies the body (e.g., body parsers) can break verification.
- Use timing-safe comparison: Always use
crypto.timingSafeEqual()(Node.js) orhmac.compare_digest()(Python). - Check the signing secret: The secret is shown once at webhook creation. If lost, delete and recreate the webhook.
Webhook auto-disabled
After repeated delivery failures, webhooks are automatically disabled. To re-enable:
debugbundle webhook update whk_xxx --is-enabled trueFix the underlying delivery issue first, then re-enable.
Browser SDK Issues
Events not captured
- Check
enabled: Verify it's not disabled. - Check
sessionSampleRate: A value of0drops all sessions. - Check ad blockers: Ad blockers may block requests to
api.debugbundle.com. Use the relay transport to route through your own backend. - Check CSP headers: If your Content Security Policy blocks the DebugBundle endpoint, add it to
connect-src.
Relay not working
- Verify the relay handler is registered: Check your Express/Fastify/Next.js route handles POST to
/_debugbundle/browser. - Check CORS: The relay should be same-origin, so CORS shouldn't apply. If using a different origin, configure CORS.
- Check the relay spool: Run
debugbundle doctor --check-relayto check for stuck spool files.
Self-Hosted Issues
Containers fail to start
- Check Docker is running:
docker info - Check port conflicts: The API, Postgres, Redis, and LocalStack all bind to ports. Ensure no conflicts.
- Bootstrap S3: The API requires the
debugbundle-raw-eventsbucket. Runmake s3-bootstrapormake infra-bootstrapbefore starting.
API returns 500 errors
- Check Postgres is healthy:
docker compose ps— Postgres should show "healthy". - Check Redis is running: Redis is required for rate limiting and sessions.
- Check container logs:
docker compose logs apifor error details.
Getting Help
If you're stuck:
- Run
debugbundle doctor --jsonand review the full diagnostic output - Check the FAQ for common questions
- Open an issue on GitHub with the doctor output and reproduction steps