You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I've stumbled upon this issue because we had the same problem.
Debugging it, we've discovered that the problem is that https://googleads.g.doubleclick.net/pagead/viewthroughconversion/${SOME_NUMBER_ID}/ returns (after some redirects) a GIF.
Partytown tries to wrap it in an anonymous function, which generates the error message.
To Reproduce
Steps to reproduce the behavior:
Have a doubleclick as a Partytown script;
Open your webpage;
The error should be in the browser's console.
Reproduction link
I don't know how to reproduce it in a sandbox, as this script is added via GTM and I'm not lectured in Google platforms (Analytics, Ads, Tag Manager etc).
Expected behavior
Partytown should not try to run every response as Javascript, as it's possible to check the content-type response header
Partytown version 0.6.4
Screenshots
☝️ Error shown in the console.
☝️ Source code of the function that Partytown generated.
Additional context
Investigating the source files, we found that the error lies at receiveMessageFromSandboxToWorker arrow function from partytown-ww-sw.js.
Further down this block, it is possible to check the content-type of the response (rsp variable). However, I'm not exactly sure where to check it and which MIME-types to consider.
cc @leocwolter, who helped me debug
cc @orballo, who created the original issue (and might find this relevant)
The text was updated successfully, but these errors were encountered:
This probably occurs everytime a script added to partytown (in our case an Google Adsense script added through GTM) does a request which has a content-type different from text/javascript.
Since requesting a 1x1 GIF is a common old technique to send data to some other server, it should probably continue being requested;
The log appears to be printed by a console.error in a catch statement so it should NOT have any effect on the behaviour of other scripts. Besides that it is still a false positive that should not be printed to the console.
Describe the bug
I've stumbled upon this issue because we had the same problem.
Debugging it, we've discovered that the problem is that
https://googleads.g.doubleclick.net/pagead/viewthroughconversion/${SOME_NUMBER_ID}/
returns (after some redirects) a GIF.Partytown tries to wrap it in an anonymous function, which generates the error message.
To Reproduce
Steps to reproduce the behavior:
doubleclick
as a Partytown script;Reproduction link
I don't know how to reproduce it in a sandbox, as this script is added via GTM and I'm not lectured in Google platforms (Analytics, Ads, Tag Manager etc).
Expected behavior
Partytown should not try to run every response as Javascript, as it's possible to check the
content-type
response headerPartytown version
0.6.4
Screenshots
☝️ Error shown in the console.
☝️ Source code of the function that Partytown generated.
Additional context
Investigating the source files, we found that the error lies at
receiveMessageFromSandboxToWorker
arrow function frompartytown-ww-sw.js
.Further down this block, it is possible to check the
content-type
of the response (rsp
variable). However, I'm not exactly sure where to check it and which MIME-types to consider.cc @leocwolter, who helped me debug
cc @orballo, who created the original issue (and might find this relevant)
The text was updated successfully, but these errors were encountered: