While setting up an instance of the Habitat demo site, I have followed all the steps as in the past but when the Sync Unicorn Gulp task begins, it exits with the following error:

Could not instantiate event handler. Type: Sitecore.ContentSearch.Events.PackagingEventHandler. Method: OnPackageInstallStartingRemoteHandler (method: Sitecore.Events.Event.GetConfigSubscribers()).

I thought maybe there was a problem with one of the resources used in the setup or even the clean instance of Sitecore. Since I get this same error when I try to log into Sitecore.

To be sure, I deleted the Sitecore instance for the Habitat solution and re-deployed with Sitecore SIM. I verified that I could see the default Sitecore home page and also logged in successfully.

Before proceeding, I made sure to have the latest of the following installed:

  • Node/NPM (6.9.2 and 3.10.9)
  • Bower (1.8.0)
  • Gulp (3.9.1)
  • Web Essentials 2015.3
  • Bundler & Minifier
  • Web Compiler
  • EditorConfig

I ran npm install at the root from an elevated command prompt without error.

I then opened Visual Studion as an administrator and ran the default task in Task Runner Explorer for the Solution 'Habitat' and watched it proceed without an errors through the first 4 tasks:

  1. Copy-Sitecore-License
  2. Nuget-Restore
  3. Publish-All-Projects
  4. Apply-Xml-Transform

When it comes time to run the Sync-Unicorn task, the console displays the error message, which is also displayed when I try to log into Sitecore.

Not sure how diagnose this error or where to look next.

up vote 7 down vote accepted

There is a mismatch between your Sitecore binaries and Sitecore configuration.

The OnPackageInstallStartingRemoteHandler method was only added to PackagingEventHandler in Sitecore 8.2 Update 1. It didn't exist yet in 8.2 Initial Release. Which means you have 8.2 (or earlier) binaries with 8.2 Update 1 configuration.

What happens, most likely, is that you are using Habitat that targets Sitecore 8.2 Initial Release (as it says on the Getting Started page) with a Sitecore instance based on Sitecore 8.2 Update 1. Habitat will deploy the binaries it targets during the build, so your 8.2u1 dlls are overwritten with 8.2 dlls.

Install Sitecore 8.2 Initial Release instead of 8.2u1 and the issue will be fixed.

Always check that the version of Habitat you pulled is using the correct version of Sitecore, as they are both continually getting updated. For example, it currently requires Sitecore 8.2 Update 4 - including Web Forms for Marketers Update 4 (rev 170518).

  • 1
    Indeed it was a version mismatch. In my haste, I had deployed update 1. I blew away everything and re-deployed and all is well. Thank you, Dmytro! – Sirius_B Dec 14 '16 at 21:43

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.