SOLVED: Error while running Sitecore Unicorn sync for Habitat Home: System.ArgumentException: Configuration(s) requested were not defined.


When running Habitat Home build using build.ps1, the Sync-Unicorn task fails with the following message:

Error: ERROR: Configuration(s) requested were not defined. (System.ArgumentException)<div class="stacktrace">at Unicorn.ControlPanel.Pipelines.UnicornControlPanelRequest.SyncVerb.ResolveConfigurations()
<br />   at Unicorn.ControlPanel.Pipelines.UnicornControlPanelRequest.SyncVerb.Process(IProgressStatus progress, ILogger additionalLogger)
<br />   at Unicorn.ControlPanel.Pipelines.UnicornControlPanelRequest.SyncVerb.<>c__DisplayClass3_0.<CreateResponse>b__0(IProgressStatus progress)
<br />   at Unicorn.ControlPanel.Responses.WebConsoleResponse.ProcessInternal(IProgressStatus progress)
<br />   at Kamsar.WebConsole.TextWebConsole.Render(Action`1 processAction)
<br />   at Unicorn.ControlPanel.Responses.WebConsoleResponse.Execute(HttpResponseBase response)</div>
****ERROR OCCURRED****
An error occurred when executing task 'Sync-Unicorn'.
Error: One or more errors occurred.
        Unicorn Sync to https://sitecore93sc.dev.local/unicorn.aspx?verb=Sync&configuration=true&skipTransparentConfigs=0 returned an error. See the preceding log for details.
The stack trace is as follows:

Server Error in '/' Application.


Configuration(s) requested were not defined.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentException: Configuration(s) requested were not defined.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[ArgumentException: Configuration(s) requested were not defined.]
   Unicorn.ControlPanel.Pipelines.UnicornControlPanelRequest.SyncVerb.ResolveConfigurations() +507
   Unicorn.ControlPanel.Pipelines.UnicornControlPanelRequest.SyncVerb.Process(IProgressStatus progress, ILogger additionalLogger) +28
   Unicorn.ControlPanel.Pipelines.UnicornControlPanelRequest.<>c__DisplayClass3_0.<CreateResponse>b__0(IProgressStatus progress) +175
   Unicorn.ControlPanel.Responses.WebConsoleResponse.ProcessInternal(IProgressStatus progress) +511
   Kamsar.WebConsole.Html5WebConsole.Render(Action`1 processAction) +286
   Unicorn.ControlPanel.UnicornControlPanelPipelineProcessor.ProcessRequest(HttpContext context) +716
   Unicorn.ControlPanel.UnicornControlPanelPipelineProcessor.Process(HttpRequestArgs args) +325
   (Object , Object ) +14
   Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +490
   Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain, Boolean failIfNotExists) +236
   Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain) +22
   Sitecore.Web.RequestEventsHandler.OnPostAuthenticateRequest(HttpContextBase context) +218
   Sitecore.Nexus.Web.HttpModule.‪‏‪‌‪‍‌‮‬​‬‍‎​‏‍‪‭‎‌‍‪‪‮‮(Object , EventArgs ) +207
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +223
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +220
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +94

The issue seems to be related to the following line of code in scripts\Unicorn\Unicorn.psm1

$url = "{0}?verb={1}&configuration={2}&skipTransparentConfigs={3}" -f $ControlPanelUrl, $Verb, $parsedConfigurations, $skipValue 

Solution: Update the query parameter "configuration" to "configurations".

The error seems to only show when using -DebugSecurity switch is applied to Sync-Unicorn command in scripts\Unicorn\Sync.ps1




Comments

Popular posts from this blog

Is Rendered Item Valid XHtml Document Could not find schema information warnings during publish item Sitecore 7.2

Sitecore Tabbed Select Rendering dialog

RESOLVED: Solr Exceptions - Document contains at least one immense term in field