question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Safari still sends (unknown): Script error.

See original GitHub issue

Hi I have a js file hosted on a Amazon S3 bucket.

The cors settings are in place (and are correct I think):

<CORSConfiguration>
	<CORSRule>
		<AllowedOrigin>*</AllowedOrigin>
		<AllowedMethod>GET</AllowedMethod>
		<AllowedMethod>HEAD</AllowedMethod>
		<MaxAgeSeconds>3000</MaxAgeSeconds>
        <AllowedHeader>*</AllowedHeader>
	</CORSRule>
</CORSConfiguration>

Also the script is loaded with the crossorigin setting:

<script crossorigin="anonymous" src="http://open-cdn.s3.eu-central-1.amazonaws.com/dhlsnippet.prod.1.0.11.js?v"></script>    

With chrome and firefox I get the correct logging, but with Safari I still get the ’ (unknown): Script error.’ error.

Do you have any hint what the reason for this could be and how to solve it?

Cheers, Gerwin

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
renanlecarocommented, Jan 30, 2018

@gerwinbrunner i’m facing the same problem, i have tons of “scrip error” reports that are fairly useless as is and they all come from safari. Did you find a way to get more detailed reports ?

0reactions
latelcommented, Dec 21, 2021

any progress here?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unknown(Script Error) - Rollbar Docs
This happens when your JS code is hosted on a different domain (i.e. a CDN). To fix, set. Access-Control-Allow-Origin: * on the JS...
Read more >
"Script Error." errors in window.onerror in Safari only
A workaround is to isolate "Script error." and handle it knowing that the error detail is only viewable in the browser console and...
Read more >
Change Security settings in Safari on Mac - Apple Support
To learn more about fraudulent website warnings, go to the Safari app on your Mac, choose Safari > Settings, click Privacy, then click...
Read more >
What causes a Script error and how to solve them · Raygun Blog
Script errors are mostly likely to be caused by an error within a script that's hosted on a different domain (for example, CDN...
Read more >
What the heck is "Script error"? | Product Blog • Sentry
“Script error” is what browsers send to the onerror callback when an error originates from a JavaScript file served from a different origin ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found