Skip to content

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

Open
@mtwalsh

Description

@mtwalsh

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions