Title: Cancelling requests with service worker · Issue #48107 · angular/angular · GitHub
Open Graph Title: Cancelling requests with service worker · Issue #48107 · angular/angular
X Title: Cancelling requests with service worker · Issue #48107 · angular/angular
Description: 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...
Open Graph Description: 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), th...
X Description: 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), th...
Opengraph URL: https://github.com/angular/angular/issues/48107
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Cancelling requests with service worker","articleBody":"### Which @angular/* package(s) are the source of the bug?\n\nservice-worker\n\n### Is this a regression?\n\nNo\n\n### Description\n\nWhen using a service worker and cancelling http requests (via unsubscribe for example), the underlying call made by service worker is not cancelled.\r\n\r\nThis could cause several issues like reaching maximum number of connections opened to a backend or useless backend load.\r\n\r\nTo 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. \r\n\r\nI attach two screenshots of the demo code you can find in the repository.\r\n\r\n\u003cimg width=\"1438\" alt=\"Screenshot 2022-11-17 at 15 01 43\" src=\"https://user-images.githubusercontent.com/1235503/202466662-d0012fb5-2663-494f-b4f9-bb1525abb0a5.png\">\r\n\u003cimg width=\"1438\" alt=\"Screenshot 2022-11-17 at 15 02 16\" src=\"https://user-images.githubusercontent.com/1235503/202466670-b1208e2d-f62b-431f-884f-abcde32074f3.png\">\r\n\n\n### Please provide a link to a minimal reproduction of the bug\n\nhttps://github.com/oliveti/sw-cancellation-demo-2\n\n### Please provide the exception or error you saw\n\n_No response_\n\n### Please provide the environment you discovered this bug in (run `ng version`)\n\n```true\nAngular CLI: 14.2.9\r\nNode: 16.14.0\r\nPackage Manager: npm 9.1.2 \r\nOS: darwin arm64\r\n\r\nAngular: 14.2.11\r\n... animations, common, compiler, compiler-cli, core, forms\r\n... platform-browser, platform-browser-dynamic, router\r\n... service-worker\r\n\r\nPackage Version\r\n---------------------------------------------------------\r\n@angular-devkit/architect 0.1402.9\r\n@angular-devkit/build-angular 14.2.9\r\n@angular-devkit/core 14.2.9\r\n@angular-devkit/schematics 14.2.9\r\n@angular/cli 14.2.9\r\n@angular/pwa 0.5.3\r\n@schematics/angular 14.2.9\r\nrxjs 7.5.7\r\ntypescript 4.7.4\n```\n\n\n### Anything else?\n\n_No response_","author":{"url":"https://github.com/oliveti","@type":"Person","name":"oliveti"},"datePublished":"2022-11-17T14:03:30Z","url":"https://github.com/angular/angular/issues/48107"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:48263fe2-6116-443f-e309-e46a9c4295d0 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B1CE:1F44:8D2C59:B9347C:6B010855 |
| html-safe-nonce | fae96606f1e77755febeb502202e0b23da8ed0a922ae1b11050719511373d214 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMUNFOjFGNDQ6OEQyQzU5OkI5MzQ3Qzo2QjAxMDg1NSIsInZpc2l0b3JfaWQiOiI2MDEzODc3MzQ2NDAxMDYwOTQ5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | c34b4162ba041af3e0e887d729428635b04c1e5a06594edca14d0ed93f1dfebc |
| hovercard-subject-tag | issue:1453405744 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular/48107/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2adafdb27b5e6f408a6ea8c3e8003b64388065d837a2bb1e241f634fa0b421dc/angular/angular/issues/48107 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2adafdb27b5e6f408a6ea8c3e8003b64388065d837a2bb1e241f634fa0b421dc/angular/angular/issues/48107 |
| og:image:alt | 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), th... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | oliveti |
| hostname | github.com |
| expected-hostname | github.com |
| None | cb7fa109eca7d4156c889f474306b0e91336055e9adf8fd4684b61e49094d124 |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular git https://github.com/angular/angular.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 24195339 |
| octolytics-dimension-repository_nwo | angular/angular |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 24195339 |
| octolytics-dimension-repository_network_root_nwo | angular/angular |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 2b59d31a4e44f08b7af67a4b67f8fd0af3befe2a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width