Repository navigation
Closed
Closed
Copy link
Labels
P4A relatively minor issue that is not relevant to core functionsA relatively minor issue that is not relevant to core functionsarea: service-workerIssues related to the @angular/service-worker packageIssues related to the @angular/service-worker packagefreq2: mediumopen for contributionsAn issue that is suitable for a community contributor (based on its complexity/scope).An issue that is suitable for a community contributor (based on its complexity/scope).state: confirmedtype: bug/fixworkaround2: non-obvious
Milestone
Description
I'm submitting a...
[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
Current behavior
App with service worker loads fine the first time in Chrome 56 (And Edge Android, Samsung Internet). If you reload the page, the app fails with:
ERR_FAILED
Uncaught (in promise) DOMException: Failed to execute 'waitUntil' on 'ExtendableEvent': The event handler is already finished. at Driver.handleFetch (http://127.0.0.1:8887/ngsw-worker.js:1941:15) handleFetch @ ngsw-worker.js:1941
Expected behavior
Service worker enabled sites should work correctly on Chrome 56, Edge and Samsung Internet browsers
Minimal reproduction of the problem with instructions
ng new repro --service-worker
ng build --prod
Use Web server for Chrome or related to browse the dist folder.
What is the motivation / use case for changing the behavior?
Service worker should work correctly on all supported browsers.
Environment
Angular CLI: 1.6.0-rc.1
Node: 8.9.1
OS: win32 x64
Angular: 5.0.5
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router, service-worker
@angular/cli: 1.6.0-rc.1
@angular-devkit/build-optimizer: 0.0.34
@angular-devkit/core: 0.0.22
@angular-devkit/schematics: 0.0.38
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.9.0-rc.1
@schematics/angular: 0.1.8
typescript: 2.4.2
webpack: 3.8.1
Browser:
- [x] Chrome (desktop) version 56
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [x] Edge version ANDROID
For Tooling issues:
- Node version: v8.9.1
- Platform: Windows
Others:
`
`
Reacted by Kim Kern, Vincent Le Put, Konstantinos Gkinis, lishichao, Roman, Charl, Senic, mariummalik22, Cristiano Benjamin, FabriceBazzaro and 7 more
Reacted by Jakub Kruczek, RatkoR, fullvirtue and Johannes Millan
Metadata
Metadata
Assignees
Labels
P4A relatively minor issue that is not relevant to core functionsA relatively minor issue that is not relevant to core functionsarea: service-workerIssues related to the @angular/service-worker packageIssues related to the @angular/service-worker packagefreq2: mediumopen for contributionsAn issue that is suitable for a community contributor (based on its complexity/scope).An issue that is suitable for a community contributor (based on its complexity/scope).state: confirmedtype: bug/fixworkaround2: non-obvious
Activity
mlc-mlapis commentedon Dec 3, 2017
@dmostert ... Chrome (desktop) version 56? Who is using it? What about status for 62?
dmostert commentedon Dec 3, 2017
Edge browser on Android uses v58 and Samsung Browser on Android uses v56.
mlc-mlapis commentedon Dec 3, 2017
@dmostert ... sure but you mentioned that it is also 56 on desktop.
dmostert commentedon Dec 3, 2017
Yes - I used 56 on desktop as an easy way to reproduce the problem. Latest version of CHROME desktop and ANDROID works fine.
mlc-mlapis commentedon Dec 3, 2017
@dmostert ... and are you sure that it is not a problem with 56 right on the desktop? I think that it was early implementation of service worker on it so it is probably actually not relevant now.
dmostert commentedon Dec 3, 2017
@mlc-mlapis it might be, but current versions of Android's Samsung Internet & Edge USE older versions of Chrome and both of these browsers DON'T work...
[-]Service worker 5.0.x does not work correctly in Chrome 56 (and related browsers)[/-][+]Service worker 5.0.x does not work correctly in Edge and Samsung Internet on Android[/+]DominicBoettger commentedon Dec 13, 2017
Did you already investigate in this issue?
muriloamendola commentedon Jan 16, 2018
We are facing the same problem. We have opened another issue about the same problem on #21292.
48 remaining items
gkalpak commentedon May 25, 2020
To recap (for future reference):
@angular/service-worker.If anyone wants to take it on, the possible fixes are:
angular.jsonto specify an extra script file (similar topolyfills.tsbut forngsw-worker.js).Or it could be a list of JS scripts to be imported (using
importScripts(...)) at the top ofngsw-worker.js.ngsw-worker.jsscript.sebaherrera commentedon Jul 16, 2020
Hi. Isn't the service worker regenerated at build time? If so, you might be able to add/remove the polyfill based on browserslist file.
jelbourn commentedon Apr 6, 2021
Closing this since it's been long enough that newer versions of Edge and Samsung Internet are based on Chromium 60+ which shouldn't have the issue any longer
angular-automatic-lock-bot commentedon May 7, 2021
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.