HI,
After upgrading the site from 9.9.5 to 9.15.3 we started to get the following error with users and their carts (attachment ValueCannotBeNull):
[ArgumentNullException: Value cannot be null. Parameter name: key] System.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument) +52 System.Collections.Generic.Dictionary`2.FindEntry(TKey key) +14578763 System.Collections.Generic.Dictionary`2.TryGetValue(TKey key, TValue& value) +21 Dynamicweb.Ecommerce.ProductCatalog.ViewModelFactory.CreateCartViewModel(Order cart, Nullable`1 areaId) +2387 Dynamicweb.Ecommerce.Frontend.EcomPageOnOutputSubscriber.CreateInstance(Order cart, Nullable`1 areaId) +102 Dynamicweb.Ecommerce.Frontend.EcomPageOnOutputSubscriber.OnNotify(String notification, NotificationArgs args) +375 Dynamicweb.Extensibility.Notifications.NotificationManager.Notify(String notification, NotificationArgs eventArgs) +875 Dynamicweb.Frontend.PageView.Output() +1513 Dynamicweb.AspNet.DynamicwebHttpHandler.ProcessRequest(HttpContext context) +71 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +542 System.Web.<>c__DisplayClass285_0.<ExecuteStepImpl>b__0() +38 System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +11857797 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +93
We found that deleting the cart, the user was able to access the site again and log in.
We then started getting the following:
The problem seems to be either in Dynamicweb.Ecommerce.ProductCatalog.ViewModelFactory.CreateCartViewModel or in the data where there is a NULL value that shouldn't be there.
1. Log into front end and add an item to the cart - cart is fine and no issues
2. Open an ingognito window and log in with the same user - Error occurs