Application broken after install plugin Nop.Plugin.Shipping.FixedByWeightByTotal

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
2 года назад
Hi,
I've downloaded the "with source code" version of nopCommerce 4.40.4 and then opened the solution in Visual Studio for deploying it to an Azure App Service.
The site installed successfully then I've installed the plugin Nop.Plugin.Shipping.FixedByWeightByTotal from the admin dashboard.
After the application restarts it gets an error on startup, following there is the startup logs

2022-01-13T14:52:28.899048208Z  ---> System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types.
2022-01-13T14:52:28.899052408Z Method '<Clone>$' in type 'Nop.Plugin.Shipping.FixedByWeightByTotal.Models.ConfigurationModel' from assembly 'Nop.Plugin.Shipping.FixedByWeightByTotal, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.
2022-01-13T14:52:28.899057808Z Method '<Clone>$' in type 'Nop.Plugin.Shipping.FixedByWeightByTotal.Models.FixedRateListModel' from assembly 'Nop.Plugin.Shipping.FixedByWeightByTotal, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.
2022-01-13T14:52:28.899062508Z Method '<Clone>$' in type 'Nop.Plugin.Shipping.FixedByWeightByTotal.Models.ShippingByWeightByTotalListModel' from assembly 'Nop.Plugin.Shipping.FixedByWeightByTotal, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.
2022-01-13T14:52:28.899067608Z Return type in method 'Nop.Plugin.Shipping.FixedByWeightByTotal.Models.ShippingByWeightByTotalModel.<Clone>$()' on type 'Nop.Plugin.Shipping.FixedByWeightByTotal.Models.ShippingByWeightByTotalModel' from assembly 'Nop.Plugin.Shipping.FixedByWeightByTotal, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' is not compatible with base type method 'Nop.Web.Framework.Models.BaseNopEntityModel.<Clone>$()'.
2022-01-13T14:52:28.899076808Z Method '<Clone>$' in type 'Nop.Plugin.Shipping.FixedByWeightByTotal.Models.FixedRateListModel' from assembly 'Nop.Plugin.Shipping.FixedByWeightByTotal, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.
2022-01-13T14:52:28.899082108Z Method '<Clone>$' in type 'Nop.Plugin.Shipping.FixedByWeightByTotal.Models.ShippingByWeightByTotalListModel' from assembly 'Nop.Plugin.Shipping.FixedByWeightByTotal, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.
2022-01-13T14:52:28.899087708Z Return type in method 'Nop.Plugin.Shipping.FixedByWeightByTotal.Models.ShippingByWeightByTotalModel.<Clone>$()' on type 'Nop.Plugin.Shipping.FixedByWeightByTotal.Models.ShippingByWeightByTotalModel' from assembly 'Nop.Plugin.Shipping.FixedByWeightByTotal, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' is not compatible with base type method 'Nop.Web.Framework.Models.BaseNopEntityModel.<Clone>$()'.
2022-01-13T14:52:28.899093208Z    at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
2022-01-13T14:52:28.899097508Z    at System.Reflection.RuntimeModule.GetTypes()
2022-01-13T14:52:28.899101608Z    at System.Reflection.Assembly.GetTypes()
2022-01-13T14:52:28.899105608Z    at Nop.Web.Framework.Infrastructure.Extensions.ApplicationPartManagerExtensions.InitializePlugins(ApplicationPartManager applicationPartManager, AppSettings appSettings) in C:\Users\Downloads\nopCommerce_4.40.4_Source\Presentation\Nop.Web.Framework\Infrastructure\Extensions\ApplicationPartManagerExtensions.cs:line 515
2022-01-13T14:52:28.899111308Z System.TypeLoadException: Method '<Clone>$' in type 'Nop.Plugin.Shipping.FixedByWeightByTotal.Models.ConfigurationModel' from assembly 'Nop.Plugin.Shipping.FixedByWeightByTotal, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.
2022-01-13T14:52:28.899116208Z System.TypeLoadException: Method '<Clone>$' in type 'Nop.Plugin.Shipping.FixedByWeightByTotal.Models.FixedRateListModel' from assembly 'Nop.Plugin.Shipping.FixedByWeightByTotal, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.
2022-01-13T14:52:28.899121308Z System.TypeLoadException: Method '<Clone>$' in type 'Nop.Plugin.Shipping.FixedByWeightByTotal.Models.ShippingByWeightByTotalListModel' from assembly 'Nop.Plugin.Shipping.FixedByWeightByTotal, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.
2022-01-13T14:52:28.899127808Z System.TypeLoadException: Return type in method 'Nop.Plugin.Shipping.FixedByWeightByTotal.Models.ShippingByWeightByTotalModel.<Clone>$()' on type 'Nop.Plugin.Shipping.FixedByWeightByTotal.Models.ShippingByWeightByTotalModel' from assembly 'Nop.Plugin.Shipping.FixedByWeightByTotal, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' is not compatible with base type method 'Nop.Web.Framework.Models.BaseNopEntityModel.<Clone>$()'.
2022-01-13T14:52:28.899133908Z System.TypeLoadException: Method '<Clone>$' in type 'Nop.Plugin.Shipping.FixedByWeightByTotal.Models.FixedRateListModel' from assembly 'Nop.Plugin.Shipping.FixedByWeightByTotal, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.
2022-01-13T14:52:28.899142408Z System.TypeLoadException: Method '<Clone>$' in type 'Nop.Plugin.Shipping.FixedByWeightByTotal.Models.ShippingByWeightByTotalListModel' from assembly 'Nop.Plugin.Shipping.FixedByWeightByTotal, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.
2022-01-13T14:52:28.899147408Z System.TypeLoadException: Return type in method 'Nop.Plugin.Shipping.FixedByWeightByTotal.Models.ShippingByWeightByTotalModel.<Clone>$()' on type 'Nop.Plugin.Shipping.FixedByWeightByTotal.Models.ShippingByWeightByTotalModel' from assembly 'Nop.Plugin.Shipping.FixedByWeightByTotal, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' is not compatible with base type method 'Nop.Web.Framework.Models.BaseNopEntityModel.<Clone>$()'.
2022-01-13T14:52:28.899152808Z    --- End of inner exception stack trace ---
2022-01-13T14:52:28.899156908Z    at Nop.Web.Framework.Infrastructure.Extensions.ApplicationPartManagerExtensions.InitializePlugins(ApplicationPartManager applicationPartManager, AppSettings appSettings) in C:\Users\Downloads\nopCommerce_4.40.4_Source\Presentation\Nop.Web.Framework\Infrastructure\Extensions\ApplicationPartManagerExtensions.cs:line 534
2022-01-13T14:52:28.899162209Z    --- End of inner exception stack trace ---
2022-01-13T14:52:28.899166309Z    at Nop.Web.Framework.Infrastructure.Extensions.ApplicationPartManagerExtensions.InitializePlugins(ApplicationPartManager applicationPartManager, AppSettings appSettings) in C:\Users\Downloads\nopCommerce_4.40.4_Source\Presentation\Nop.Web.Framework\Infrastructure\Extensions\ApplicationPartManagerExtensions.cs:line 550
2022-01-13T14:52:28.899172509Z    at Nop.Web.Framework.Infrastructure.Extensions.ServiceCollectionExtensions.ConfigureApplicationServices(IServiceCollection services, IConfiguration configuration, IWebHostEnvironment webHostEnvironment) in C:\Users\Downloads\nopCommerce_4.40.4_Source\Presentation\Nop.Web.Framework\Infrastructure\Extensions\ServiceCollectionExtensions.cs:line 72
2022-01-13T14:52:28.899177709Z    at Nop.Web.Startup.ConfigureServices(IServiceCollection services) in C:\Users\Downloads\nopCommerce_4.40.4_Source\Presentation\Nop.Web\Startup.cs:line 37
2022-01-13T14:52:28.899183309Z    at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
2022-01-13T14:52:28.899187409Z    at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
2022-01-13T14:52:28.899191909Z    at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.InvokeCore(Object instance, IServiceCollection services)
2022-01-13T14:52:28.899196109Z    at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.<>c__DisplayClass9_0.<Invoke>g__Startup|0(IServiceCollection serviceCollection)
2022-01-13T14:52:28.899200709Z    at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.Invoke(Object instance, IServiceCollection services)
2022-01-13T14:52:28.899205909Z    at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.<>c__DisplayClass8_0.<Build>b__0(IServiceCollection services)
2022-01-13T14:52:28.899211109Z    at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.UseStartup(Type startupType, HostBuilderContext context, IServiceCollection services, Object instance)
2022-01-13T14:52:28.899220009Z    at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.<>c__DisplayClass13_0.<UseStartup>b__0(HostBuilderContext context, IServiceCollection services)
2022-01-13T14:52:28.899224809Z    at Microsoft.Extensions.Hosting.HostBuilder.CreateServiceProvider()
2022-01-13T14:52:28.899229509Z    at Microsoft.Extensions.Hosting.HostBuilder.Build()
2022-01-13T14:52:28.899234209Z    at Nop.Web.Program.Main(String[] args) in C:\Users\Downloads\nopCommerce_4.40.4_Source\Presentation\Nop.Web\Program.cs:line 16
2022-01-13T14:52:28.899239409Z    at Nop.Web.Program.<Main>(String[] args)
2022-01-13T14:52:34.925711739Z Could not open output /home/logs/dumps/coredump.0161e3e6f3dd.49.1642085545: 2 No such file or directory
2022-01-13T14:52:34.926114641Z Gathering state for process 49 dotnet
2022-01-13T14:52:34.926132341Z Writing minidump with heap to file /home/logs/dumps/coredump.0161e3e6f3dd.49.1642085545
2022-01-13T14:52:35.084022567Z /opt/startup/startup.sh: line 10:    49 Aborted                 (core dumped) dotnet Nop.Web.dll

If I remove the plugin from the "PluginNamesToInstall" array in plugins.json file, the application starts again successfully.
2 года назад
Build your nopCommerce project v4.40.X using VS2019 not VS2022
More discussion
https://github.com/nopSolutions/nopCommerce/issues/5981
and
https://www.nopcommerce.com/en/boards/topic/92619/error-method-clone-in-type-on-start-when-loading-some-plugins/page/2
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.