Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google Tag Manager is breaking other functionalities of the application that uses 'XMLHttpRequest' #127

Open
kr-prash opened this issue Dec 8, 2023 · 1 comment

Comments

@kr-prash
Copy link

kr-prash commented Dec 8, 2023

We are using Google Tag Manager (the “react-gtm-module” Ver 2.0.11) in a React application. Our enterprise application was working fine until 3 weeks back (11/14/2023), but all of a sudden one of the functionalities of the application which uses "XMLHttpRequest" object started failing with the below error.

Uncaught DOMException: Failed to read the 'responseText' property from 'XMLHttpRequest': The value is only accessible if the object's 'responseType' is '' or 'text' (was 'json') at XMLHttpRequest.onreadystatechange (:3:163) onreadystatechange @ VM328:3 XMLHttpRequest.send (async)

After much debugging we have identified that this issue is happening due to some sort of conflict with ‘Google Tag Manager’ which is used in the application. If the Google Tag Manager is initialized first, as shown below, then one of the functionalities of the application that uses 'XMLHttpRequest' object is failing with the above error.

image

It seems like Google Tag Manager is taking over the control of XMLHttpRequest and it is conflicting with the other part of the application that needs XMLHttpRequest. Would you please look into this at the earliest as one of the critical functionalities in our enterprise application has stopped working for a long time?

Please let me know if we can setup a meeting so that I can walk you through this problem.

@kr-prash
Copy link
Author

Hi Team, do you have any update on this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant