Dynatrace Managed Q&A
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Looking to upgrade from Dynatrace Managed to SaaS? See how

CSP and CORS errors from RUM inline script implementation on Web application

janelle
Participant

We are running self-hosted Dynatrace Managed for my project. 

We are trying to enable the Dynatrace RUM inline script in our UAT web application (placed inside the <head> of our login page), and we are encountering looping errors and warnings related to CSP and CORS. The error really loops non-stop. 

We have also tried adding our UAT domain (e.g., https://<my-uat-domain>) into Dynatrace’s CORS Configuration and Allowed Origins settings, but this did not resolve the issue.

The browser console shows the following errors:

Spoiler

Access to fetch at 'https://<dynatrace-collector-domain>/bf/<id>?type=js3...'
from origin 'https://<my-uat-domain>' has been blocked by CORS policy:
No 'Access-Control-Allow-Origin' header is present on the requested resource.

Failed to load resource: net::ERR_FAILED

POST https://<dynatrace-collector-domain>/bf/<id>?type=js3... net::ERR_FAILED

Has anyone encountered similar CSP or CORS issues when enabling Dynatrace RUM inline script, and is there any known workaround or configuration that can resolve it?

Thanks in advance, any help are deeply appreciated. 


 

3 REPLIES 3

janelle
Participant

Access to fetch at 'https://<dynatrace-collector-domain>/bf/<id>?type=js3...'
from origin 'https://<my-uat-domain>' has been blocked by CORS policy:
No 'Access-Control-Allow-Origin' header is present on the requested resource.

Failed to load resource: net::ERR_FAILED

POST https://<dynatrace-collector-domain>/bf/<id>?type=js3... net::ERR_FAILED

I re-paste the error message here again, as it is not showing properly in my first post.

janelle
Participant

Hi Dynatrace folks, 

I am reading through other related to CORS issue from Dynatrace, and based on this link https://community.dynatrace.com/t5/Real-User-Monitoring/CORS-error-on-agentless-RUM-page-with-JavaSc...
which has something similar. 

  • Open DevTools → Application tab → Clear storage → “Clear site data” for domain
  • Also in DevTools → Network → “Disable cache” checked, then refresh while DevTools is open.
  • And the Errors are GONE


I did a clear storage cache, and the errors are gone. But it does not send any stats to dynatrace. 
We checked the inline script are correctly injected, but not working. What can the possible problem? 

janelle
Participant

@MaciejNeumann

May I know how i can get any help?

Featured Posts