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 on the current machine. Inconnectedmode withdevelopment, events also write to disk. Inconnectedmode withstagingorproduction, events send to the API instead of relying on local disk. -
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. - Prove ingestion with a synthetic incident: Run
debugbundle verify cloud --project-id proj_xxx --trigger-5xx, ordebugbundle verify cloud --project-id proj_xxx --trigger-4xx 403when the capture policy promotes that client-error status. - 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). In Kubernetes or other locked-down environments, verify outbound HTTPS egress rules, firewall allowlists, and any required proxy configuration.
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. On a server-local workflow, verify you are checking the same server or mounted volume where the application writes .debugbundle/local/events/. 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 to choose an auth flow |
skill: missing | Run debugbundle validate --fix |
Authentication errors (exit code 2)
- Check auth file exists:
ls ~/.debugbundle/auth.json - Re-login:
debugbundle login - 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 active incidents as actionable work. Active means open or regressed. After a fix is verified, or after an intentional smoke, dogfood, or verification incident has served its purpose, resolve it.
- Review the needs-attention queue:
debugbundle incidents --status active --json - Resolve the intentional incidents:
debugbundle resolve <incident-id> [incident-id ...] - Re-check the queue:
debugbundle incidents --status active --json
If you use jq, you can batch-resolve common synthetic titles:
debugbundle incidents --status active --json \
| jq -r '.incidents[] | select(.title | test("smoke test|dogfood|verification|synthetic"; "i")) | .incident_id' \
| xargs 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 --project-id proj_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. This applies to browser delivery only, not to Node.js, Python, PHP, or .NET server SDKs.
Bundle points at debugbundle-browser-sdk.js
If a frontend bundle shows Window error or Browser resource load error with the first frame inside debugbundle-browser-sdk.js, the SDK usually observed an opaque browser-level error rather than causing the failure. The browser did not provide a usable application stack, so DebugBundle records the global hook metadata in payload.browser_event.
Check these fields first:
browser_event.kind:resource_errorpoints to a failed script, stylesheet, image, or similar browser resource.window_errormeans a global error event reached the SDK without a normalErrorobject.browser_event.target.source_url: The best clue for resource-load failures.browser_event.file_name,line_number,column_number: The browser's source-location fields when available.
To improve future captures, initialize the Browser SDK before app code, add framework-level captureException(error) calls for error boundaries, publish source maps, and configure CORS plus crossorigin="anonymous" for cross-origin scripts.
Relay not working
- Verify the relay handler is registered: Check your Express/Fastify/Next.js route handles POST to
/debugbundle/browser(or your configured relay path). - 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. - Check relay storage in containers: If you rely on durable relay writes, mount
spoolDiron persistent storage. Otherwise, spool files disappear when the pod or container is replaced.
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