abpframework / eShopOnAbp

Reference microservice solution built with the ABP Framework and .NET, runs on Kubernetes with Helm configuration, includes API Gateways, Angular and ASP.NET Core MVC applications, PostgreSQL and MongoDB databases
https://www.eShopOnAbp.com/
MIT License
694 stars 272 forks source link

CartWidget Model (basket items) is null on initial load #194

Closed gterdem closed 1 year ago

gterdem commented 1 year ago

Initial error:

2023-09-12 13:57:33.671 -04:00 [ERR] Value cannot be null. (Parameter 'input')
System.ArgumentNullException: Value cannot be null. (Parameter 'input')
   at System.Guid.Parse(String input)
   at EShopOnAbp.PublicWeb.ServiceProviders.UserBasketProvider.GetBasketAsync() in D:\Github\eShopOnAbp\apps\public-web\src\EShopOnAbp.PublicWeb\ServiceProviders\UserBasketProvider.cs:line 35

Related to https://github.com/abpframework/eShopOnAbp/blob/fa35f610f7868c8321e2dc679350ae4e1d5f49e9/apps/public-web/src/EShopOnAbp.PublicWeb/ServiceProviders/UserBasketProvider.cs#L34-L35

anonymousUserId is being null because the UseAnonymousUser midware didn't kick in yet.