Optimistic concurrency failure, object has been modified error on password reset

Vote:
 

We are currently running into an issue where we are getting an error message stating “Optimistic concurrency failure, object has been modified.” intermittently when trying to reset a customer’s password. I’m not sure why this is happening or when it started. Unfortunately we have been unable to reproduce the problem reliably but are seeing it a lot in production. We are on CMS 12.30.0 and Customized Commerce 14.23.0.

I understand that the error is saying that the user that we are trying to modify has already been changed but I do not see anywhere in the code that that is happening.

My efforts to search Google for troubleshooting and contacting Optimizely support have not yet been fruitful so I'm hoping someone here will have some ideas on how to track down the specific issue.

#329673
Sep 10, 2024 19:41
Vote:
 

It seems it's a problem with Entity Framework via AspNetIdentity. Did you manage to get the full stacktrace ?

#329709
Sep 11, 2024 7:12
Vote:
 

Unfortunately, I can not see the full stack trace. It seems to get swallowed somewhere inside Microsoft.AspNetCore.Identity's UserManager.ResetPasswordAsync method. The only way I got this existing message was by reading the IdentityResult value that is returned from that method which contains a list of IdentityErrors that only have string Code and Description parameters returned. Do you know of a way to get access to the stack trace?

#329721
Sep 11, 2024 14:38
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.