Title: PromiseRejectionEvent not fired · Issue #55590 · angular/angular · GitHub
Open Graph Title: PromiseRejectionEvent not fired · Issue #55590 · angular/angular
X Title: PromiseRejectionEvent not fired · Issue #55590 · angular/angular
Description: Which @angular/* package(s) are the source of the bug? zone.js Is this a regression? No Description The PromiseRejectionEvent is not triggered when zone.js is included on the webpage. The issue stems from zone.js's inability to construct...
Open Graph Description: Which @angular/* package(s) are the source of the bug? zone.js Is this a regression? No Description The PromiseRejectionEvent is not triggered when zone.js is included on the webpage. The issue ste...
X Description: Which @angular/* package(s) are the source of the bug? zone.js Is this a regression? No Description The PromiseRejectionEvent is not triggered when zone.js is included on the webpage. The issue ste...
Opengraph URL: https://github.com/angular/angular/issues/55590
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"PromiseRejectionEvent not fired","articleBody":"### Which @angular/* package(s) are the source of the bug?\n\nzone.js\n\n### Is this a regression?\n\nNo\n\n### Description\n\nThe PromiseRejectionEvent is not triggered when zone.js is included on the webpage. The issue stems from zone.js's inability to construct a PromiseRejectionEvent because options parameter is undefined - `{ promise: undefined, reason: undefined }`\r\n\r\nEvent is not fired and silently ignored here: https://github.com/angular/angular/blob/main/packages/zone.js/lib/common/promise.ts#L82\r\nFails to construct PromiseRejection error here: https://github.com/angular/angular/blob/main/packages/zone.js/lib/browser/browser.ts#L316\r\n\r\n\r\n\r\n\r\nHere is a minimal example to reproduce the issue. Note that if you remove the zone.js script, the event fires as expected.\r\n```html\r\n\u003c!doctype html>\r\n\u003chtml lang=\"en\">\r\n\t\u003chead>\r\n\t\t\u003cmeta charset=\"UTF-8\" />\r\n\t\t\u003ctitle>Title\u003c/title>\r\n\t\t\u003cscript src=\"https://cdn.jsdelivr.net/npm/zone.js@0.14.4/bundles/zone.umd.min.js\">\u003c/script>\r\n\t\u003c/head>\r\n\t\u003cbody>\r\n\t\t\u003cscript>\r\n\t\t\twindow.addEventListener('unhandledrejection', (event) =>\r\n\t\t\t\tconsole.log('unhandledrejection', event, event.promise, event.reason),\r\n\t\t\t)\r\n\r\n\t\t\tconst scriptEl = document.createElement('script')\r\n\t\t\tscriptEl.innerHTML = \"Promise.reject('Error happened :(')\"\r\n\t\t\tdocument.body.append(scriptEl)\r\n\t\t\u003c/script>\r\n\t\u003c/body>\r\n\u003c/html>\r\n\r\n```\n\n### Please provide a link to a minimal reproduction of the bug\n\n_No response_\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\nzone.js: latest\n```\n\n\n### Anything else?\n\n_No response_","author":{"url":"https://github.com/Joozty","@type":"Person","name":"Joozty"},"datePublished":"2024-04-30T12:41:05Z","url":"https://github.com/angular/angular/issues/55590"}
| 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:43df95d5-bf17-f85a-bdb4-b4e367bbe7a1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CC78:34CAB:189F481:1F688B7:6B0148D5 |
| html-safe-nonce | 51ea73185c03f86158c3c504a5d9f3e4d32df90d8c47502096013480bd41264e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQzc4OjM0Q0FCOjE4OUY0ODE6MUY2ODhCNzo2QjAxNDhENSIsInZpc2l0b3JfaWQiOiI0NjA1NTUzMTUwNTIxMzI5ODc3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 1c669059abe2c4318d81ea570c9e4f2aae8c48234f59240bab03a86b5d5f8991 |
| hovercard-subject-tag | issue:2271371590 |
| 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/55590/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f5d28dee49ceea79d4f5f4f93af64edf687a2b6b9bbe9f0e7fac66b095ebf125/angular/angular/issues/55590 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f5d28dee49ceea79d4f5f4f93af64edf687a2b6b9bbe9f0e7fac66b095ebf125/angular/angular/issues/55590 |
| og:image:alt | Which @angular/* package(s) are the source of the bug? zone.js Is this a regression? No Description The PromiseRejectionEvent is not triggered when zone.js is included on the webpage. The issue ste... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Joozty |
| 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