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

FetchEvent.respondWith received an error - for Google Tag Manager (GTM) script #3343

Open
mtwalsh opened this issue Aug 8, 2024 · 0 comments

Comments

@mtwalsh
Copy link

mtwalsh commented Aug 8, 2024

Library Affected:

  • workbox-webpack-plugin using GenerateSW plugin v7.1.0

Browser & Platform:

  • Safari 17.5 macOS (I believe there's the same issue on Safari on iOS as well)

Issue Description:

In Safari 17.5 on macOS on the second page-load (once the Service Worker (SW) is activated) I notice the following errors in the console, this is with Google Tag Manager installed in the page as per the normal instructions:

[Error] FetchEvent.respondWith received an error: no-response: The strategy could not generate a response for 'https://www.googletagmanager.com/gtm.js?id=GTM-XXXXXX'.
[Error] Cannot load https://www.googletagmanager.com/gtm.js?id=GTM-XXXXXX.
[Error] Failed to load resource: FetchEvent.respondWith received an error: no-response: The strategy could not generate a response for 'https://www.googletagmanager.com/gtm.js?id=GTM-XXXXXX'. (gtm.js, line 0)

This is preventing Google Tag Manager (GTM) from working after the SW is activated.

I don't have any runtimeCaching entries specifically for this URL so the SW shouldn't be doing anything out of the ordinary for the GTM script.

I do have offlineGoogleAnalytics: true enabled (if that could be relevant) but disabling that makes no difference.

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