-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Core.js:5760 ERROR TypeError: Cannot assign to read only property 'tView' of object '[object Object]' #2109
Comments
Wanted to add that having all 4 properties there also fixes the issue
|
Hmmm, it's weird that if you have all the checks turned on it doesn't occur. If you wanna use the runtime checks, you probably also want to use the minimal router config - https://ngrx.io/guide/router-store/configuration#routerstateminimal |
Here is my test repo So on some further testing I found that with a Customserializer the strictActionsSerializability cannot be set to true. all the others can be set to true.
but the main issue is that if you just start the setup process. so basic install and everything default. you run into this. and you get the cryptic message which doesn't tell much
|
You must use the |
I have found this error too, updating to angular 9. Why was it closed? It was hard to relate to I have opened an issue at angular repo (angular/angular#34993) because the error pointed me to it at first instance. Once, I have found that |
Hi, I'd like to followup on the issue @tonivj5 created in Angular Framework repo and provide more info after additional investigation. You can repro this issue using this repo: https://github.com/tonivj5/angular-issue-34993 (thanks @tonivj5). The problem appears when the As a possible solution, fields with names starting with // cc @robwormald Thank you. |
+1 for this. In my project I needed to disable the |
@garrappachc this issue has been fixed in master, and will go out with the next release soon. If we need to cut a bug fix for NgRx 8.x before then we will do that also. |
Updated to ng 9.0.2 today and this workaround got me running. Thanks! |
@brandonroberts @AndrewKushnir I am still experiencing this error in A9. I have tried disabling both strictState and strictAction, and also upgrading to ngrx@9.0.0-beta.1 Our use case is this: various nx modules are passing a Type through state to the app.component, where the component is factoried into a MatSidenavContainer. (not routing-related but same error) I also tried passing the factory instead and received a similar error. This is a major problem for us; I don't want to have to revert after a long week getting us to A9. Please let me know what information I can provide. [UPDATE]: I went around this for my use case with a small bus service. |
@pburkindine besides disabling strictAction and strictState try using minimal router state: StoreRouterConnectingModule.forRoot({ routerState: RouterState.Minimal }), |
Are you going to fix this issue? The app keeps crashing with newest Angular 9.0.6 and NgRx 9.0.0. Setting |
In my case, I had to set to false both to get rid of the error:
But, this wouldn't be alternative solution. |
Using the latest version of ngrx 9.1.2 I still got this error. I had to change the following line:
to:
This was code from a Metronic theme written for Ang8 I was upgrading to Ang9. |
I have version ngrx 9.1.2 and angular 9.1.9 and i get these error inside of a reducer and with
its working again. for me the problem occur on a "ToDo" list i click on the check and then i call an endpoint and set the new data in the reducer and update the store and on updating the store in the Success Action i get the readonly Property error |
app.module.ts
test.module.ts
test2.module.ts
like that, how to disable strict! |
|
|
Minimal reproduction of the bug/regression with instructions:
I came across a compatibility issue with NgRx and Angular Version 9 Router
step 1: created a new CLI () project and add NgRx store, effects, entity, router-store, store, store-devtools
"@angular/cli": "^9.0.0-next.3"
"@angular/compiler-cli": "^9.0.0-next.5"
step 2: Make sure to use Ivy renderer
https://fireship.io/snippets/angular-upgrade-with-ivy/
step 3: create some routes
error in console when trying to navigate:
core.js:5760 ERROR Error: Uncaught (in promise): TypeError: Cannot assign to read only property 'tView' of object '[object Object]'
TypeError: Cannot assign to read only property 'tView' of object '[object Object]'
Expected behavior:
moving between routes
Versions of NgRx, Angular, Node, affected browser(s) and operating system(s):
windows 10, node v10.14
"@angular/animations": "^9.0.0-next.5",
"@angular/common": "^9.0.0-next.5",
"@angular/compiler": "^9.0.0-next.5",
"@angular/core": "^9.0.0-next.5",
"@angular/forms": "^9.0.0-next.5",
"@angular/platform-browser": "^9.0.0-next.5",
"@angular/platform-browser-dynamic": "^9.0.0-next.5",
"@angular/platform-server": "^9.0.0-next.5",
"@angular/router": "^9.0.0-next.5",
"@ngrx/effects": "^8.3.0",
"@ngrx/entity": "^8.3.0",
"@ngrx/router-store": "^8.3.0",
"@ngrx/store": "^8.3.0",
"@ngrx/store-devtools": "^8.3.0",
"core-js": "^2.6.9",
"rxjs": "^6.3.3",
"tslib": "^1.9.0",
"zone.js": "^0.8.29"
Other information:
app.module.ts
Sorry if i did this wrong but this is my first time and just wanted to let you.
I would be willing to submit a PR to fix this issue
[x] Yes (Assistance is provided if you need help submitting a pull request)
[ ] No
The text was updated successfully, but these errors were encountered: