cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

This product reached the end of support date on March 31, 2021.

Capturing Javascript Errors

paulseward
Inactive

Hi,

Someone added a Tag to our page (within the business) which caused an ad to stop displaying (marketing went into a spin!).

The error shown in Chrome's console was:

Failed to execute 'write' on 'Document': It isn't possible to write into a document from an asynchronously-loaded external script unless it is explicitly opened.

Does anyone know how I can measure these errors to alert us to the fact that something is failing on the page. I added an error rule but think that may only work if using the browser agent.

Paul

11 REPLIES 11

paulseward
Inactive

Worryingly when loading the same page in Firefox/Firebug I seen the attached with the .js being Dynatrace.capture.jpg

nishant_rama
Dynatrace Advisor
Dynatrace Advisor

Hi Paul, Are you using User Experience Management? If so then you should see the error under javascript error or client error and once you see it here you should be able to right click on the error and create a measure to see a count or how many users were affected. Let me know if you require assistance doing this. If you are not using UEM then for you to capture the client side JS error you will need UEM turned on.

Regards

Nishant

paulseward
Inactive

Nathan,

I am using UEM and I do not see the error, i have looked at th eUser Action Pure Path and can see the request but it does not show the error.

Paul

Hi Paul,

Under client error when you search you havent found the error?

Nish

paulseward
Inactive

Nathan,

I can see 2 errors but they dont relate to the error in the console.

Paul

capture.jpg

Hi Paul,

The errors are they occuring on a page that has dynatrace instrumented on it? e.g. are you seeing the dtagent injection and POST signal in chrome developer tools?

Regards

Nish

paulseward
Inactive

I can see the agent and I can see visits.

Hi Paul,

When I hit the site you were looking at I do not see the error:

handv.png

This is very strange. Just to confirm the issue is looking for a specific javascript error correct? or are you worried the dtagent is causing the error?

Regards

Nish

paulseward
Inactive

Hi,

We had to remove the tag which was causing the error. so we could get the Ads working.

Paul

nishant_rama
Dynatrace Advisor
Dynatrace Advisor

Hi Paul,

next time you see that error it should show up under the client errors dashlet. If it doesnt then it means the out of box javascript agent cannot capture this which means you might need to use the custom Javascript ADK to capture these types of errors. I would reach out to Dynatrace support for more help around this matter. In regards to the dtagent causing issues with the page I would also open a support ticket to find out why the error is being caused by the dynatrace javascript agent.

Regards

Nishant

paulseward
Inactive

Thanks, Nishant.

Sounds like a plan.

Paul