Sitecore / Habitat

Sitecore Modular Architecture Example
Other
413 stars 397 forks source link

Cannot run Sync-Unicorn successfully on new build for feature/v9 #442

Closed rroman81 closed 6 years ago

rroman81 commented 6 years ago

Note: for support questions, please use Sitecore Stackexchange or #helix-habitat on Sitecore Community Slack. This repository's issues are reserved for feature requests and bug reports.

I have cloned the feature/v9 branch and ran through the build set up successufully for Sitecore 9.0.2-Update2. However, when attempting to run gulp default, I get an error for Sync-Unicorn task:

Access to the path 'C:\Users\venrrozinov\proj\Habitat\src\Foundation\Dictionary\serialization\Roles' is denied. Error: [UnauthorizedAccessException: Access to the path 'C:\Users\venrrozinov\proj\Habitat\src\Foundation\Dictionary\serialization\Roles' is denied.] System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +417

Error: System.IO.Directory.InternalCreateDirectory(String fullPath, String path, Object dirSecurityObj, Boolean checkHost) +1394 System.IO.Directory.InternalCreateDirectoryHelper(String path, Boolean checkHost) +92 Unicorn.Roles.Data.FilesystemRoleDataStore.InitializeRootPath(String rootPath) +251

Error: Unicorn.Roles.Data.FilesystemRoleDataStore..ctor(String physicalRootPath, IRoleSerializationFormatter roleFormatter) +65 lambda_method(Closure , Object[] ) +155

Error: Configy.Containers.MicroContainer.Activate(Type type, KeyValuePair2[] unmappedConstructorParameters) +880 System.Lazy1.CreateValue() +708

Error: System.Lazy`1.LazyInitValue() +184 Configy.Containers.MicroContainer.Resolve(Type type) +59 Configy.Containers.MicroContainer.Resolve() +55 Unicorn.Roles.Events.UnicornConfigurationRolesEventHandler..ctor(IConfiguration configuration) +111 Unicorn.Roles.Events.<>c.<.ctor>b__2_0(IConfiguration config) +38

Error: System.Linq.WhereSelectArrayIterator2.MoveNext() +145 System.Linq.Buffer1..ctor(IEnumerable1 source) +492 System.Linq.Enumerable.ToArray(IEnumerable1 source) +90

Error: Unicorn.Roles.Events.UnicornRolesEventHandler..ctor(IEnumerable`1 configurations) +167

Error: [TargetInvocationException: Exception has been thrown by the target of an invocation.]

Error: System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0 System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +289 Sitecore.Reflection.ReflectionUtil.CreateObject(Type type, Object[] parameters) +119 Sitecore.Configuration.DefaultFactory.CreateFromTypeName(XmlNode configNode, String[] parameters, Boolean assert) +108

Error: Sitecore.Configuration.DefaultFactory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper) +163 Sitecore.Configuration.DefaultFactory.CreateObject(XmlNode configNode, Boolean assert) +68 Sitecore.Events.EventSubscribers.Add(String eventName, XmlNode configNode) +556 Sitecore.Events.Event.GetConfigSubscribers() +474

Error: Sitecore.Events.Event.RaiseEvent(String eventName, Object[] parameters) +374 Sitecore.ContentSearch.Maintenance.IndexDatabasePropertyStore.Get(String key) +205 Sitecore.ContentSearch.SolrProvider.SolrIndexSummary.get_LastUpdatedTimestamp() +82 Sitecore.ContentSearch.Maintenance.Strategies.BaseAsynchronousStrategy.LogStrategyInitialization(ISearchIndex index) +94 Sitecore.ContentSearch.Maintenance.Strategies.BaseAsynchronousStrategy.Initialize(ISearchIndex searchIndex) +83

