In certain (unknown) cases, a service worker registration object may return a null serviceworker in installing state, right after calling update() on the service worker registration object.
The below initialization code (shared by many flutter web apps) is affected:
|
} else if (!reg.active.scriptURL.endsWith(serviceWorkerVersion)) { |
|
// When the app updates the serviceWorkerVersion changes, so we |
|
// need to ask the service worker to update. |
|
console.log('New service worker available.'); |
|
reg.update(); |
|
waitForActivation(reg.installing); |
|
} else { |
(reg.installing is null, when it shouldn't.)
Steps to Reproduce
@yjbanov managed to get his Chrome browser (v100, gLinux) in this state and immediately reported the issue, but I couldn't repro. The only way we've had to reproduce the issue was to eliminate forking in the code at this point, and force the code through that specific branch.
Expected results: An app running
Actual results: A variation of this error:

In certain (unknown) cases, a service worker registration object may return a
nullserviceworker ininstallingstate, right after callingupdate()on the service worker registration object.The below initialization code (shared by many flutter web apps) is affected:
flutter/dev/integration_tests/web/web/index.html
Lines 56 to 62 in b87caba
(
reg.installingis null, when it shouldn't.)Steps to Reproduce
@yjbanov managed to get his Chrome browser (v100, gLinux) in this state and immediately reported the issue, but I couldn't repro. The only way we've had to reproduce the issue was to eliminate forking in the code at this point, and force the code through that specific branch.
Expected results: An app running
Actual results: A variation of this error: