Upgrade to NopCommerce 4.40 from Version 4.30 - Error 500.30

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
2 years ago
Hello everybody,
I updated my nopcommerce from version 4.30 to 4.40 replaced the pgrade files as an indicator in the guide, but the application does not start, it gives me the following error
HTTP Error 500.30 - ASP.NET Core app failed to start
I have activated stdout messages and it gives me the following error

Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.
   at Nop.Web.Framework.Infrastructure.Extensions.ApplicationPartManagerExtensions.<>c.<InitializePlugins>b__14_3(PluginDescriptor pd)
   at System.Linq.Enumerable.SelectManySingleSelectorIterator`2.MoveNext()
   at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection)
   at Nop.Web.Framework.Infrastructure.Extensions.ApplicationPartManagerExtensions.InitializePlugins(ApplicationPartManager applicationPartManager, AppSettings appSettings)
   at Nop.Web.Framework.Infrastructure.Extensions.ServiceCollectionExtensions.ConfigureApplicationServices(IServiceCollection services, IConfiguration configuration, IWebHostEnvironment webHostEnvironment)
   at Nop.Web.Startup.ConfigureServices(IServiceCollection services)
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.InvokeCore(Object instance, IServiceCollection services)
   at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.<>c__DisplayClass9_0.<Invoke>g__Startup|0(IServiceCollection serviceCollection)
   at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.Invoke(Object instance, IServiceCollection services)
   at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.<>c__DisplayClass8_0.<Build>b__0(IServiceCollection services)
   at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.UseStartup(Type startupType, HostBuilderContext context, IServiceCollection services, Object instance)
   at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.<>c__DisplayClass13_0.<UseStartup>b__0(HostBuilderContext context, IServiceCollection services)
   at Microsoft.Extensions.Hosting.HostBuilder.CreateServiceProvider()
   at Microsoft.Extensions.Hosting.HostBuilder.Build()
   at Nop.Web.Program.Main(String[] args)
   at Nop.Web.Program.<Main>(String[] args)


configuration
iis 10,
win server 2012,
asp net 5.0.7 installed,
sql server 2017

can you help me to solve the problem?
thank you
2 years ago
Saw this error
life-solution wrote:

Nop.Web.Framework.Infrastructure.Extensions.ApplicationPartManagerExtensions.<>c.<InitializePlugins>b__14_3(PluginDescriptor pd)


Are you using non standard plugins from v4.3 ?
Have they been upgraded for v4.4 ?
If not, remove all non standard plugins - then does it start ?
2 years ago
I am also having probably the same error:
Application: w3wp.exe
CoreCLR Version: 5.0.321.7212
.NET Version: 5.0.3
Description: The process was terminated due to an unhandled exception.
Exception Info: System.NullReferenceException: Object reference not set to an instance of an object.
   at Nop.Web.Framework.Infrastructure.Extensions.ApplicationPartManagerExtensions.<>c.<InitializePlugins>b__14_3(PluginDescriptor pd) in C:\andrei\nop_sources\src\Presentation\Nop.Web.Framework\Infrastructure\Extensions\ApplicationPartManagerExtensions.cs:line 562
   at System.Linq.Enumerable.SelectManySingleSelectorIterator`2.MoveNext()
   at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection)
   at Nop.Web.Framework.Infrastructure.Extensions.ApplicationPartManagerExtensions.InitializePlugins(ApplicationPartManager applicationPartManager, AppSettings appSettings) in C:\andrei\nop_sources\src\Presentation\Nop.Web.Framework\Infrastructure\Extensions\ApplicationPartManagerExtensions.cs:line 362
   at Nop.Web.Framework.Infrastructure.Extensions.ServiceCollectionExtensions.ConfigureApplicationServices(IServiceCollection services, IConfiguration configuration, IWebHostEnvironment webHostEnvironment) in C:\andrei\nop_sources\src\Presentation\Nop.Web.Framework\Infrastructure\Extensions\ServiceCollectionExtensions.cs:line 72
   at Nop.Web.Startup.ConfigureServices(IServiceCollection services) in C:\andrei\nop_sources\src\Presentation\Nop.Web\Startup.cs:line 42
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.InvokeCore(Object instance, IServiceCollection services)
   at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.<>c__DisplayClass9_0.<Invoke>g__Startup|0(IServiceCollection serviceCollection)
   at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.Invoke(Object instance, IServiceCollection services)
   at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.<>c__DisplayClass8_0.<Build>b__0(IServiceCollection services)
   at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.UseStartup(Type startupType, HostBuilderContext context, IServiceCollection services, Object instance)
   at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.<>c__DisplayClass13_0.<UseStartup>b__0(HostBuilderContext context, IServiceCollection services)
   at Microsoft.Extensions.Hosting.HostBuilder.CreateServiceProvider()
   at Microsoft.Extensions.Hosting.HostBuilder.Build()
   at Nop.Web.Program.Main(String[] args) in C:\andrei\nop_sources\src\Presentation\Nop.Web\Program.cs:line 15
   at Nop.Web.Program.<Main>(String[] args)


I have no clue what to do. I have no prior plugins from 4.3 version. I did an upgrade all the way from version 1.9. I did it step by step, upgrading through all version (database upgrade), all went just fine. Now it just does not start. Even in debug mode (start with VS), it just gets stuck, no error, nothing in VS, just doesn't load.

I do have custom tables in database, if that is an issue? But it was not an issue in any of the eariler versions.

Any help would be much appreciated.
2 years ago
So to confirm
You have not copied in any non standard pluigns ?
The standard tables which have now been upgraded had not been manually modified in previous versions ?
You have not changed the v4.4 code ?

neolab wrote:
I do have custom tables in database, if that is an issue?

This should not be an issue but note the upgrade will not manage any custom tables if you intend to use them later - they will need integrated manually if you decide to add code to use them.

If you are using Visual Studio you should be able to debug and see where the error is occuring in the above routines that are causing the error
2 years ago
Yidna wrote:
So to confirm
You have not copied in any non standard pluigns ?

That is correct.
Yidna wrote:
The standard tables which have now been upgraded had not been manually modified in previous versions ?

Some were modified (added fields only)
Yidna wrote:

You have not changed the v4.4 code ?

That is correct.

Yidna wrote:

If you are using Visual Studio you should be able to debug and see where the error is occuring in the above routines that are causing the error

I sure thought so, but the thing is, no breakpoints are hit or anything else. The project builds, browser starts new tab and it seems like the project will start to load, but then the browser window stays white and the spinning wheel (for loading the website) disappers. Nothing happens in VS, just nothing. My first breakpoint is in ..\Presentation\Nop.Web\Program.cs line 15. It never gets there. No errors in logs, nothing. It doesn't even call a database yet, so no problem in DB either.
2 years ago
Any new ideas maybe? Anyone?
2 years ago
Have you tried running the fresh v4.4 version install to create a new database ?
Just to make sure everything runs
If that is all good then you can edit dataSettings.json to point to your upgraded database
Then see what happens
2 years ago
Hi Yidna!

thanks for your suggesstion, it worked. I mean, the store opened and everything looks OK. I just have no idea if there were any upgrades?

So, I did like you suggested. I pointed a clean install of application ver 4.4 to my database version 4.3. The app worked, it opened, my products are there, all looks good. But how can I tell if upgrade of databse to ver 4.4 actually happened?

Best regards,
Matic.
2 years ago
If you can see your products from v4.3 and you can order and process them, without error in v4.4 then the upgrade probably worked.

Also If the products in v4.3 required any special configuration (i.e rental, discount, product attributes) then test out that configuration is being applied in v4.4 and everything works as expected.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.