JavaScriptError "Unspecified error." with no stack trace or further information to investigate

Hi there

Has anyone come across the issue within ‘Browser’ > ‘Js Errors’ where by the error is “Unspecified error.” and there is no stack trace or other means (that I can find) to investigate the root cause?

I have looked at the ‘raw’ logs via ‘JavaScriptError’ data, but as expected it is just the same info as that above.

Any help or suggestions would be appreciated.


Hi @DJC,

When most of your error reports are missing stack traces or have really generic error messages, it’s often a sign that the agent isn’t working as well as it should be due to installation or configuration issues. In particular, if the error occurs while our script is still loading, you’re not going to get useful details or stack traces.

I took a look at a couple of your applications and it looks like you’re using a really old version of the Browser agent. I also see that you’re dynamically setting the application ID, and in the process bundling and loading our script from an external file that’s being loaded quite late, after a number of other scripts.

So my recommendation would be to start with bringing the agent version up to date and fixing the installation. If you need to change the application ID dynamically, it’s better to keep the script inline in the application’s head and just replace the application ID. If you search the forums, you can probably find a couple of examples of this, such as here and here.

I’d also advise reviewing some of our documentation on the installation requirements as a refresher:

I hope that helps!


Hi @hwilkalis (or other interested and similarly helpful person :smile: )

we’re seeing a similar error, only in IE11 but we’re using the APM agent to automatically inject the snippet for us. Do you have any suggestions for how to resolve this?

The best idea I can think of right now is to disable auto instrumentation and call the agent at the top of the head tag. I’d like to avoid that if possible to not have to add it in a few different areas, but can if it’s the only solution.

Thanks for your help!


I’m always happy to be thought of as a helpful person! :slight_smile:

I was able to get your installation information and the public URL from your account data. In your case, the installation itself looks pretty solid but when I inspected the element from your home page in the developer tab, it looks like our script is being pre-empted and execution delayed by a number of other scripts, so that’s something to take a look at. Also, you can assign custom attributes to JS error events using the noticeError() API call. If you can think of data that we’re not already providing on these errors that could help you track them down, you might be able to collect it that way.

Do let us know if you find a solution to this - we’re always interested to add to the collective knowledge base, particularly when it comes to the stubborn IE errors!

Hi @hwilkalis

Apologies for the huge delay on this, and thank you for your reply. Priorities, timings etc have almost made me forget about this.

So for the particular app I have problems with, we have upgraded to the latest agent version. Also, this particular app is not dynamically setting the application id.

The error title has now changed (I believe) to ‘Script error.’, and we do get some stack traces, or pointers to 3rd party scripts that are throwing some errors. However, a large proportion have the following:

Stack trace (1 frame)
No source maps associated with this error.
Error: Script error.
at anonymous
This frame cannot be unminified
This error is likely coming from a third-party site and no stack trace is available.

To learn more about the solution to this problem, read our documentation.

The link goes to, which basically talks about CORS. The problem is there is no detail as to what endpoint/code is trying to call what.

Thanks again

Hi @DJC,

Are you using third-party scripts in the application? That’s usually what this indicates. If you have a link to the error I can take a look at it and see if there’s any insight we can provide.

Thanks @hwilkalis

There are 3rd party scripts for sure, and it is likely a 3rd party script causing the issue. However with this in mind I have a couple of questions:

  1. How do I narrow down which 3rd party script is at fault
  2. If we can’t narrow it down, then we have alerting on javascript errors and we will never be able to identify this issue source
  3. Some other errors caused by 3rd party scripts do show stack traces.

I will PM you some details.


DJC and I are chatting about this privately - we’ll update the discussion once some conclusions are reached.

1 Like

Hi, we’re getting a lot of this kind of errors (Script error + link to CORS) and is very hard to trace what is their source. @hwilkalis I know is long since posting here, but did you come to any conclusions?

@matej.strasek I will see if another support team member can respond to your question since @hwilkalis is no longer a member of our team. Thanks for your patience :slight_smile:

Thanks! :slight_smile:

@matej.strasek Hi there!

I understand you are seeing JavaScript errors that read “Script Error”, is that correct? Are you using third-party scripts in the application? That’s usually what this indicates.

I wanted to pass along our documentation link here that details this behavior. I would investigate enabling CORS.

If there is anything else you need, please let us know!

1 Like