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

Stack trace not appearing in a front-end application

tasjordao
Visitor

Hi Guys,

We are missing a stack trace at Dynatrace from our front-end application. We can't see it on the error details (see the image).

Our current structure looks like this:

- App Service (not right, but it is our current service style)
- SPA (Vue) besides other index.HTML files from Static Server Generation (SSG)
- O index.html consumes js files from a CDN (which has another subdomain. So, index.html in domain.com gets JS files from cdn.domain.com)

- OneAgent injection

- Our frontend has the source map configuration

Any ideas on how to solve it?

5 REPLIES 5

ChadTurner
DynaMight Legend
DynaMight Legend

@tasjordao are you still having this issue? If you resolved it would you mind sharing with us your findings and resolution? 

-Chad

asp-vm
Participant

I would be interested as well on what the solution was if one was found

gbaudart
Champion

Hi @ChadTurner , @asp-vm ,
While waiting for an answer from the author, I know that in my case I had to add the x-dtc header so that the user actions correlated well with my traces.

In certain cases, if you use agentless and if you activate cross-origin, it may be necessary to pass the x-dtc header into CORS in order to be able to link user actions (or errors) to backend traces.

documentation link : https://docs.dynatrace.com/docs/platform-modules/digital-experience/web-applications/initial-setup/l...



Observability consultant - Dynatrace Associate Certified

simon_schatka
Dynatrace Helper
Dynatrace Helper

I don't see how the x-dtc header would affect the stacktrace of an error, as they have nothing to do with each other.

In general, my best guess is, that this is not really a javascript error and therefore there is no stacktrace.

An example for this, which we regularly see, is something along the line of "unexpected token <". This happens when you include a file in the page using <script> tags, but the file is not really a javascript file (or what also regularly happens, the file does not exist and returns a 404 html page or some similar error page with html instead of javascript code)
You'd have to provide more information on the error to get more help.

Since you now contacted us via Chat as well, I have more information and can reveal the full solution to this issue.

The javascript error is showing up as "Script error". 

This means that the browser is restricting the information, because the script file in question needs to have crossorigin="anonymous" on the script tag, so the browser will expose more information. 

Important: If this attribute is set, the script file MUST have the "Access-Control-Allow-Origin:" header set to allow the source domain (by default it is "*"), otherwise the script file is not executed at all!

 

Featured Posts