Finally! Sitecore 9.3 and Horizon are released! So it’s time to have a look at it. Last week I set up a VM, installed Sitecore XP and installed Horizon – but Horizon didn’t work. I read the hints from others, but nothing seem to help.
So how to install and get it work?
I set up the following:
- VM with Windows 10 Pro
- SQL Express 2017
- SQL Management Studio
- NodesJS and npm
- .NET Core Runtime Hosting Bundle
- Solr 8.1.1 & Solr Service via nssm
I installed Sitecore XP by using the new Sitecore Install Assistant, which works really fine. You can download it here: https://dev.sitecore.net/Downloads/Sitecore_Experience_Platform/93/Sitecore_Experience_Platform_93_Initial_Release.aspx#
Then I downloaded the zip file for horizon and followed the installation guide, double-checked the correct prerequisites and installed it. I called the horizon-site url, but the site could not be rendered.
I searched for the reason and found that others had the same error, but a different logentry. There was only the error:
Connection id ""0HLRPONNUMJI0"", Request id ""0HLRPONNUMJI0:00000001"": An unhandled exception was thrown by the application.
Microsoft.AspNetCore.NodeServices.HostingModels.NodeInvocationException: Prerendering timed out after 30000ms because the boot function in 'C:\inetpub\wwwroot\horizon.local.sc.dev.local\sitecore\Horizon.Client\Horizon.Client/dist-server/main.js' returned a promise that did not resolve or reject. Make sure that your boot function always resolves or rejects its promise. You can change the timeout value using the 'asp-prerender-timeout' tag helper.
at Microsoft.AspNetCore.NodeServices.HostingModels.HttpNodeInstance.InvokeExportAsync[T](NodeInvocationInfo invocationInfo, CancellationToken cancellationToken)
at Microsoft.AspNetCore.NodeServices.HostingModels.OutOfProcessNodeInstance.InvokeExportAsync[T](CancellationToken cancellationToken, String moduleName, String exportNameOrNull, Object[] args)
at Microsoft.AspNetCore.NodeServices.NodeServicesImpl.InvokeExportWithPossibleRetryAsync[T](String moduleName, String exportedFunctionName, Object[] args, Boolean allowRetry, CancellationToken cancellationToken)
at Microsoft.AspNetCore.NodeServices.NodeServicesImpl.InvokeExportWithPossibleRetryAsync[T](String moduleName, String exportedFunctionName, Object[] args, Boolean allowRetry, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Builder.SpaPrerenderingExtensions.<>c__DisplayClass0_0.<<UseSpaPrerendering>b__1>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context)
at Horizon.Client.ConfigureSitecore.<>c.<<Configure>b__5_2>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Sitecore.Services.GraphQL.Hosting.GraphQLCacheStatsMiddleware.Invoke(HttpContext context)
at Sitecore.Horizon.API.Gateway.ConfigureSitecore.<>c__DisplayClass4_0.<<Configure>b__1>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Cors.Infrastructure.CorsMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Builder.Extensions.MapMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Builder.Extensions.MapWhenMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Sitecore.Plugin.Authentication.ErrorHandling.AuthenticationExceptionMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Server.IISIntegration.IISMiddleware.Invoke(HttpContext httpContext)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)
I searched and searched and found for example this very helpful blog article: http://www.flux-digital.com/blog/installing-sitecore-9-3-horizon/.
But it didn’t help with my problem.
Guess how I solved it? I tried to call the horizon page and got this timeout. I called the Sitecore site and the horizon site again and it worked. So the hint is: Call your Sitecore once before you try to get horizon work 🙂