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:
|
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
Post a Comment