What does Script error. mean, and how do I see the real error?

Script error. means the browser hid a failure from a script on another host, so the message and the stack are empty. The installed browser SDK drops that text and does not store it. The script host must send Access-Control-Allow-Origin, and the script tag must set crossorigin, before the real message can be reported.

Last updated 26 November 2026. By Paul Badarau.

Omar, a fictional developer, loads a typeface file from fonts.example on a portfolio page. The console shows Script error. and Monitoring stays empty.

  1. A browser reports a failure in a script from another host as the text Script error., with no file, no line and no stack, unless that response sends Access-Control-Allow-Origin for the page and the script tag sets crossorigin to anonymous.
  2. The installed @sentry/browser 11.6.0 drops a message that is only Script error. or Javascript error: Script error. on line 0. That drop is on by default. A message that is no longer that text is not dropped by this rule, so the real failure can be stored.
  3. On the script response, send Access-Control-Allow-Origin with the origin of the page. On the tag, set crossorigin to anonymous. Reload. The console and the new issue then show the real type and message.
  4. window.onerror receives the same hidden string until those two are in place. A handler of your own does not uncover a message the browser withheld.

If fonts.example will not send the header, the browser keeps the real message to itself. A script added by a browser extension is in the same position, and the page cannot set the attribute on it. Leave the default drop in place. Storing the text Script error. would not name the failure.

The product page for this is Monitoring.

Start your 14-day free trial