Error after upgrading database ?.

Vote:
 

Hello,

I have upgraded cms from 10.10.4 to 11.20.3. Also I upgraded data using updateDatabaseSchema="true" in web.config file.

Now I am getting below error. Please suggest.

[ArgumentNullException: Value cannot be null.
Parameter name: type]
   System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +12819127
   System.Activator.CreateInstance(Type type, Object[] args) +22
   EPiServer.Shell.Modules.ModuleFinder.GetModuleInDirectory(String routeBasePath, String moduleResourcePath, IEnumerable`1 configuredAssemblyNames, AutoDiscoveryLevel discoveryMode, String configuredName) +486
   EPiServer.Shell.Modules.<>c__DisplayClass14_0.<GetModulesInSubdirectories>b__0(VirtualDirectory moduleDirectory) +117
   System.Threading.Tasks.<>c__DisplayClass42_0`2.<PartitionerForEachWorker>b__1() +1324
   System.Threading.Tasks.Task.InnerInvoke() +74
   System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask) +18
   System.Threading.Tasks.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object <p0>) +209

[AggregateException: One or more errors occurred.]
   System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) +4246598
   System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) +12585061
   System.Threading.Tasks.Task.Wait() +16
   System.Threading.Tasks.Parallel.PartitionerForEachWorker(Partitioner`1 source, ParallelOptions parallelOptions, Action`1 simpleBody, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally) +980
   System.Threading.Tasks.Parallel.ForEachWorker(IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally) +374
   System.Threading.Tasks.Parallel.ForEach(IEnumerable`1 source, Action`1 body) +113
   EPiServer.Shell.Modules.ModuleFinder.GetModulesInSubdirectories(String rootPath, AutoDiscoveryLevel discoveryMode) +282
   EPiServer.Packaging.Utility.PackagingModuleProvider.GetModules() +168
   EPiServer.Shell.<>c.<GetConfiguredModules>b__16_0(IModuleProvider p) +10
   System.Linq.<SelectManyIterator>d__17`2.MoveNext() +328
   System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) +246
   System.Linq.Enumerable.ToList(IEnumerable`1 source) +61
   EPiServer.Shell.Modules.ShellModule.MergeDuplicateModules(IEnumerable`1 modules) +34
   EPiServer.Shell.ShellInitialization.GetConfiguredModules(IServiceLocator locator) +108
   EPiServer.Shell.ShellInitialization.Initialize(InitializationEngine context) +160
   EPiServer.Framework.Initialization.Internal.<>c__DisplayClass2_0.<Initialize>b__0() +19
   EPiServer.Framework.Initialization.Internal.ModuleNode.Execute(Action a, String key) +52
   EPiServer.Framework.Initialization.Internal.ModuleNode.Initialize(InitializationEngine context) +80
   EPiServer.Framework.Initialization.InitializationEngine.InitializeModules() +179

[InitializationException: Initialize action failed for Initialize on class EPiServer.Shell.ShellInitialization, EPiServer.Shell, Version=11.32.0.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7]
   EPiServer.Framework.Initialization.InitializationEngine.InitializeModules() +482
   EPiServer.Framework.Initialization.InitializationEngine.ExecuteTransition(Boolean continueTransitions) +153
   EPiServer.Framework.Initialization.InitializationEngine.Initialize() +40
   EPiServer.Framework.Initialization.<>c.<FrameworkInitialization>b__7_0(InitializationEngine e) +9
   EPiServer.Framework.Initialization.InitializationModule.EngineExecute(HostType hostType, Action`1 engineAction) +460
   EPiServer.Framework.Initialization.InitializationModule.FrameworkInitialization(HostType hostType) +170
   EPiServer.Global..ctor() +43
   EPiServer.Templates.Alloy.Global..ctor() +29
   ASP.global_asax..ctor() +38

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) +0
   System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +122
   System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +239
   System.Activator.CreateInstance(Type type, Boolean nonPublic) +85
   System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark) +1173
   System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +130
   System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture) +21
   System.Web.HttpRuntime.CreateNonPublicInstance(Type type, Object[] args) +63
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +153
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +314

[HttpException (0x80004005): Exception has been thrown by the target of an invocation.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +10085064
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +99
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +263

thanks
alexsunny
#255042
May 18, 2021 9:46
Vote:
 

From the stacktrace

   EPiServer.Shell.Modules.ModuleFinder.GetModuleInDirectory(String routeBasePath, String moduleResourcePath, IEnumerable`1 configuredAssemblyNames, AutoDiscoveryLevel discoveryMode, String configuredName) +486 

it looks like you have problem with modules/protected folder, probably missing/corrupt files.

#255045
Edited, May 18, 2021 10:54
Vote:
 

Hi Alex, increase your logging level, use info or debug. Info should be enough because then you would get the log message what the the module finder is trying to load (so you know what module causes the issue). So depending on how you have the solution logging currently setup in episerverlog.config file, if you have the default then comment out the 'threshold' inside the errorFileLogAppender or change its value to info or debug, then also change the 'root' elementslevel value to info or debug. Restart your IIS or IIS Express and re-run the app to see what module fails from the log messages.

Also as the orginal exception comes from the creation of the module but passed in argument is null, this simply could be an issue that after the upgrade your IIS is loading a cached version so delete everything from your apps bin directory and re-build and run - might just work. Also if that didn't help, you could delete the temporary asp.net files (default location C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files or C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files).

#259336
Jul 23, 2021 7:19
Vote:
 

Probably a missing .zip file in the modules/ folder after upgrade. Double check you have commited them all to Git after upgrade and merge etc. You can always install an empty alloy site of the same version and check what .zips you need to have there.

#259637
Jul 29, 2021 18:48
Vote:
 

What you can do is to reinstall all packages which would fix the corrupted or missing packages.

Note that the OP has reported that he fixed the problem, but that post contains spam links so I had to delete it. I kept this thread because it still has value for future visitors

#259675
Jul 30, 2021 7:23
Vote:
 

I'd suggest reviewing your Git Ignore file to ensure the modules/_protected folder is not ignored.

Otherwise you have to do a git force push which often gets missed on check in after an install. 

#259679
Edited, Jul 30, 2021 9:10
* 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.