0

Vanilla Sitecore 10.1+ install with JSS 16 and SXA 10.1 installed. After the initial install, I'm able to navigate to the Launchpad normally. After a period of time or unknown trigger, I'm unable to navigate to the Launchpad, receiving this YSOD:

enter image description here

I've searched through my config files to see if there are any pipeline references to Sitecore.Analytics. Most references are patch:after="processor[@type='Sitecore.Analytics.Pipelines... attributes for the following SXA processors:

  • Sitecore.XA.Feature.ErrorHandling.Pipelines.HtpRequestProcessed.SetStatusCode
  • Sitecore.XA.Feature.Security.Pipelines.HttpRequestProcessed.RemoveServerInformationHeader
  • Sitecore.XA.Foundation.Theming.Pipelines.HtpRequestProcessed.FixInternetExplorerCompatibilityHeaders
  • Sitecore.LayoutService.Analytics.Pipelines.InitializeTracker.SetUrlFromRouteData
  • Sitecore.LayoutService.Analytics.Pipelines.MvcRequestBegin.DetermineTrackerEnabled
  • Sitecore.Services.GraphQL.Hosting.Mvc.Pipelines.StartAnalytics.DisableGraphQLRequestTracking

Nothing really sticks out to me, but given the ease at which I'm able to reproduce this, I'm hoping others have already isolated the problem, found a resolution or have ideas on how to troubleshoot better.

1

After analyzing the stack trace, I was able to isolate the culprit within the Sitecore.LayoutService.Analytics.config file. There is a processor named: Sitecore.LayoutService.Analytics.Pipelines.MvcRequestBegin.DetermineTrackerEnabled that is explicitly referencing the Tracker. Since I am using the XM topology, the Tracker dependency is not available and thus the exception is thrown. I am able to get around this issue by adding this patch file:

<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
  <sitecore>
    <pipelines>
      <mvc.requestBegin>
        <processor type="Sitecore.LayoutService.Analytics.Pipelines.MvcRequestBegin.DetermineTrackerEnabled, Sitecore.LayoutService.Analytics">
                <patch:delete />
        </processor>
      </mvc.requestBegin>
    </pipelines>
  </sitecore>
</configuration>

Unfortunately, this doesn't explain the cause of the problem. I looked through the *.scwdp files for Headless services and was unable to find an example where the Sitecore.LayoutService.Analytics.config was included within the App_Config directory. I also was not able to reproduce this same issue in my DEV environment which was provisioned using ARM templates.

I installed Headless services on my local using a Sitecore package. When I looked in my App_Data/packages directory, I noticed that I used the XP package (Sitecore Headless Services Server for Sitecore 10.1.0 XP 16.0.0 rev. 210223.zip) instead of XM.

You'll save yourself plenty of headaches if you make sure to use the correct package/wdp/container image if you're adding Headless Services to Sitecore.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.