Skip to content
Browser noise errors

"Script error." with no stack trace: what it means and how to fix it

Script error.

What it means

The browser hides the details of an error thrown by a script loaded from another origin unless that origin allows it. Your window.onerror handler gets the literal message "Script error.", line 0, and no stack, so nothing leaks across origins.

It usually comes from a script on a CDN or a third-party tag: analytics, ads, chat widgets, A/B testing.

Is it a real bug?

It can be: something really did throw. But with no message or stack there is nothing to act on, and most of the time it is a third-party script you do not control.

To see your own errors in full, load your scripts with crossorigin="anonymous" and serve them with Access-Control-Allow-Origin. After that, any "Script error." left is from someone else's code.

How to filter it

For any Sentry-compatible browser SDK:

<script src="https://cdn.example.com/app.js" crossorigin="anonymous"></script>

Sentry.init({
  dsn: "...",
  ignoreErrors: [/^Script error\.?$/],
});

In RealUptime Errors

You do not need the filter above. RealUptime Errors drops this error by default, before it reaches your quota, and counts every drop on the issue list so nothing disappears silently. What we match: A message of exactly "Script error." (or without the period) and no stack frames. One with a stack is kept.

To see these errors anyway, turn off the noise filter for a project in Errors settings. It works the same for the RealUptime SDK and for Sentry SDKs pointed at RealUptime.