1

I'm getting the following error in my logs and at the same time experiencing data loss into xDB. This is on Sitecore 8.2 update 5.

My logs show following error:

9612 11:44:56 WARN Failed to deserialize Session object. Exception: Sitecore.Analytics.Exceptions.TypeNotAllowedForBindingException Message: Binding for type Sitecore.Analytics.Tracking.NextPageData from assembly Sitecore.Analytics, Version=10.0.0.0, Culture=neutral, PublicKeyToken=null is not allowed. Source: Sitecore.Analytics at Sitecore.Analytics.Sessions.WhitelistSerializationBinder.BindToType(String assemblyName, String typeName) at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Bind(String assemblyString, String typeString) at System.Runtime.Serialization.Formatters.Binary.ObjectReader.GetType(BinaryAssemblyInfo assemblyInfo, String name) at System.Runtime.Serialization.Formatters.Binary.ObjectMap..ctor(String objectName, String[] memberNames, BinaryTypeEnum[] binaryTypeEnumA, Object[] typeInformationA, Int32[] memberAssemIds, ObjectReader objectReader, Int32 objectId, BinaryAssemblyInfo assemblyInfo, SizedArray assemIdToAssemblyTable) at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObjectWithMapTyped(BinaryObjectWithMapTyped record) at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.Run() at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage) at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage) at Sitecore.Analytics.Sessions.PushSession.ProcessRequest(HttpContext context)

I tried adding this to sessionSerialization/allowedTypes, but this just caused next on to occur:

9648 11:23:11 WARN Failed to deserialize Session object. Exception: Sitecore.Analytics.Exceptions.TypeNotAllowedForBindingException Message: Binding for type Sitecore.Analytics.Model.OperatingSystemData from assembly Sitecore.Analytics.Model, Version=10.0.0.0, Culture=neutral, PublicKeyToken=null is not allowed. Source: Sitecore.Analytics at Sitecore.Analytics.Sessions.WhitelistSerializationBinder.BindToType(String assemblyName, String typeName) at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Bind(String assemblyString, String typeString) at System.Runtime.Serialization.Formatters.Binary.ObjectReader.GetType(BinaryAssemblyInfo assemblyInfo, String name) at System.Runtime.Serialization.Formatters.Binary.ObjectMap..ctor(String objectName, String[] memberNames, BinaryTypeEnum[] binaryTypeEnumA, Object[] typeInformationA, Int32[] memberAssemIds, ObjectReader objectReader, Int32 objectId, BinaryAssemblyInfo assemblyInfo, SizedArray assemIdToAssemblyTable) at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObjectWithMapTyped(BinaryObjectWithMapTyped record) at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.Run() at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage) at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage) at Sitecore.Analytics.Sessions.PushSession.ProcessRequest(HttpContext context)

These are out of the Box Sitecore types, so I would not expect me to have to add them to allowedTypes. Also, adding multiple types here in a patch files does not seem to work, only the first added type is working, I have to add them to the original Sitecore.Analytics.SessionSerialization.config files, which is totally unacceptable. But as I don't find anyone else complaining about this, I wonder if I am doing something wrong to cause this.

I appreciate any insights here.

  • Patching succeeded by just deleting allowedTypes element in its totality, and replacing it. But this is not a future proof solutions for when new Sitecore versions appear. – Joost Apr 9 '18 at 10:23
4

As you pointed out on your comment, this can be resolved by adding the missing types Sitecore.Analytics.SessionSerialization.config. You can see Sitecore comes with a bunch of these by default. Maybe they missed couple of them?

You should be able to patch this list, but you need to add a unique attribute to each node so they don't replace each other. e.g. (see desc attribute)

<?xml version="1.0" encoding="utf-8" ?>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<sessionSerialization>
  <!-- Provides fully qualified type names, which are allowed to be serialized. -->
  <allowedTypes>
    <type desc="a">MyAssembly.MyType.aaaa, MyAssembly</type>
    <type desc="b">MyAssembly.MyType.bbbb, MyAssembly</type>
  </allowedTypes>
</sessionSerialization>
</sitecore>
</configuration>
  • thnx that indeed fixes the patching part. Will create a support ticket with Sitecore and updat this thread on whether indeed they forgot these types – Joost Apr 11 '18 at 6:58
0

This has been registered as a bug at Sitecore. My workaround is correct until a patch is delivered or the bug is fixed in future releases.

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.