Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After upgrade to 2.0.0-beta.7, application does not start #5453

Closed
lukaszkukawski opened this issue Jul 1, 2017 · 6 comments · Fixed by #5470
Closed

After upgrade to 2.0.0-beta.7, application does not start #5453

lukaszkukawski opened this issue Jul 1, 2017 · 6 comments · Fixed by #5470
Assignees

Comments

@lukaszkukawski
Copy link

lukaszkukawski commented Jul 1, 2017

Bug, feature request, or proposal:

Bug

What is the expected behavior?

Possibility start applications

What is the current behavior?

After upgrade to 2.0.0-beta.7, application compile fine(server side(universal) and front side), but when i want to open page i have error in console server(this log show in loop):

ERROR TypeError: Cannot read property 'trim' of undefined
at Object.eval [as updateRenderer] (webpack:///./aot//@angular/material/typings/index.ngfactory.ts?:929:107)
at Object.updateRenderer (webpack:///./
/@angular/core/@angular/core.es5.js?:12977:70)
at checkAndUpdateView (webpack:///.//@angular/core/@angular/core.es5.js?:12496:14)
at callViewAction (webpack:///./
/@angular/core/@angular/core.es5.js?:12856:21)
at execComponentViewsAction (webpack:///.//@angular/core/@angular/core.es5.js?:12788:13)
at checkAndUpdateView (webpack:///./
/@angular/core/@angular/core.es5.js?:12497:5)
at callViewAction (webpack:///.//@angular/core/@angular/core.es5.js?:12856:21)
at execComponentViewsAction (webpack:///./
/@angular/core/@angular/core.es5.js?:12788:13)
> at checkAndUpdateView (webpack:///.//@angular/core/@angular/core.es5.js?:12497:5)
> at callViewAction (webpack:///./
/@angular/core/@angular/core.es5.js?:12856:21)
> ERROR TypeError: Cannot read property 'trim' of undefined...
> ERROR TypeError: Cannot read property 'trim' of undefined...
> ERROR TypeError: Cannot read property 'trim' of undefined...

And application does not start

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

"@angular/animations": "^4.1.1",
"@angular/common": "^4.2.5",
"@angular/compiler": "^4.2.5",
"@angular/core": "^4.2.5",
"@angular/forms": "^4.2.5",
"@angular/http": "^4.2.5",
"@angular/material": "^2.0.0-beta.7",
"@angular/platform-browser": "^4.2.5",
"@angular/platform-browser-dynamic": "^4.2.5",
"@angular/router": "^4.2.5",
"@ ngx-config/core": "^0.2.0-rc.5",
"@ ngx-meta/core": "^0.4.0-rc.2",
"@ types/express": "^4.0.36",
"@ types/mysql": "0.0.32",
"@ types/underscore": "^1.8.1",
"angular-async-local-storage": "^1.4.0",
"angular-in-memory-web-api": "^0.3.2",
"angular2-masonry": "^0.4.0",
"angular2-moment": "^1.3.3",
"body-parser": "^1.17.2",
"core-js": "^2.4.1",
"hammerjs": "^2.0.8",
"moment": "^2.18.1",
"ngx-bootstrap": "^2.0.0-beta.2",
"ngx-facebook": "^2.4.0",
"rand-token": "^0.3.0",
"rxjs": "5.0.1",
"systemjs": "0.19.40",
"tinymce": "^4.6.4",
"underscore": "^1.8.3",
"zone.js": "^0.8.12"`

@crisbeto
Copy link
Member

crisbeto commented Jul 1, 2017

What Material components are you using on the page that is failing to load?

@lukaszkukawski
Copy link
Author

I used:

MdButtonModule,
MdCheckboxModule,
MdAutocompleteModule,
MdInputModule,
MdIconRegistry,
MdIconModule,
MdDatepickerModule,
MdNativeDateModule,
MdTooltipModule,
MdSelectModule

@crisbeto crisbeto self-assigned this Jul 2, 2017
@crisbeto crisbeto added the has pr label Jul 2, 2017
crisbeto added a commit to crisbeto/material2 that referenced this issue Jul 2, 2017
Adds an extra null check when trimming the checkbox `textContent`. This avoids issues in Universal where the `textContent` will be undefined.

Fixes angular#5453.
@lukaszkukawski
Copy link
Author

when this fix, will be merged?

@lukaszkukawski
Copy link
Author

But when i removed MdCheckboxModule from my application i have this same error:

ERROR TypeError: Cannot read property 'trim' of undefined
at Object.eval [as updateRenderer] (webpack:///./aot/node_modules/@angular/material/typings/index.ngfactory.ts?:1001:97)
at Object.updateRenderer (webpack:///./node_modules/@angular/core/@angular/core.es5.js?:12978:70)
at checkAndUpdateView (webpack:///./node_modules/@angular/core/@angular/core.es5.js?:12497:14)
at callViewAction (webpack:///./node_modules/@angular/core/@angular/core.es5.js?:12857:21)
at execComponentViewsAction (webpack:///./node_modules/@angular/core/@angular/core.es5.js?:12789:13)
at checkAndUpdateView (webpack:///./node_modules/@angular/core/@angular/core.es5.js?:12498:5)
at callViewAction (webpack:///./node_modules/@angular/core/@angular/core.es5.js?:12857:21)
at execComponentViewsAction (webpack:///./node_modules/@angular/core/@angular/core.es5.js?:12789:13)
at checkAndUpdateView (webpack:///./node_modules/@angular/core/@angular/core.es5.js?:12498:5)
at callViewAction (webpack:///./node_modules/@angular/core/@angular/core.es5.js?:12857:21)

Now i tested version: 2.0.0-beta.8

@crisbeto
Copy link
Member

crisbeto commented Jul 7, 2017

Can you try narrowing it down? This was the only place where I found .trim where it could throw an error like this.

andrewseguin pushed a commit that referenced this issue Jul 27, 2017
Adds an extra null check when trimming the checkbox `textContent`. This avoids issues in Universal where the `textContent` will be undefined.

Fixes #5453.
andrewseguin pushed a commit that referenced this issue Jul 27, 2017
Adds an extra null check when trimming the checkbox `textContent`. This avoids issues in Universal where the `textContent` will be undefined.

Fixes #5453.
andrewseguin pushed a commit that referenced this issue Jul 27, 2017
Adds an extra null check when trimming the checkbox `textContent`. This avoids issues in Universal where the `textContent` will be undefined.

Fixes #5453.
andrewseguin pushed a commit that referenced this issue Jul 28, 2017
…5470)

Adds an extra null check when trimming the checkbox `textContent`. This avoids issues in Universal where the `textContent` will be undefined.

Fixes #5453.
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants