Invalid default domain in config provider of domain manager

  • Sitecore executes background operations under the context of a specific user account. If such a user is not explicitly specified, Sitecore takes an anonymous account from the domain defined as a default one for the domain manager.

    By design, the default/Anonymous user account should be used as the default one. But the domain manager definition, out of the box, specifies the sitecore domain as a default one. As a result, Sitecore executes the background tasks under the wrong context of the sitecore/Anonymous user. The specified user account was not designed for such background operations and therefore it does not have all the required permissions.

    This, for example, leads to the following error when the SyncSegmentsProcessor processor of the <initialize> pipeline executes synchronization of segments:

    INFO [Experience Analytics]: Segment Deploy started.
    FATAL [Experience Analytics]: Failed to synchronize segments. Message: Value cannot be null.
    Parameter name: item. Details:    
       at Sitecore.Workflows.Simple.WorkflowProvider.GetWorkflow(Item item)
       at Sitecore.ExperienceAnalytics.Core.Extensions.SegmentDefinitionExtensions.GetLanguageIndependentWorkFlowState(SegmentDefinition segmentDefinition)
       at Sitecore.ExperienceAnalytics.Client.Deployment.SyncSegmentsManager.<>c.b__7_0(SegmentDefinition segmentDefinition)
       at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
       at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
       at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
       at Sitecore.ExperienceAnalytics.Client.Deployment.SyncSegmentsManager.SynchronizeAllSegments()
       at System.Threading.Tasks.Task.Execute()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Sitecore.ExperienceAnalytics.Client.Deployment.SyncSegmentsProcessor.d__4.MoveNext()

Applies to:

CMS 8.2 - 9.1 Update-1

CMS 9.2 Initial Release

May 03, 2019
August 01, 2019

Reference number: