Skip to content

WaitForNetworkIdleAsync times out on sites with require-trusted-types-for CSP header #5612

Description

Issue:
The offline capability check consistently times out after 20 seconds regardless
of SW complexity. Tested with a minimal 3-line service worker and still times out.

CSP headers on the site include:
require-trusted-types-for 'script'; trusted-types json-formatter-policy;

Theory:
PWABuilder's Puppeteer instance may be triggering a Trusted Types violation
internally when evaluating the page, which prevents the page from ever reaching
network idle.

Steps to reproduce:

  1. Add require-trusted-types-for 'script' to your site's CSP
  2. Submit to PWABuilder report card
  3. Offline capability check times out every time

Expected: Check passes or fails cleanly within timeout
Actual: TimeoutException after 20000ms every time

Build environment:

  • Static site generator: Lume 3.1.4 (Deno-based, loaded via jsdelivr CDN)
  • Runtime: Deno 2.7
  • Bundler: esbuild (via Lume's esbuild plugin)
  • Hosting: Cloudflare (CDN in front of static origin)
  • Output: fully static HTML/JS/CSS, no SSR
  • Unstable Deno APIs in use: temporal, fmt-component

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions