15 Feb 2023 10:04 PM - last edited on 16 Feb 2023 09:50 AM by Ana_Kuzmenchuk
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?
Solved! Go to Solution.
13 Apr 2023 01:53 PM
@tasjordao are you still having this issue? If you resolved it would you mind sharing with us your findings and resolution?
19 Apr 2024 01:29 PM
I would be interested as well on what the solution was if one was found
19 Apr 2024 02:46 PM
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...
23 Apr 2024 11:12 AM
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.
24 Apr 2024 03:57 PM
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!
25 Apr 2024 09:02 AM
Thank you. I will feedback all the recommendations on this thread to the developers.