Error: Sitecore.ContentSearch.Maintenance.Strategies.IntervalAsynchronousStrategy.Initialize(ISearchIndex searchIndex) +18 Sitecore.ContentSearch.TypeActionHelper.Call(Action1 action, IEnumerable1 instances) +197 Sitecore.ContentSearch.SolrProvider.SolrSearchIndex.Initialize() +180 Sitecore.ContentSearch.SolrProvider.SolrContentSearchManager.Initialize() +169 (Object , Object ) +9 Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +484 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.Nexus.Web.HttpModule.Application_Start() +161 Sitecore.Nexus.Web.HttpModule.Init(HttpApplication app) +767 System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +581

Error: System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +168 System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +414 System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +369 [HttpException (0x80004005): Exception has been thrown by the target of an invocation.] System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +532 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +111

Error: System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +714

Error:

Error:

Error: Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.3062.0

Error: c.b__2_0(IConfiguration config)

Error: at System.Linq.Enumerable.WhereSelectArrayIterator2.MoveNext() at System.Linq.Buffer1..ctor(IEnumerable1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source) at Unicorn.Roles.Events.UnicornRolesEventHandler..ctor(IEnumerable`1 configurations)

Error: [TargetInvocationException]: Exception has been thrown by the target of an invocation. at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)

Error: at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at Sitecore.Reflection.ReflectionUtil.CreateObject(Type type, Object[] parameters) at Sitecore.Configuration.DefaultFactory.CreateFromTypeName(XmlNode configNode, String[] parameters, Boolean assert)

Error: at Sitecore.Configuration.DefaultFactory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper) at Sitecore.Configuration.DefaultFactory.CreateObject(XmlNode configNode, Boolean assert) at Sitecore.Events.Event.EventSubscribers.Add(String eventName, XmlNode configNode) at Sitecore.Events.Event.GetConfigSubscribers() at Sitecore.Events.Event.RaiseEvent(String eventName, Object[] parameters) at Sitecore.ContentSearch.Maintenance.IndexDatabasePropertyStore.Get(String key)

Error: at Sitecore.ContentSearch.SolrProvider.SolrIndexSummary.get_LastUpdatedTimestamp() at Sitecore.ContentSearch.Maintenance.Strategies.BaseAsynchronousStrategy.LogStrategyInitialization(ISearchIndex index)

Error: at Sitecore.ContentSearch.Maintenance.Strategies.BaseAsynchronousStrategy.Initialize(ISearchIndex searchIndex) at Sitecore.ContentSearch.Maintenance.Strategies.IntervalAsynchronousStrategy.Initialize(ISearchIndex searchIndex) at Sitecore.ContentSearch.TypeActionHelper.Call[T](Action1 action, IEnumerable1 instances) at Sitecore.ContentSearch.SolrProvider.SolrSearchIndex.Initialize() at Sitecore.ContentSearch.SolrProvider.SolrContentSearchManager.Initialize() at (Object , Object ) at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain, Boolean failIfNotExists) at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain) at Sitecore.Nexus.Web.HttpModule.Application_Start() at Sitecore.Nexus.Web.HttpModule.Init(HttpApplication app) at System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) at System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) at System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) at System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) [HttpException]: Exception has been thrown by the target of an invocation. at System.Web.HttpRuntime.FirstRequestInit(HttpContext context) at System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) --> At C:\Users\venrrozinov\proj\Habitat\scripts\Unicorn\Unicorn.psm1:82 char:12

Error: + CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException

C:\Users\venrrozinov\proj\Habitat\scripts\unicorn.js:44 if (err !== null) throw err;

Expected behavior The sync should complete on an empty system with all successful tasks completed.

Additional Contexts I have navigated to the serialization folder and noticed that we do not have any Roles to synchornize under that location. Are we missing serialization assets from Foundation/Dictionary/Serialization/Roles?

rroman81 commented 6 years ago

Solved the problem by providing the IIS_USRS "Modify" permissions to the project root folder. We may want to explicitly call that out in the docs/** documentation files.