Cannot add property _userName, object is not extensible
Hello,
The error seems to be related to this
Our extensible table adds some properties to the records of the table.
Do you call
preventExtensions
on the data?
We are not calling preventExtensions
anywhere in our code
We recently updated to 4.4.0 and now when we login with admin accounts the /identity/users
page is showing an empty list and the console is giving property errors. Does anyone know if this has been reported already or a fix?
Edit: Pasting in error message for text based searching
core.js:5980 ERROR TypeError: Cannot add property _userName, object is not extensible
at abp-ng.theme.shared-extensions.js:1331
at EntityPropList.forEach (abp-utils.js:259)
at abp-ng.theme.shared-extensions.js:1329
at Array.map (<anonymous>)
at ExtensibleTableComponent.ngOnChanges (abp-ng.theme.shared-extensions.js:1328)
at ExtensibleTableComponent.rememberChangeHistoryAndInvokeOnChangesHook (core.js:1471)
at callHook (core.js:2490)
at callHooks (core.js:2457)
at executeCheckHooks (core.js:2389)
at refreshView (core.js:9201)
core.js:5980 ERROR TypeError: Cannot read property 'visible' of undefined
at ExtensibleTableComponent_ng_container_2_ng_template_3_ng_container_0_Template (abp-ng.theme.shared-extensions.js:325)
at executeTemplate (core.js:9323)
at refreshView (core.js:9192)
at refreshEmbeddedViews (core.js:10312)
at refreshView (core.js:9216)
at refreshEmbeddedViews (core.js:10312)
at refreshView (core.js:9216)
at refreshEmbeddedViews (core.js:10312)
at refreshView (core.js:9216)
at refreshComponent (core.js:10358)
```
I found our issue, we were modifying a value on the user after sending the confirmation email that was causing the token to be invalid
Yes on the demo project it started to work after setting that. On our actual project it still does not work even when adding that in, Im currently trying to see what changes could be causing this.
I just sent you a demo project to that address
We are using the IdentityUserManager
class from the Volo.Abp.Identity
identity package so im not sure if I am following you. We have not modified or changed that class so im not sure how to check those unless it is in a setting somewhere.
I checked and Redis is not the problem.
What is happening is that in ConfirmEmailAsync
the line that calls UserManager.ConfirmEmailAsync
is not using Redis for the key. When I change it to call UserManager.VerifyUserTokenAsync
directly it does.
Can you check as to why this is happening? Since this is the IdentityUserManager
for the ABP library and the code in question is also from the ABP library I would have expected the using the code given to us would work out of the box.
This is all in the AccountAppService
class from Volo.Abp.Account.Pro.Public.Application
project using the Volo.Abp.Account
namespace
Yes, and as stated in previous messages and seen in our zoom call we are using Redis to save the keys
Looking at your example, we are doing almost the same thing but with two differences
SendingEmailConfirmationTokenAsync
from the API and ConfirmEmailAsync
from the Identity Server which calls UserManager.ConfirmEmailAsync
Is the built in functionality in the AccountAppService class not suitable for this? Do we need to just use our own implementation instead?
Yes, we implemented a custom registration process and put the registration API in the API project. We are still using the the built in Registration method that is in the Applications project