3

I have a Habitat Solution for Sitecore 9.0 Update 1. Trying to run auto Sync "05-Sync-Unicorn". when I ran this task, getting below warning in the log file:

[Unicorn-Auth] CHAP authentication attempt rejected due to mismatching HMAC code. 11084 11:33:01 WARN [Unicorn-Auth] MAC (should match client): ccdcd92727b448eeb32931d551e9ebf8|3AEAA615C3A3A2F382B2184A0596A34E2682E976DAA11C4647AEDA68B00C268C|RAPIDSITECORE.DEV.LOCAL/UNICORN.ASPX?VERB=SYNC&CONFIGURATION= 11084 11:33:01 WARN [Unicorn-Auth] HMAC expected: YG4Mpl3puG10YDiPYOE41Al4+LwaBEGs4+yecKRv8kAP3S7T1fUl3TyToB8hGOSQ93x9DfacWhE97juAV/JCaA== 11084 11:33:01 WARN [Unicorn-Auth] HMAC provided by client: MicroCHAP.SignatureResult

Item is not getting created in CMS.

Please can someone help me here.

  • Have you set the sharedsecret on both sides? – Michael West Mar 16 '18 at 8:21
  • was the configuration successful? and the error is coming when you sync? – Sitecore Sam Apr 10 '18 at 7:56
1

I know this is an ancient post and you've hopefully resolved the issue. I just want to put the answer on record, since it just happened to me as well.

TL;DR

Your version of MicroCHAP.dll and the Unicorn.psm1 script don't match each other.

Explanation

Habitat integrates with Unicorn (or Unicorn integrates with Habitat, if you prefer) via some javascript that then calls some PowerShell scripting that then calls some more PowerShell scripting.

You find this in the /scripts folder at the root of the Habitat repository.

Inside this folder, the actual bulk of the work happens in the /scripts/Unicorn/Unicorn.psm1 file.

And now we're getting to it. This file was changed between the initial releases of Habitat and later ones. I don't know exactly when, but I guess between Unicorn 3 and Unicorn 4.

And if you try and run the Habitat Sync Unicorn command using the old version of the script, the parameters will be wrong and the challenge will fail.

Solution

Make sure this script is updated to match your Habitat version. And make sure you also use the correct version of MicroCHAP.dll that comes with it.

For reference, this is the path to the file in the Sitecore Habitat repository. A RAW view. Copy all this into your local file, and the problem goes away. (At time of this writing. Unicorn 4.0.4, MicroCHAP 1.2.2)

Unicorn.psm1 on Sitecore Habitat

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.