You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ERROR Error: Uncaught (in promise): TypeError: Cannot assign to read only property 'tView' of object '[object Object]'
at getOrCreateTComponentView (core.js:7625)
at createRootComponentView (core.js:18912)
...
The error I am seeing seems to be related to #2109, which was apparently fixed in #2351, but had a recrudescence in #2404.
Finally, I am seeing this error regardless of the presence of strict checks.
Expected behavior:
I should be able to configure RouterState.Full in StoreRouterConnectingModule.forRoot() without having to add MinimalRouterStateSerializer.
Versions of NgRx, Angular, Node, affected browser(s) and operating system(s):
@ngrx/store: 9.0.0
@ngrx/router-store: 9.1.0
@angular/core: 9.0.6
node: 12.13.0
Other information:
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:
adrdilauro
changed the title
When using RouterState.Full in router-state: "Cannot assign to read only property 'tView' of object '[object Object]'"
When using RouterState.Full in router-store: "Cannot assign to read only property 'tView' of object '[object Object]'"
May 5, 2020
This is the desired result, as it's also noted in our docs.
IIRC we did this because this configuration was the default in previous versions.
Do you recall something about this @brandonroberts ?
We could make the MinimalSerializer also the default for the RouterState.Full option, but I'm not sure why this would be helpful. If you're using RouterState.Full, my guess is that you want the full router event stored and added to the action.
Yea, we had to do it that way because of the navigationId/event information I believe. This should not be an issue with the latest release. If it is re-open the issue.
I stumbled upon this issue.
As stated in the docs I set the runtime check strictStateSerializability to false (default) but I also had to set strictStateImmutability to false to make it work...
Minimal reproduction of the bug/regression with instructions:
Initialising
@ngrx/router-store
in the following way causes an exceptionThe error is the following
The error I am seeing seems to be related to #2109, which was apparently fixed in #2351, but had a recrudescence in #2404.
I inspected the source code, and found out that, at line https://github.com/ngrx/platform/blob/master/modules/router-store/src/router_store_module.ts#L172,
DefaultRouterStateSerializer
is used instead ofMinimalRouterStateSerializer
by default, when you specify that you want to useRouterState.Full
.Following the discussion in #2404, I suspect that the cause of the error is that, at line https://github.com/ngrx/platform/blob/master/modules/router-store/src/serializers/default_serializer.ts#L30 of the default serialiser, you are including in the serialised data the component that is attached to the route: such component is not an
@ngrx
component, thus it doesn't get included in the fix done in PR #2351.Explicitly forcing
MinimalRouterStateSerializer
is a workaround that avoids the exception, like this:Finally, I am seeing this error regardless of the presence of strict checks.
Expected behavior:
I should be able to configure
RouterState.Full
inStoreRouterConnectingModule.forRoot()
without having to addMinimalRouterStateSerializer
.Versions of NgRx, Angular, Node, affected browser(s) and operating system(s):
@ngrx/store
: 9.0.0@ngrx/router-store
: 9.1.0@angular/core
: 9.0.6node
: 12.13.0Other information:
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: