Upgrade from 4.30 to 4.40.3

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
2 years ago
Good day everyone,

I was upgrading nopCommerce to 4.40.3 following https://docs.nopcommerce.com/en/installation-and-upgrading/upgrading-nopcommerce.html instructions.
I downloaded the code, and unzipped on top of the directory, rewriting everything, while keeping safe the json files from AppData/ directory.

When I started the service on the Linux server it throws a coredump with the following exception,

Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'SixLabors.ImageSharp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d998eea7b14cab13, processorArchitecture=MSIL'. The system cannot find the file specified.

File name: 'SixLabors.ImageSharp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d998eea7b14cab13, processorArchitecture=MSIL'
   at System.Reflection.RuntimeAssembly.InternalLoad(ObjectHandleOnStack assemblyName, ObjectHandleOnStack requestingAssembly, StackCrawlMarkHandle stackMark, Boolean throwOnFileNotFound, ObjectHandleOnStack assemblyLoadContext, ObjectHandleOnStack retAssembly)
   at System.Reflection.RuntimeAssembly.InternalLoad(AssemblyName assemblyName, RuntimeAssembly requestingAssembly, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, AssemblyLoadContext assemblyLoadContext)
   at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
   at System.AppDomain.Load(AssemblyName assemblyRef)
   at Nop.Core.Infrastructure.AppDomainTypeFinder.LoadMatchingAssemblies(String directoryPath)
   at Nop.Core.Infrastructure.WebAppTypeFinder.GetAssemblies()
   at Nop.Core.Infrastructure.NopEngine.ConfigureServices(IServiceCollection services, IConfiguration configuration)
   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)
Aborted (core dumped)

Where is this file SixLabors.ImageSharp supposed to be?
2 years ago
https://github.com/SixLabors/ImageSharp

jmonreal wrote:
I was upgrading nopCommerce to 4.40.3 following https://docs.nopcommerce.com/en/installation-and-upgrading/upgrading-nopcommerce.html instructions.
I downloaded the code, and unzipped on top of the directory, rewriting everything, while keeping safe the json files from AppData/ directory.

What was the original version ? Normally this is not the way you would upgrade as it will cause all sorts of errors :(

You are best to start a new directory that only contains a fresh version of 4.40.3 then run the install to make sure everything works as expected

Then separately upgrade the database (take a backup first) and then you can edit the dataSettings.json created in the install to point to your new database
2 years ago
Thank you for your reply. I did as you mentioned later, and when I change the json files, the server will not start, it complains about the plugins json file, seems like there is a problem there.


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)
Main process exited, code=dumped, status=6/ABRT
Failed with result 'core-dump'.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.