2

I'm getting an error during the gulp step to sync Unicorn while trying to set up Habitat. Here is the error in the unicorn console:

ERROR: Object reference not set to an instance of an object. (System.NullReferenceException)
at Unicorn.Users.Loader.UserLoader.DeserializeUser(SyncUserFile serializedUser) 
at Unicorn.Users.Loader.UserLoader.Load(IConfiguration configuration) 
at Unicorn.Users.Pipelines.UnicornSyncComplete.SyncUsers.Process(UnicornSyncCompletePipelineArgs args) 
at (Object , Object[] ) 
at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) 
at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain) 
at Unicorn.SerializationHelper.SyncTree(IConfiguration configuration, Action`1 rootLoadedCallback, IItemData[] roots) 
at Unicorn.ControlPanel.Pipelines.UnicornControlPanelRequest.SyncVerb.Process(IProgressStatus progress, ILogger additionalLogger)

Here is the full output when running the Unicorn gulp task:

[10:06:40] Starting '05-Sync-Unicorn'...
C:\Projects\Habitat\scripts\unicorn.js:36
    if (err !== null) throw err;
                            ^
Error: Command failed: Invoke-WebRequest : Sync Unicorn
Info: Foundation.Serialization is being synced.
Info: 
Info: Foundation.Serialization sync complete: 24 items evaluated, 0 items modified (0 added, 0 updated, 0 recycled) in 
136ms (~5.7ms/item).
Info: Foundation.SitecoreExtensions is being synced.
Info: 
Info: Foundation.SitecoreExtensions sync complete: 160 items evaluated, 0 items modified (0 added, 0 updated, 0 
recycled) in 2787ms (~17.4ms/item).
Info: Feature.FAQ is being synced.
Info: 
Info: Feature.FAQ sync complete: 12 items evaluated, 0 items modified (0 added, 0 updated, 0 recycled) in 51ms 
(~4.3ms/item).
Info: 
Info: Feature.FAQ roles are being synced.
Info: Feature.FAQ role sync complete.
Info: Feature.Identity is being synced.
Info: 
Info: Feature.Identity sync complete: 19 items evaluated, 0 items modified (0 added, 0 updated, 0 recycled) in 2531ms 
(~133.2ms/item).
Info: 
Info: Feature.Identity roles are being synced.
Info: Feature.Identity role sync complete.
Info: Feature.Metadata is being synced.
Info: 
Info: Feature.Metadata sync complete: 18 items evaluated, 0 items modified (0 added, 0 updated, 0 recycled) in 51ms 
(~2.9ms/item).
Info: 
Info: Feature.Metadata roles are being synced.
Info: Feature.Metadata role sync complete.
Info: Foundation.Assets is being synced.
Info: 
Info: Foundation.Assets sync complete: 15 items evaluated, 0 items modified (0 added, 0 updated, 0 recycled) in 57ms 
(~3.9ms/item).
Info: 
Info: Foundation.Assets roles are being synced.
Info: Foundation.Assets role sync complete.
Info: Foundation.Dictionary is being synced.
Info: 
Process terminated with code 8.
Info: Foundation.Dictionary sync complete: 6 items evaluated, 0 items modified (0 added, 0 updated, 0 recycled) in 
2413ms (~402.2ms/item).
Info: Foundation.FieldEditor is being synced.
Info: 
Info: Foundation.FieldEditor sync complete: 1 item evaluated, 0 items modified (0 added, 0 updated, 0 recycled) in 
5954ms (~5,954.6ms/item).
Info: Foundation.Forms is being synced.
Info: 
Info: Foundation.Forms sync complete: 2 items evaluated, 0 items modified (0 added, 0 updated, 0 recycled) in 16ms 
(~8.3ms/item).
Info: Foundation.Indexing is being synced.
Info: 
Info: Foundation.Indexing sync complete: 6 items evaluated, 0 items modified (0 added, 0 updated, 0 recycled) in 26ms 
(~4.5ms/item).
Info: 
Info: Foundation.Indexing roles are being synced.
Info: Foundation.Indexing role sync complete.
Info: Foundation.LocalDatasource is being synced.
Info: 
Info: Foundation.LocalDatasource sync complete: 4 items evaluated, 0 items modified (0 added, 0 updated, 0 recycled) 
in 2566ms (~641.6ms/item).
Info: Foundation.Multisite is being synced.
Info: 
Info: Foundation.Multisite sync complete: 14 items evaluated, 0 items modified (0 added, 0 updated, 0 recycled) in 
2343ms (~167.4ms/item).
Info: 
Info: Foundation.Multisite roles are being synced.
Info: Foundation.Multisite role sync complete.
Info: Foundation.Theming is being synced.
Info: 
Info: Foundation.Theming sync complete: 22 items evaluated, 0 items modified (0 added, 0 updated, 0 recycled) in 
2409ms (~109.5ms/item).
Info: Feature.Accounts is being synced.
Info: 
Info: Feature.Accounts sync complete: 38 items evaluated, 0 items modified (0 added, 0 updated, 0 recycled) in 8448ms 
(~222.3ms/item).
Info: 
Info: Feature.Accounts roles are being synced.
Info: Feature.Accounts role sync complete.
Info: Feature.Demo is being synced.
Info: 
Info: Feature.Demo sync complete: 25 items evaluated, 0 items modified (0 added, 0 updated, 0 recycled) in 80ms 
(~3.2ms/item).
Info: 
Info: Feature.Demo roles are being synced.
Info: Feature.Demo role sync complete.
Info: Feature.Language is being synced.
Info: 
Info: Feature.Language sync complete: 7 items evaluated, 0 items modified (0 added, 0 updated, 0 recycled) in 31ms 
(~4.5ms/item).
Info: 
Info: Feature.Language roles are being synced.
Info: Feature.Language role sync complete.
Info: Feature.Maps is being synced.
Info: 
Info: Feature.Maps sync complete: 38 items evaluated, 0 items modified (0 added, 0 updated, 0 recycled) in 8145ms 
(~214.3ms/item).
Info: 
Info: Feature.Maps roles are being synced.
Info: Feature.Maps role sync complete.
Info: Feature.Media is being synced.
Info: 
Info: Feature.Media sync complete: 54 items evaluated, 0 items modified (0 added, 0 updated, 0 recycled) in 7487ms 
(~138.7ms/item).
Info: 
Info: Feature.Media roles are being synced.
Info: Feature.Media role sync complete.
Info: Feature.Multisite is being synced.
Info: 
Info: Feature.Multisite sync complete: 8 items evaluated, 0 items modified (0 added, 0 updated, 0 recycled) in 37ms 
(~4.7ms/item).
Info: 
Info: Feature.Multisite roles are being synced.
Info: Feature.Multisite role sync complete.
Info: Feature.Navigation is being synced.
Info: 
Info: Feature.Navigation sync complete: 24 items evaluated, 0 items modified (0 added, 0 updated, 0 recycled) in 70ms 
(~3.0ms/item).
Info: 
Info: Feature.Navigation roles are being synced.
Info: Feature.Navigation role sync complete.
Info: Feature.News is being synced.
Info: 
Info: Feature.News sync complete: 20 items evaluated, 0 items modified (0 added, 0 updated, 0 recycled) in 58ms 
(~2.9ms/item).
Info: 
Info: Feature.News roles are being synced.
Info: Feature.News role sync complete.
Info: Feature.PageContent is being synced.
Info: 
Info: Feature.PageContent sync complete: 20 items evaluated, 0 items modified (0 added, 0 updated, 0 recycled) in 86ms 
(~4.3ms/item).
Info: 
Info: Feature.PageContent roles are being synced.
Info: Feature.PageContent role sync complete.
Info: Feature.Search is being synced.
Info: 
Info: Feature.Search sync complete: 17 items evaluated, 0 items modified (0 added, 0 updated, 0 recycled) in 2492ms 
(~146.6ms/item).
Info: 
Info: Feature.Search roles are being synced.
Info: Feature.Search role sync complete.
Info: Feature.Social is being synced.
Info: 
Info: Feature.Social sync complete: 22 items evaluated, 0 items modified (0 added, 0 updated, 0 recycled) in 2346ms 
(~106.7ms/item).
Info: 
Info: Feature.Social roles are being synced.
Info: Feature.Social role sync complete.
Info: Feature.Teasers is being synced.
Info: 
Info: Feature.Teasers sync complete: 57 items evaluated, 0 items modified (0 added, 0 updated, 0 recycled) in 2558ms 
(~44.9ms/item).
Info: 
Info: Feature.Teasers roles are being synced.
Info: Feature.Teasers role sync complete.
Info: Feature.Person is being synced.
Info: 
Info: Feature.Person sync complete: 40 items evaluated, 0 items modified (0 added, 0 updated, 0 recycled) in 190ms 
(~4.8ms/item).
Info: 
Info: Feature.Person roles are being synced.
Info: Feature.Person role sync complete.
Info: Project.Common.Website is being synced.
Info: 
Info: Project.Common.Website sync complete: 173 items evaluated, 0 items modified (0 added, 0 updated, 0 recycled) in 
8518ms (~49.2ms/item).
Info: Project.Habitat.Website is being synced.
Info: 
Info: Project.Habitat.Website sync complete: 555 items evaluated, 0 items modified (0 added, 0 updated, 0 recycled) in 
4979ms (~9.0ms/item).
Info: 
Info: Project.Habitat.Website roles are being synced.
Info: Project.Habitat.Website role sync complete.
Info: 
Info: Project.Habitat.Website users are being synced.
Error: ERROR: Object reference not set to an instance of an object. (System.NullReferenceException)at 
Unicorn.Users.Loader.UserLoader.DeserializeUser(SyncUserFile serializedUser)   at 
Unicorn.Users.Loader.UserLoader.Load(IConfiguration configuration)   at 
Unicorn.Users.Pipelines.UnicornSyncComplete.SyncUsers.Process(UnicornSyncCompletePipelineArgs args)   at (Object , 
Object[] )   at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)   at 
Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain)   at 
Unicorn.SerializationHelper.SyncTree(IConfiguration configuration, Action`1 rootLoadedCallback, IItemData[] roots)   
at Unicorn.ControlPanel.Pipelines.UnicornControlPanelRequest.SyncVerb.Process(IProgressStatus progress, ILogger 
additionalLogger)
Info: 
Info: Completed.
At C:\Projects\Habitat\scripts\Unicorn\Unicorn.psm1:43 char:12
+ ...   $result = Invoke-WebRequest -Uri $url -Headers @{ "X-MC-MAC" = $sig ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebExc 
   eption
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
    at ChildProcess.exithandler (child_process.js:648:15)
    at ChildProcess.emit (events.js:98:17)
    at maybeClose (child_process.js:756:16)
    at Socket.<anonymous> (child_process.js:969:11)
    at Socket.emit (events.js:95:17)
    at Pipe.close (net.js:465:12)

I have installed Sitecore 8.2 Initial release with the appropriate version of wffm and am updated to the 8.2 release branch (I'm not sure if this is what I should have checked out. Sha: 4c3f8c1672a5d0da67966a34d87b1d6ee1081b3b). It looks like some user might not exist in my instance or there may be an issue with what is on the filesystem (I think Unicorn can store users). If anyone knows what the issue is some help would be appreciated.

  • Do you have any custom users? Any custom security provider? checkout this link and you can get an idea on why it`s throwing that exception from the execution of the method github.com/kamsar/Unicorn/blob/master/src/Unicorn.Users/Loader/… – Diego Apr 16 '17 at 21:20
  • I was either updated to the wrong spot in source control or must have missed a setup step. I uninstalled, updated to 490b4a58e6d3a83ea0c4d12cc1ad8ec7672826ce, reinstalled what I needed to and then it started working. – Teeknow Apr 18 '17 at 14:04
0

I was either updated to the wrong spot in source control or must have missed a setup step. I uninstalled, updated to 490b4a58e6d3a83ea0c4d12cc1ad8ec7672826ce, reinstalled what I needed to and then it started working.

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.