Passenger error on every page except home
igorosabel opened this issue ยท 4 comments
๐ Bug report
What modules are related to this issue?
- builders
- common
- express-engine
Is this a regression?
Yes, it used to work and I can't tell exactly when but without any change on the code this error has been showing.
Description
Hi,
I have an Angular 16.1.7 application, an animal products store. It is using Angular Universal 16.1.1 for SSR, on a Debian 11.7 server managed with Plesk 18.0.54 wich is running the application as a Node 18.17.0.
The problem is that every page accessed directly throw an error, except the home page. If I access any deep link (typed directly, from Google, from an email...) it shows an error saying it couldn't even run it. If I go to the home page and navigate to those pages they don't show any kind of error.
๐ฌ Minimal Reproduction
For example: https://indomablestore.com/product/1396/sobre-bebida-isotonica-rehidratacion-1ud
But if you go to the home page ( https://indomablestore.com ), then use the looking glass icon on the header and enter "bebida isotonica", it shows one result and if you enter on that item the page displays perfectly without any error or warning at all.
Another simple example is "about us" page: https://indomablestore.com/about
When accessed directly shows an error, but if you go to the home page and then hit on "Quiรฉnes somos" link of the header, it works perfectly.
๐ฅ Exception or Error
Plesk uses Phusion Passenger as a "bridge" to run Node applications and looking on the error logs I found this:
/var/www/vhosts/indomablestore.com/httpdocs/web/dist/server/main.js:17345
: stack.top instanceof impl.HTMLTemplateElement
^
TypeError: Right-hand side of 'instanceof' is not an object
at insertElement (/var/www/vhosts/indomablestore.com/httpdocs/web/dist/server/main.js:17345:29)
at insertHTMLElement (/var/www/vhosts/indomablestore.com/httpdocs/web/dist/server/main.js:17332:23)
at before_head_mode (/var/www/vhosts/indomablestore.com/httpdocs/web/dist/server/main.js:19836:31)
at HTMLParser.htmlparser.insertToken (/var/www/vhosts/indomablestore.com/httpdocs/web/dist/server/main.js:17296:17)
at emitSimpleTag (/var/www/vhosts/indomablestore.com/httpdocs/web/dist/server/main.js:17519:27)
at data_state (/var/www/vhosts/indomablestore.com/httpdocs/web/dist/server/main.js:17522:21)
at scanChars (/var/www/vhosts/indomablestore.com/httpdocs/web/dist/server/main.js:17120:23)
at Object.parse (/var/www/vhosts/indomablestore.com/httpdocs/web/dist/server/main.js:17029:37)
at exports2.createDocument (/var/www/vhosts/indomablestore.com/httpdocs/web/dist/server/main.js:29819:29)
at exports2.createWindow (/var/www/vhosts/indomablestore.com/httpdocs/web/dist/server/main.js:29846:38)
Node.js v18.17.0
The whole error log can be found here: https://indomablestore.com/error.html
๐ Your Environment
This is the output of ng serve
on my development machine. The server has the same Node version but it is a Debian 11.7 machine.
Angular CLI: 16.1.6
Node: 18.17.0
Package Manager: npm 9.5.1
OS: win32 x64
Angular: 16.1.7
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, platform-server
... router
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1601.6
@angular-devkit/build-angular 16.1.6
@angular-devkit/core 16.1.6
@angular-devkit/schematics 16.1.6
@angular/cli 16.1.6
@nguniversal/builders 16.1.1
@nguniversal/express-engine 16.1.1
@schematics/angular 16.1.6
rxjs 7.5.5
typescript 5.0.4
zone.js 0.13.0
I just updated to the last version and the problem still keeps happening:
Node: 18.16.0
Package Manager: npm 9.5.1
OS: win32 x64
Angular: 16.1.8
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, platform-server
... router
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1601.7
@angular-devkit/build-angular 16.1.7
@angular-devkit/core 16.1.7
@angular-devkit/schematics 16.1.7
@angular/cli 16.1.7
@nguniversal/builders 16.1.1
@nguniversal/express-engine 16.1.1
@schematics/angular 16.1.7
rxjs 7.5.5
typescript 5.0.4
zone.js 0.13.0```
After updating Angular Universal (16.1.1 -> 16.1.2) the problem still persists:
Angular CLI: 16.1.8
Node: 18.17.0
Package Manager: npm 9.5.1
OS: win32 x64
Angular: 16.1.8
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, platform-server
... router
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1601.8
@angular-devkit/build-angular 16.1.8
@angular-devkit/core 16.1.8
@angular-devkit/schematics 16.1.8
@nguniversal/builders 16.1.2
@nguniversal/express-engine 16.1.2
@schematics/angular 16.1.8
rxjs 7.5.5
typescript 5.0.4
zone.js 0.13.0
Duplicate of angular/angular-cli#25529
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.