In my Sitecore application, I've created custom facet (it has simple fields and object lists). I identify the user by the method:
try
{
if (Tracker.IsActive)
{
Tracker.Current.Session.Identify(userId);
Tracker.Current.Contact.ContactSaveMode = Analytics.Model.ContactSaveMode.AlwaysSave;
}
}
Sometimes, when it is called, an error occurs:
ERROR The given key was not present in the dictionary. RROR at System.Collections.Generic.Dictionary`2.get_Item(TKey key) at Sitecore.Analytics.Model.Framework.ModelUtilities.CopyElement(IElement source, IElement destination) at Sitecore.Analytics.Pipelines.MergeContacts.MergeContactFacets.Process(MergeContactArgs args) at (Object , Object[] ) at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain) at Sitecore.Analytics.Pipelines.MergeContacts.MergeContactPipeline.Run(MergeContactArgs args) at Sitecore.Analytics.Data.ContactRepository.MergeContacts(Contact survivingContact, Contact dyingContact) at Sitecore.Analytics.Tracking.StandardSession.Identify(String userName)
Do you know what this is caused by? The facet is added in the configuration and the data is put away (they are used in xDB conditions)