Title: The ngOnDestroy handler crashes after upgrade to Angular 11 on 'ng test' (zone.js issue) · Issue #40215 · angular/angular · GitHub
Open Graph Title: The ngOnDestroy handler crashes after upgrade to Angular 11 on 'ng test' (zone.js issue) · Issue #40215 · angular/angular
X Title: The ngOnDestroy handler crashes after upgrade to Angular 11 on 'ng test' (zone.js issue) · Issue #40215 · angular/angular
Description: 🐞 bug report Affected Package The issue is caused by package zone.js Is this a regression? Yes, the previous version in which this bug was not present was: Angular 10 Description After updating Angular to version 11 and using the latest ...
Open Graph Description: 🐞 bug report Affected Package The issue is caused by package zone.js Is this a regression? Yes, the previous version in which this bug was not present was: Angular 10 Description After updating Ang...
X Description: 🐞 bug report Affected Package The issue is caused by package zone.js Is this a regression? Yes, the previous version in which this bug was not present was: Angular 10 Description After updating Ang...
Opengraph URL: https://github.com/angular/angular/issues/40215
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"The ngOnDestroy handler crashes after upgrade to Angular 11 on 'ng test' (zone.js issue)","articleBody":"# 🐞 bug report\r\n\r\n### Affected Package\r\nThe issue is caused by package zone.js\r\n\r\n\r\n### Is this a regression?\r\n\r\nYes, the previous version in which this bug was not present was: Angular 10\r\n\r\n\r\n### Description\r\n\r\nAfter updating Angular to version 11 and using the latest zone.js (0.11.3), on `ng test` the ngOnDestroy handler crashes throwing:\r\n```\r\nERROR Error: Uncaught (in promise): TypeError: Cannot read property 'data-ck-expando' of undefined\r\nTypeError: Cannot read property 'data-ck-expando' of undefined\r\n```\r\n\r\nIt is because `Object.prototype.toString.call( undefined )` returns `[Object Window]` instead of `[Object Undefined]` when the strict mode isn't turned on.\r\n\r\nA similar issue was already reporter in the past: https://github.com/angular/angular/issues/31678\r\n\r\nThe workaround is to import zone.js in `polyfills.js` like this `import 'zone.js/dist/zone.js'` instead of `import 'zone.js/dist/zone'` or `import 'zone.js'`\r\n\r\n\r\n## 🌍 Your Environment\r\n\r\n\u003cpre\u003e\r\n@angular-devkit/architect 0.1100.4\r\n@angular-devkit/build-angular 0.1100.4\r\n@angular-devkit/core 11.0.4\r\n@angular-devkit/schematics 11.0.4\r\n@schematics/angular 11.0.4\r\n@schematics/update 0.1100.4\r\nng-packagr 11.0.3\r\nrxjs 6.6.3\r\ntypescript 4.0.3\r\nwebpack 4.44.2\r\n\u003c/pre\u003e\r\n","author":{"url":"https://github.com/pkwasnik","@type":"Person","name":"pkwasnik"},"datePublished":"2020-12-20T19:30:14.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/40215/angular/issues/40215"}
| 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:4c87de14-9127-4e00-6147-0b3901a6af90 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8076:F8C9C:401E69:5BD85F:6A59DEB7 |
| html-safe-nonce | 0366a5c5e76323ae21dad678eb9ff435c03127bcad03743b3c7c037188c2ee4b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MDc2OkY4QzlDOjQwMUU2OTo1QkQ4NUY6NkE1OURFQjciLCJ2aXNpdG9yX2lkIjoiNzk1NjM3NzQzMTAxMTA5MDEwMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | a97aab79c0727c74098077cdfac9f2c849223a75ae94622362414b38ded1ff0a |
| hovercard-subject-tag | issue:771678582 |
| 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/40215/issue_layout |
| twitter:image | https://opengraph.githubassets.com/bddf3fb16c8d1cdf22fdb94776b297a43b206ceb9bd0a8b8c8bff8655b389fa2/angular/angular/issues/40215 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/bddf3fb16c8d1cdf22fdb94776b297a43b206ceb9bd0a8b8c8bff8655b389fa2/angular/angular/issues/40215 |
| og:image:alt | 🐞 bug report Affected Package The issue is caused by package zone.js Is this a regression? Yes, the previous version in which this bug was not present was: Angular 10 Description After updating Ang... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | pkwasnik |
| hostname | github.com |
| expected-hostname | github.com |
| None | ba3976babb66479b1c943a8edc0777d96157da48fadc0161f9ddb219deee8353 |
| 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 | 26f17126414f953984d8ae42f57c0db48e7dbde3 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width