Closed
Closed
Copy link
Labels
area: @angular-devkit/build-angulardevkit/build-angular:serverfreq1: lowOnly reported by a handful of users who observe it rarelyseverity5: regressiontype: bug/fix
Milestone
Description
🐞 Bug report
Command (mark with an x)
- new
- build
- serve
- test
- e2e
- generate
- add
- update
- lint
- extract-i18n
- run
- config
- help
- version
- doc
Is this a regression?
Yes, the previous version in which this bug was not present was: 12.1.4
Description
When building a SSR application, and serving the SSR application, it used to work, but after the update, an error is logged during the process.
TypeError: Cannot convert undefined or null to object
at Function.getPrototypeOf (<anonymous>)
at /Users/Sources/angular-starterkit/dist/server/main.js:1:2701809
at Object.66252 (/Users/Sources/angular-starterkit/dist/server/main.js:1:2815455)
at __webpack_require__ (/Users/Sources/angular-starterkit/dist/server/main.js:1:3657752)
at Object.42853 (/Users/Sources/angular-starterkit/dist/server/main.js:1:2904269)
at __webpack_require__ (/Users/Sources/angular-starterkit/dist/server/main.js:1:3657752)
at Module.25944 (/Users/Sources/angular-starterkit/dist/server/main.js:1:2908930)
at __webpack_require__ (/Users/Sources/angular-starterkit/dist/server/main.js:1:3657752)
at app (/Users/Sources/angular-starterkit/dist/server/main.js:1:5131921)
at run (/Users/Sources/angular-starterkit/dist/server/main.js:1:5133175)
🔬 Minimal Reproduction
Steps:
npm cinpm run start:ssr
🌍 Your Environment
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 12.2.5
Node: 14.16.1
Package Manager: npm 7.21.0
OS: darwin x64
Angular: 12.2.5
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... platform-server, router, service-worker
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1202.5
@angular-devkit/build-angular 12.2.5
@angular-devkit/core 12.2.5
@angular-devkit/schematics 12.2.5
@nguniversal/express-engine 12.1.0
@schematics/angular 12.2.5
rxjs 7.3.0
typescript 4.3.5
webpack 5.52.0
Metadata
Metadata
Assignees
Labels
area: @angular-devkit/build-angulardevkit/build-angular:serverfreq1: lowOnly reported by a handful of users who observe it rarelyseverity5: regressiontype: bug/fix
Activity
alan-agius4 commentedon Sep 9, 2021
The problem appear to be this statement.
Which is the result of transforming native async/await in generators since Zone.Js cannot patch these.
https://github.com/MattiasBuelens/web-streams-polyfill/blob/d035366b4033fd0c8af092d3a6938bd9c6d5974d/src/target/es2018/stub/async-iterator-prototype.ts#L4-L5
alan-agius4 commentedon Sep 9, 2021
Looking at this more, the downlevelling of the async/await is doing the right thing and the correct output is being generated. Unfortunately,
web-streams-polyfillisn't handle this case.This should be pretty straightforward from their end to fix;
alan-agius4 commentedon Sep 9, 2021
Closing as per above.
krzkz94 commentedon Oct 4, 2021
Hey @alan-agius4, are you folks going to fix this for v12? It seems to be still broken with the latest
12.2.8alan-agius4 commentedon Oct 4, 2021
@krzkz94, it looks like the commit was not cherry-picked due to a conflict.
We should be addressing this in the next patch release.
rickvandermey commentedon Oct 7, 2021
Can confirm its fixed in
12.2.9angular-automatic-lock-bot commentedon Nov 7, 2021
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.