nullreference after upgrade

Vote:
 

Hi

After upgrade of episerver from 11.17 => 12.15 (and .net to 6) i'm receiving this error:

(error happens on startup)

System.Reflection.TargetInvocationException: 'Exception has been thrown by the target of an invocation.'
This exception was originally thrown at this call stack:
    System.ThrowHelper.ThrowArgumentNullException(System.ExceptionArgument)
    EPiServer.Data.Dynamic.Providers.Internal.DbDataStoreProvider.ProcessValueFromDb(System.Type, object, string, EPiServer.Data.Dynamic.Providers.ProviderCallContext, System.Type)
    EPiServer.Data.Dynamic.Providers.SqlServerDataStoreProvider.ProcessValueFromDb(System.Type, object, string, EPiServer.Data.Dynamic.Providers.ProviderCallContext, System.Type)
    EPiServer.Data.Dynamic.Providers.Internal.DbDataStoreProvider.LoadInlineProperties(EPiServer.Data.Dynamic.Providers.ProviderCallContext)
    EPiServer.Data.Dynamic.Providers.Internal.DbDataStoreProvider.Load.AnonymousMethod__0()
    EPiServer.Data.Dynamic.DynamicDataStore.InternalLoad(EPiServer.Data.Identity, System.Type, EPiServer.Data.Dynamic.Providers.LoadAsObjectType, EPiServer.Data.Dynamic.Providers.ProviderCallContext)
    EPiServer.Data.Dynamic.Providers.Internal.DbDataStoreProvider.LoadSubObject(EPiServer.Data.Identity, System.Type, string, EPiServer.Data.Dynamic.Providers.ProviderCallContext)
    EPiServer.Data.Dynamic.Providers.Internal.DbDataStoreProvider.LoadReferencesAndCollections(EPiServer.Data.Dynamic.Providers.ProviderCallContext)
    EPiServer.Data.Dynamic.Providers.Internal.DbDataStoreProvider.LoadObject(EPiServer.Data.Dynamic.Providers.ProviderCallContext)
    EPiServer.Data.Dynamic.DynamicDataStore.InternalLoad(EPiServer.Data.Identity, System.Type, EPiServer.Data.Dynamic.Providers.LoadAsObjectType, EPiServer.Data.Dynamic.Providers.ProviderCallContext)
    ...
    [Call Stack Truncated]

Inner exception:
rgumentNullException: Value cannot be null. (Parameter 'key')
   at System.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
   at System.Collections.Generic.Dictionary`2.FindValue(TKey key)
   at System.Collections.Generic.Dictionary`2.ContainsKey(TKey key)
   at EPiServer.Data.Dynamic.Providers.Internal.DbDataStoreProvider.ProcessValueFromDb(Type targetType, Object value, String name, ProviderCallContext context, Type targetParentType)
   at EPiServer.Data.Dynamic.Providers.SqlServerDataStoreProvider.ProcessValueFromDb(Type targetType, Object value, String name, ProviderCallContext context, Type targetParentType)
   at EPiServer.Data.Dynamic.Providers.Internal.DbDataStoreProvider.LoadInlineProperties(ProviderCallContext ctx)
   at EPiServer.Data.Dynamic.Providers.Internal.DbDataStoreProvider.<>c__DisplayClass33_0.<Load>b__0()
   at EPiServer.Data.Providers.Internal.SqlDatabaseExecutor.<>c__DisplayClass24_0`1.<Execute>b__0()
   at EPiServer.Data.Providers.SqlTransientErrorsRetryPolicy.Execute[TResult](Func`1 method)
   at EPiServer.Data.Dynamic.DynamicDataStore.InternalLoad(Identity id, Type type, LoadAsObjectType loadAs, ProviderCallContext parentContext)
   at EPiServer.Data.Dynamic.Providers.Internal.DbDataStoreProvider.LoadSubObject(Identity id, Type type, String storeName, ProviderCallContext context)
   at EPiServer.Data.Dynamic.Providers.Internal.DbDataStoreProvider.LoadReferencesAndCollections(ProviderCallContext ctx)
   at EPiServer.Data.Dynamic.Providers.Internal.DbDataStoreProvider.LoadObject(ProviderCallContext context)
   at EPiServer.Data.Providers.Internal.SqlDatabaseExecutor.<>c__DisplayClass24_0`1.<Execute>b__0()
   at EPiServer.Data.Providers.SqlTransientErrorsRetryPolicy.Execute[TResult](Func`1 method)
   at EPiServer.Data.Dynamic.DynamicDataStore.InternalLoad(Identity id, Type type, LoadAsObjectType loadAs, ProviderCallContext parentContext)
   at EPiServer.Data.Dynamic.Providers.Internal.DbDataStoreProvider.LoadSubObject(Identity id, Type type, String storeName, ProviderCallContext context)
   at EPiServer.Data.Dynamic.Providers.Internal.DbDataStoreProvider.LoadReferenceMarkers(IList list, ProviderCallContext context)
   at EPiServer.Data.Dynamic.Providers.Internal.DbDataStoreProvider.LoadCollection(ProviderCallContext context, PropertyMap propertyMap)
   at EPiServer.Data.Dynamic.Providers.Internal.DbDataStoreProvider.LoadReferencesAndCollections(ProviderCallContext ctx)
   at EPiServer.Data.Dynamic.Providers.Internal.DbDataStoreProvider.LoadObject(ProviderCallContext context)
   at EPiServer.Data.Providers.Internal.SqlDatabaseExecutor.<>c__DisplayClass24_0`1.<Execute>b__0()
   at EPiServer.Data.Providers.SqlTransientErrorsRetryPolicy.Execute[TResult](Func`1 method)
   at EPiServer.Data.Dynamic.DynamicDataStore.InternalLoad(Identity id, Type type, LoadAsObjectType loadAs, ProviderCallContext parentContext)
   at EPiServer.Data.Dynamic.Internal.EPiServerDynamicDataStore.Load[TResult](Identity id)
   at EPiServer.Data.Dynamic.Internal.DynamicDataCollection`1.DynamicDataCollectionEnumerator.get_Current()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at EPiServer.Personalization.VisitorGroups.Internal.VisitorGroupStore.List()
   at EPiServer.Personalization.VisitorGroups.VisitorGroupInitialization.InitializeStoredVisitorGroups(IServiceProvider serviceProvider)

This is on production image with host and site definition changed to localhost.

If anyone knows what could happen please hint me.

For me this is exception is so vague that it could write "oopsi happened"

Last sucesfull command is:

info: EPiServer.Cms.AddOns.Blocks.InitializableModule[0]
      Initialize Optimizing Block

#296035
Edited, Feb 06, 2023 8:42
Eric Herlitz - Feb 07, 2023 8:16
What does the log say, or is that exception it? In that case you'll need to debug and backtrack from the callstack.
Vote:
 

At a guess, you have visitor groups setup on the database and the code for that does not exist in your local codebase. 

If its just locally you want to get this to work and not fussed about the visitor groups, than try the following  

  • Run Stored Procedure BigTableDeleteAll
  • Delete the Contents in : VW_VisitorGroup 

If you are inclided to find which Visitor group you might be missing you can look up in the View VW_VisitorGroup and map what you have setup in codebase. 

When we did hte upgrade from 11 to 12 at the time we found Episerver.Forms.Samples was not upgraded theirfor missing some visitor groups. 

Hope this helps 

#296064
Feb 06, 2023 21:41
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.