> ## Documentation Index
> Fetch the complete documentation index at: https://docs.squasher.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Troubleshooting

> Common reasons Squasher data does not appear and how to verify your setup.

## Errors are not appearing

Check these first:

* Your `SQUASHER_API_KEY` starts with `sq_pk_` and belongs to the same project as `SQUASHER_PROJECT_ID`.
* Your app can reach `https://ingest.squasher.ai`.
* The SDK is initialized before the code path that throws the error.
* For log drains, the provider is sending to the correct project-specific URL.

## SDK verification

Use a small test event to confirm ingestion:

```typescript theme={null}
import { captureError } from "@squasher/node";

await captureError(new Error("Squasher verification error"));
```

If you use Next.js, follow the framework-specific steps in [Next.js SDK](/sdks/nextjs). For plain services, use [Node.js SDK](/sdks/node).

## Enable SDK debug mode

When events do not appear, turn on debug logging to see exactly what the SDK is doing. Two ways:

```bash theme={null}
SQUASHER_DEBUG=1 bun dev
```

Or in code:

```typescript theme={null}
init({
  apiKey: process.env.SQUASHER_API_KEY!,
  projectId: process.env.SQUASHER_PROJECT_ID!,
  debug: true,
});
```

Explicit `debug: true` always wins over the env. Output looks like:

```
[squasher] sent: 7c1d... in 47ms
[squasher] Network error, retry 1/3 in 250ms: ...
[squasher] Event dropped after 3 retries: ...
```

`SQUASHER_DEBUG=1` works in Node, Bun, Deno, and Cloudflare Workers (via env binding). In the browser, set `window.SQUASHER_DEBUG = "1"` before `init()`.

## Stack traces look minified

Upload source maps so Squasher can resolve original files and line numbers. See [source maps](/sdks/source-maps).

## Log drain delays

Some providers batch deliveries. If you use a log drain, wait briefly, then verify the provider still shows the drain as healthy.

## Agent troubleshooting flow

When an agent is debugging a missing event, use this order:

1. Confirm the project id with `squasher projects list`.
2. Confirm the configured key belongs to that project without printing the key.
3. Pull the product query map with `squasher query-guide get --project <project_id>`.
4. Check recent data with the narrowest relevant command, such as `squasher errors list`, `squasher logs search`, `squasher traces list`, `squasher metrics list`, or `squasher agent-observations list`.
5. If using MCP, call `search` for the same operation first, then `execute` the exact request with a bounded time window.

Ask before rotating keys, changing connector settings, deleting data, or dispatching a hosted run.

## Still stuck?

Re-check the setup guide you used:

* [Quickstart](/quickstart)
* [Vercel log drain](/integrations/vercel)
* [Railway log drain](/integrations/railway)
* [Agent DX](/agents)
