PWA update: ordinary fetches during SKIP_WAITING can still delay activation past the fallback

Open
#261 3 comments 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 1 day

@mrgoonie is already working on this.

Since Dec 3, 2026.

Assessment

This issue has not been assessed yet.

Description

Follow-up to #239 and #247.

#247 removes the app's own /sw.js fetch from the update flow, which was the one fetch correlated with an update. The underlying trigger remains: any fetch from a controlled page that reaches the old (active) service worker within about 20 ms of SKIP_WAITING restarts it, and in CI traces the waiting worker then stayed installed past the page's 10 s fallback. The fallback unregisters and reloads, so the person still gets the new version, but through a slower path that drops the registration.

Open tabs still send ordinary traffic through the old worker during an update:

  • BFF calls such as /bff/session, which appears in both failing traces;
  • route chunks and other assets.

These are not tied to the update click, so they should be rarer than the old /sw.js fetch. How rare is not measured. The 0-in-100 matrix in #247 cannot show it either way: at 1 failure in 60, 0 in 100 happens about 19% of the time.

To do:

  1. Measure the residual rate. Run the update-flow e2e repeatedly with a forced non-/sw.js fetch (for example a BFF read) just after SKIP_WAITING, against the #247 code.
  2. If it reproduces, decide on a fix. Options include:
    • the page holding its own requests for a short window around Reload now;
    • the new worker claiming on a message instead of waiting for the old one to go idle;
    • a longer or smarter fallback than unregister and reload.
  3. Find out why, in both failing traces, the other tab runs runsWaitingVersion a third time right at the click. That would explain why the old fetch was the natural trigger.

#239 stays open until this is resolved.

Dominant language
No language data
Stars
1
Forks
2
Avg merge
1h 51m
Merged PRs (30d)
103

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nextlevelbuilder/dewee-desktop-app

All issues in nextlevelbuilder/dewee-desktop-app

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.