Title: zone.js Promise.finally behavior different from native · Issue #43206 · angular/angular · GitHub
Open Graph Title: zone.js Promise.finally behavior different from native · Issue #43206 · angular/angular
X Title: zone.js Promise.finally behavior different from native · Issue #43206 · angular/angular
Description: Which @angular/* package(s) are the source of the bug? Don't known / other Is this a regression? No Description Sample code new Promise(res => { throw 'error'; res(null); }).finally(() => console.log('finally')); Minimal reproduction zon...
Open Graph Description: Which @angular/* package(s) are the source of the bug? Don't known / other Is this a regression? No Description Sample code new Promise(res => { throw 'error'; res(null); }).finally(() => console.l...
X Description: Which @angular/* package(s) are the source of the bug? Don't known / other Is this a regression? No Description Sample code new Promise(res => { throw 'error'; res(null); }).finally(...
Opengraph URL: https://github.com/angular/angular/issues/43206
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"zone.js Promise.finally behavior different from native","articleBody":"### Which @angular/* package(s) are the source of the bug?\r\n\r\nDon't known / other\r\n\r\n### Is this a regression?\r\n\r\nNo\r\n\r\n### Description\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\u003cdetails>\r\n \u003csummary>Sample code\u003c/summary>\r\n \r\n ```javascript\r\n new Promise(res => {\r\n throw 'error';\r\n res(null);\r\n }).finally(() => console.log('finally'));\r\n ```\r\n\u003c/details>\r\n\r\n## Minimal reproduction\r\nzone.js: https://stackblitz.com/edit/zones-js-zdlcnc?file=index.ts\r\nnative: https://stackblitz.com/edit/js-iauprh\r\n\r\n## What happened in zone.js \r\nzone.js `.finally()` [ scheduleResolveOrReject](https://github.com/angular/angular/blob/e3b6e26565bcd03b259392c6676ce931e8b5be20/packages/zone.js/lib/common/promise.ts#L452) then [clearRejectedNoCatch](https://github.com/angular/angular/blob/e3b6e26565bcd03b259392c6676ce931e8b5be20/packages/zone.js/lib/common/promise.ts#L226), which will [remove](https://github.com/angular/angular/blob/e3b6e26565bcd03b259392c6676ce931e8b5be20/packages/zone.js/lib/common/promise.ts#L243) the uncaught error\r\n\r\n### Please provide a link to a minimal reproduction of the bug\r\n\r\nhttps://stackblitz.com/edit/zones-js-zdlcnc?file=index.ts\r\n\r\n### Please provide the exception or error you saw\r\n\r\n```true\r\nzone.js `.finally()` not throw the uncaught error while uncaught, but native promise will.\r\n```\r\n\r\n\r\n### Please provide the environment you discovered this bug in\r\n\r\n```true\r\nzone.js v0.11.4\r\n```\r\n\r\n\r\n### Anything else?\r\n\r\n_No response_","author":{"url":"https://github.com/diyews","@type":"Person","name":"diyews"},"datePublished":"2021-08-19T18:26:20Z","url":"https://github.com/angular/angular/issues/43206"}
| 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:416e0960-3cae-8a61-ec58-361640022f18 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A786:1D20B7:CC0B7A:101C4FD:6B0137D6 |
| html-safe-nonce | 6af9d55bebc5c7b187c62ae237796a6794fb5bdda2fc60860a9019bcc87a6f9f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNzg2OjFEMjBCNzpDQzBCN0E6MTAxQzRGRDo2QjAxMzdENiIsInZpc2l0b3JfaWQiOiIzNjM1MjIyOTExOTY0NDkzNzgyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 186fd5ba0dc81b14eccd9033a61bdaa38ab7942ea757af51fa60ebcdd554d776 |
| hovercard-subject-tag | issue:974932547 |
| 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/43206/issue_layout |
| twitter:image | https://opengraph.githubassets.com/505064a1e6e03e044f9d8e9fcc5f28eb619a0c3f3075d21669f368b3c695b131/angular/angular/issues/43206 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/505064a1e6e03e044f9d8e9fcc5f28eb619a0c3f3075d21669f368b3c695b131/angular/angular/issues/43206 |
| og:image:alt | Which @angular/* package(s) are the source of the bug? Don't known / other Is this a regression? No Description Sample code new Promise(res => { throw 'error'; res(null); }).finally(() => console.l... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | diyews |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| 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 | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width