You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which @angular/* package(s) are the source of the bug?
service-worker
Is this a regression?
No
Description
When using a service worker and cancelling http requests (via unsubscribe for example), the underlying call made by service worker is not cancelled.
This could cause several issues like reaching maximum number of connections opened to a backend or useless backend load.
To reproduce the issue you can use the project I shared in github which is triggering calls to a slow backend and cancelling the calls except the last one (with and without service worker). You can see that, when using service worker, that last call have to wait for all the "cancelled" calls to be done before being fired.
I attach two screenshots of the demo code you can find in the repository.
Please provide a link to a minimal reproduction of the bug
Activity
frankvdb7 commentedon Mar 23, 2023
We're also experiencing this issue. It is very simple to reproduce.
mhosman commentedon Jul 19, 2023
I'm facing the same issue. Any workaround?
michaelmarcuccio commentedon Jul 19, 2023
Bypass the service worker for all calls that need to be cancellable. That is the only way I've found to be able to do it.
JeanMeche commentedon Aug 29, 2025
With #63364 we've announced that the service-worker package in now in maintenance mode and will not receive feature PRs and feature requests.
The message is also visible here: https://angular.dev/ecosystem/service-workers
angular-automatic-lock-bot commentedon Sep 29, 2025
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.