Sitecore Commerce 8.2.1 resolved issue

While setting up Sitecore commerce I have faced few issues one of the issue I resolved is:

commerceUser.ExternalId

While I was trying to access user profile, following error gets logged in log file:


Exception: System.InvalidOperationException
Message: commerceUser.ExternalId
Source: Sitecore.Kernel
at Sitecore.Diagnostics.Assert.IsNotNullOrEmpty(String value, String message)
at Sitecore.Reference.Storefront.Connect.Pipelines.GetUser.UpdateCustomer(CommerceUser commerceUser, UserProfile userProfile)
at Sitecore.Reference.Storefront.Connect.Pipelines.GetUser.Process(ServicePipelineArgs args)
at (Object , Object[] )
at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain)
at Sitecore.Commerce.Services.ServiceProvider.RunPipeline[TRequest,TResult](String pipelineName, TRequest request)
at Sitecore.Reference.Storefront.Managers.AccountManager.GetUser(String userName)
at Sitecore.Reference.Storefront.Managers.AccountManager.ResolveCommerceUser()
at Sitecore.Reference.Storefront.Managers.AccountManager.Login(CommerceStorefront storefront, VisitorContext visitorContext, String anonymousVisitorId, String userName, String password, Boolean persistent)
at Sitecore.Reference.Storefront.Controllers.AccountController.Login(LoginModel model)
at lambda_method(Closure , ControllerBase , Object[] )
at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.b__39(IAsyncResult asyncResult, ActionInvocation innerInvokeState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`2.CallEndDelegate(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.b__3d()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.c__DisplayClass46.b__3f()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.c__DisplayClass46.b__3f()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.c__DisplayClass46.b__3f()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.c__DisplayClass21.c__DisplayClass2b.b__1c()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.c__DisplayClass21.b__1e(IAsyncResult asyncResult)

I was able to resolve this error by giving permissions to app pool user and logged in user to Sitecore databases and Commerce Admin database and profile database in SQL.
 


Discover more from The Modern Enterprise Insights by Sachin Magon

Subscribe to get the latest posts sent to your email.


Comments

Leave a comment