# Error Tracking troubleshooting - Docs

This page covers troubleshooting for Error Tracking. For setup, see the [installation guides](/docs/error-tracking/installation.md).

## Have a question? Ask PostHog AI

Ask PostHog AI

## Exceptions not appearing

If PostHog isn't capturing errors:

1.  Use the [SDK Doctor](/docs/sdk-doctor.md) to verify your SDKs are updated to the latest version

2.  Verify **exception capture** is enabled in the [**Configuration** tab](https://app.posthog.com/project/2/error_tracking?activeTab=configuration#selectedSetting=error-tracking-exception-autocapture) in Error Tracking

3.  Only unhandled exceptions auto-capture. For caught errors, use `posthog.captureException()`:

    JavaScript

    PostHog AI

    ```javascript
    try {
        // code that errors
    } catch (error) {
        posthog.captureException(error)
    }
    ```

4.  Wait a few minutes and check [Error Tracking in the PostHog app](https://app.posthog.com/error_tracking). Issues may take a few minutes to update after ingesting new error events

## Source maps not resolving

If stack traces show minified code instead of original source:

1.  Verify source maps are uploaded to the correct project by navigating to [Error Tracking](https://app.posthog.com/project/2/error_tracking?activeTab=configuration#selectedSetting=error-tracking-symbol-sets). You'll see warnings for missing symbol sets
2.  Source map paths must match your production bundle URLs exactly
3.  Upload source maps *before* deploying code that references them

See the [source maps guide](/docs/error-tracking/upload-source-maps.md) for upload instructions.

## 'Script error' with no stack trace

For security purposes, browsers hide error details from scripts loaded from different domains. This shows as `Script error` with no stack trace.

To fix, add `crossorigin="anonymous"` to your script tags:

HTML

PostHog AI

```html
<script src="https://your-cdn.com/app.js" crossorigin="anonymous"></script>
```

If the script is within your control, also set the `Access-Control-Allow-Origin` response header to your origin:

PostHog AI

```
Access-Control-Allow-Origin: https://yourdomain.com
```

Or allow any origin:

PostHog AI

```
Access-Control-Allow-Origin: *
```

You can also use [session recordings](/docs/session-replay.md) to see what user actions triggered the error.

## 'Non-Error promise rejection' with no stack trace

This happens when you reject a promise with a string instead of an `Error` object. Without an `Error` object, there's no stack trace to capture.

PostHog AI

### Without

```javascript
new Promise((resolve, reject) => {
  reject('Something went wrong'); // String has no stack trace
});
Promise.reject('Something went wrong');
```

### With

```javascript
new Promise((resolve, reject) => {
  reject(new Error('Something went wrong')); // Error includes stack trace
});
Promise.reject(new Error('Something went wrong'));
```

For third-party libraries that reject with strings, wrap the rejection:

JavaScript

PostHog AI

```javascript
somePromise()
  .catch(err => {
    posthog.captureException(new Error(err))
    throw err
  })
```

## 'Minified React error' with no stack trace

In production builds, React removes debugging information to reduce bundle size. Errors look like:

PostHog AI

```
Minified React error #123; visit https://reactjs.org/docs/error-decoder.html?invariant=123
```

To debug:

1.  Upload source maps to get readable stack traces. See the [source maps guide](/docs/error-tracking/upload-source-maps.md)
2.  Visit the error URL in the message to understand what went wrong
3.  Watch [session recordings](/docs/session-replay.md) to see what user actions triggered the error, then reproduce in development
4.  Use a development build which includes full error messages. Only use this for debugging, not production

## Grouping or assignment rules disabled

Rules can become disabled if PostHog encounters a processing error while evaluating the rule during exception ingestion. When a rule is disabled, a banner appears in the [Error Tracking **Configuration** tab](https://us.posthog.com/error_tracking) showing the error message.

To fix and re-enable a disabled rule:

1.  Go to your [custom grouping rules](/docs/error-tracking/grouping-issues.md#custom-grouping-rule) or [auto assignment rules](/docs/error-tracking/assigning-issues.md#automatic-issue-assignment) in the **Configuration** tab
2.  Find the rule with the disabled banner and review the error message
3.  Edit the rule to correct the configuration issue
4.  Save the rule – this automatically re-enables it

If the error persists after editing, reach out to support.

## Solved community questions

### Community questions

Ask a question

### Was this page useful?

HelpfulCould be better