DataBase automatic upgrade issue from 4.40.4 to 4.50.3

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
1 year ago
> 1. nopCommerce version
4.50.3 without source x64. MS SQL 2019
> 2. Expected behavior
Success upgrade from 4.40.4 on first run
> 3. Actual behavior
HTTP Error 500.30 - ASP.NET Core app failed to start
Error from Event Viewer below
> 4. Steps to reproduce the problem
Upgrade according instruction from 4.40.4 to 4.50.3
> 5. Any private modifications you made to your nopCommerce
No

NOTE: We are still running PoC with migration from ancient shopping cart solution to modern one (NopCommerce) and highly likely some of settings not yet set properly so far. Please advice, thank you!

Application '/LM/W3SVC/20/ROOT' with physical root 'F:\InetPub\Nop.XXXXX.AZ\wwwroot\' hit unexpected managed exception, exception code = '0xe0434352'. First 30KB characters of captured stdout and stderr logs:
info: FluentMigrator.Runner.MigrationRunner[1000]
      ExchangeEcbMigration migrating
info: FluentMigrator.Runner.Processors.SqlServer.SqlServer2016Processor[1004]
      Beginning Transaction
info: FluentMigrator.Runner.Processors.SqlServer.SqlServer2016Processor[1003]
      BEGIN TRANSACTION
info: FluentMigrator.Runner.Processors.SqlServer.SqlServer2016Processor[1004]
      Committing Transaction
info: FluentMigrator.Runner.Processors.SqlServer.SqlServer2016Processor[1003]
      COMMIT TRANSACTION
info: FluentMigrator.Runner.MigrationRunner[1004]
      ExchangeEcbMigration migrated
info: FluentMigrator.Runner.MigrationRunner[1002]
      => 0.0109805s
info: FluentMigrator.Runner.Processors.SqlServer.SqlServer2016Processor[1003]
      INSERT INTO [dbo].[MigrationVersionInfo] ([Version], [AppliedOn], [Description]) VALUES (637673472000000000, '2022-07-14T18:45:33', N'ExchangeRate.EcbExchange 1.30. Add setting for url for ECB')
info: FluentMigrator.Runner.MigrationRunner[1000]
      ChangeDecimalPrecision migrating
info: FluentMigrator.Runner.Processors.SqlServer.SqlServer2016Processor[1004]
      Beginning Transaction
info: FluentMigrator.Runner.Processors.SqlServer.SqlServer2016Processor[1003]
      BEGIN TRANSACTION
info: FluentMigrator.Runner.MigrationRunner[1004]
      AlterTable ShippingByWeightByTotalRecord
info: FluentMigrator.Runner.Processors.SqlServer.SqlServer2016Processor[1003]
info: FluentMigrator.Runner.MigrationRunner[1002]
      => 0.0003145s
info: FluentMigrator.Runner.MigrationRunner[1004]
      AlterColumn ShippingByWeightByTotalRecord WeightFrom Decimal
info: FluentMigrator.Runner.Processors.SqlServer.SqlServer2016Processor[1003]
      ALTER TABLE [dbo].[ShippingByWeightByTotalRecord] ALTER COLUMN [WeightFrom] DECIMAL(18,4) NOT NULL
info: FluentMigrator.Runner.MigrationRunner[1002]
      => 0.0052343s
info: FluentMigrator.Runner.MigrationRunner[1004]
      AlterTable ShippingByWeightByTotalRecord
info: FluentMigrator.Runner.Processors.SqlServer.SqlServer2016Processor[1003]
info: FluentMigrator.Runner.MigrationRunner[1002]
      => 4.28E-05s
info: FluentMigrator.Runner.MigrationRunner[1004]
      AlterColumn ShippingByWeightByTotalRecord WeightTo Decimal
info: FluentMigrator.Runner.Processors.SqlServer.SqlServer2016Processor[1003]
      ALTER TABLE [dbo].[ShippingByWeightByTotalRecord] ALTER COLUMN [WeightTo] DECIMAL(18,4) NOT NULL
info: FluentMigrator.Runner.MigrationRunner[1002]
      => 0.0016849s
info: FluentMigrator.Runner.MigrationRunner[1004]
      AlterTable ShippingByWeightByTotalRecord
info: FluentMigrator.Runner.Processors.SqlServer.SqlServer2016Processor[1003]
info: FluentMigrator.Runner.MigrationRunner[1002]
      => 2.1E-06s
info: FluentMigrator.Runner.MigrationRunner[1004]
      AlterColumn ShippingByWeightByTotalRecord OrderSubtotalFrom Decimal
info: FluentMigrator.Runner.Processors.SqlServer.SqlServer2016Processor[1003]
      ALTER TABLE [dbo].[ShippingByWeightByTotalRecord] ALTER COLUMN [OrderSubtotalFrom] DECIMAL(18,4) NOT NULL
info: FluentMigrator.Runner.MigrationRunner[1002]
      => 0.0012894s
info: FluentMigrator.Runner.MigrationRunner[1004]
      AlterTable ShippingByWeightByTotalRecord
info: FluentMigrator.Runner.Processors.SqlServer.SqlServer2016Processor[1003]
info: FluentMigrator.Runner.MigrationRunner[1002]
      => 1.6E-06s
info: FluentMigrator.Runner.MigrationRunner[1004]
      AlterColumn ShippingByWeightByTotalRecord OrderSubtotalTo Decimal
info: FluentMigrator.Runner.Processors.SqlServer.SqlServer2016Processor[1003]
      ALTER TABLE [dbo].[ShippingByWeightByTotalRecord] ALTER COLUMN [OrderSubtotalTo] DECIMAL(18,4) NOT NULL
info: FluentMigrator.Runner.MigrationRunner[1002]
      => 0.0011572s
info: FluentMigrator.Runner.MigrationRunner[1004]
      AlterTable ShippingByWeightByTotalRecord
info: FluentMigrator.Runner.Processors.SqlServer.SqlServer2016Processor[1003]
info: FluentMigrator.Runner.MigrationRunner[1002]
      => 1.4E-06s
info: FluentMigrator.Runner.MigrationRunner[1004]
      AlterColumn ShippingByWeightByTotalRecord AdditionalFixedCost Decimal
info: FluentMigrator.Runner.Processors.SqlServer.SqlServer2016Processor[1003]
      ALTER TABLE [dbo].[ShippingByWeightByTotalRecord] ALTER COLUMN [AdditionalFixedCost] DECIMAL(18,4) NOT NULL
info: FluentMigrator.Runner.MigrationRunner[1002]
      => 0.0011291s
info: FluentMigrator.Runner.MigrationRunner[1004]
      AlterTable ShippingByWeightByTotalRecord
info: FluentMigrator.Runner.Processors.SqlServer.SqlServer2016Processor[1003]
info: FluentMigrator.Runner.MigrationRunner[1002]
      => 2E-06s
info: FluentMigrator.Runner.MigrationRunner[1004]
      AlterColumn ShippingByWeightByTotalRecord PercentageRateOfSubtotal Decimal
info: FluentMigrator.Runner.Processors.SqlServer.SqlServer2016Processor[1003]
      ALTER TABLE [dbo].[ShippingByWeightByTotalRecord] ALTER COLUMN [PercentageRateOfSubtotal] DECIMAL(18,4) NOT NULL
info: FluentMigrator.Runner.MigrationRunner[1002]
      => 0.001201s
info: FluentMigrator.Runner.MigrationRunner[1004]
      AlterTable ShippingByWeightByTotalRecord
info: FluentMigrator.Runner.Processors.SqlServer.SqlServer2016Processor[1003]
info: FluentMigrator.Runner.MigrationRunner[1002]
      => 1.6E-06s
info: FluentMigrator.Runner.MigrationRunner[1004]
      AlterColumn ShippingByWeightByTotalRecord RatePerWeightUnit Decimal
info: FluentMigrator.Runner.Processors.SqlServer.SqlServer2016Processor[1003]
      ALTER TABLE [dbo].[ShippingByWeightByTotalRecord] ALTER COLUMN [RatePerWeightUnit] DECIMAL(18,4) NOT NULL
info: FluentMigrator.Runner.MigrationRunner[1002]
      => 0.0012345s
info: FluentMigrator.Runner.MigrationRunner[1004]
      AlterTable ShippingByWeightByTotalRecord
info: FluentMigrator.Runner.Processors.SqlServer.SqlServer2016Processor[1003]
info: FluentMigrator.Runner.MigrationRunner[1002]
      => 5.3E-06s
info: FluentMigrator.Runner.MigrationRunner[1004]
      AlterColumn ShippingByWeightByTotalRecord LowerWeightLimit Decimal
info: FluentMigrator.Runner.Processors.SqlServer.SqlServer2016Processor[1003]
      ALTER TABLE [dbo].[ShippingByWeightByTotalRecord] ALTER COLUMN [LowerWeightLimit] DECIMAL(18,4) NOT NULL
info: FluentMigrator.Runner.MigrationRunner[1002]
      => 0.0011855s
info: FluentMigrator.Runner.Processors.SqlServer.SqlServer2016Processor[1004]
      Committing Transaction
info: FluentMigrator.Runner.Processors.SqlServer.SqlServer2016Processor[1003]
      COMMIT TRANSACTION
info: FluentMigrator.Runner.MigrationRunner[1004]
      ChangeDecimalPrecision migrated
info: FluentMigrator.Runner.MigrationRunner[1002]
      => 0.0016371s
info: FluentMigrator.Runner.Processors.SqlServer.SqlServer2016Processor[1003]
      INSERT INTO [dbo].[MigrationVersionInfo] ([Version], [AppliedOn], [Description]) VALUES (637711020000000000, '2022-07-14T18:45:33', N'Shipping.FixedByWeightByTotal change decimal precision')
info: FluentMigrator.Runner.MigrationRunner[1000]
      CertificatesMigration migrating
info: FluentMigrator.Runner.Processors.SqlServer.SqlServer2016Processor[1004]
      Beginning Transaction
info: FluentMigrator.Runner.Processors.SqlServer.SqlServer2016Processor[1003]
      BEGIN TRANSACTION
info: FluentMigrator.Runner.Processors.SqlServer.SqlServer2016Processor[1004]
      Rolling back transaction
info: FluentMigrator.Runner.Processors.SqlServer.SqlServer2016Processor[1003]
      ROLLBACK TRANSACTION
Unhandled exception. System.AggregateException: One or more errors occurred. (One or more errors occurred. (The value '0' is not a valid value for the enum 'TaxOriginAddressType'.))
---> System.AggregateException: One or more errors occurred. (The value '0' is not a valid value for the enum 'TaxOriginAddressType'.)
---> System.ArgumentException: The value '0' is not a valid value for the enum 'TaxOriginAddressType'.
   at System.ComponentModel.EnumConverter.ConvertTo(ITypeDescriptorContext context, CultureInfo culture, Object value, Type destinationType)
   at System.ComponentModel.TypeConverter.ConvertToString(ITypeDescriptorContext context, CultureInfo culture, Object value)
   at System.ComponentModel.TypeConverter.ConvertToInvariantString(Object value)
   at Nop.Services.Configuration.SettingService.SetSettingAsync(Type type, String key, Object value, Int32 storeId, Boolean clearCache)
   at Nop.Services.Configuration.SettingService.SaveSettingAsync[T](T settings, Int32 storeId)
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at System.Threading.Tasks.Task.Wait()
   at Nop.Plugin.Tax.Avalara.Data.CertificatesMigration.Up()
   at FluentMigrator.MigrationBase.GetUpExpressions(IMigrationContext context)
   at FluentMigrator.Runner.MigrationRunner.<>c.<ApplyMigrationUp>b__69_0(IMigration m, IMigrationContext c)
   at FluentMigrator.Runner.MigrationRunner.ExecuteMigration(IMigration migration, Action`2 getExpressions)
   at FluentMigrator.Runner.MigrationRunner.ApplyMigrationUp(IMigrationInfo migrationInfo, Boolean useTransaction)
   at FluentMigrator.Runner.MigrationRunner.Up(IMigration migration)
   at Nop.Data.Migrations.MigrationManager.ApplyUpMigrations(Assembly assembly, MigrationProcessType migrationProcessType)
   at Nop.Services.Plugins.PluginService.InsertPluginData(Type pluginType, MigrationProcessType migrationProcessType)
   at Nop.Services.Plugins.PluginService.UpdatePluginsAsync()
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at System.Threading.Tasks.Task.Wait()
   at Nop.Web.Framework.Infrastructure.Extensions.ApplicationBuilderExtensions.StartEngine(IApplicationBuilder application)
   at Program.<Main>$(String[] args)
1 year ago
1CLICK.LV wrote:

      ROLLBACK TRANSACTION
Unhandled exception. System.AggregateException: One or more errors occurred. (One or more errors occurred. (The value '0' is not a valid value for the enum 'TaxOriginAddressType'.))
---> System.AggregateException: One or more errors occurred. (The value '0' is not a valid value for the enum 'TaxOriginAddressType'.)
---> System.ArgumentException: The value '0' is not a valid value for the enum 'TaxOriginAddressType'.

You need to fix the data value in the table

    public enum TaxOriginAddressType
    {
        /// <summary>
        /// Tax origin based on the shipping origin address
        /// </summary>
        ShippingOrigin = 1,

        /// <summary>
        /// Tax origin based on the default tax address
        /// </summary>
        DefaultTaxAddress = 2
    }
1 year ago
Table name?

We are not using Avalara
1 year ago
Look at this and this topic. This weird error has already occurred before. But we can't reproduce it, so it's unclear what the problem might be.
1 year ago
1CLICK.LV wrote:
...We are not using Avalara

Doesn't mater if 'used' or Installed.  The assembly is still in the \Plugins folder.
Delete this folder
\Plugins\Tax.Avalara

Also, edit
\App_Data\plugins.json
and remove - eg.
    {
      "SystemName": "Tax.Avalara",
      "Version": "2.62"
    },
1 year ago
New York wrote:

Delete this folder
\Plugins\Tax.Avalara

Also, edit
\App_Data\plugins.json
and remove - eg.
    {
      "SystemName": "Tax.Avalara",
      "Version": "2.62"
    },


Done. System 4.50.3 is running well now. Thanks!

--

RomanovM wrote:
RomanovM

btw,

\wwwroot\Plugins\Payments.PayPalCommerce\Nop.Web.runtimeconfig.dev.json
\wwwroot\Plugins\Shipping.ShipStation\Nop.Web.runtimeconfig.dev.json
\wwwroot\Plugins\Tax.Avalara\Nop.Web.runtimeconfig.dev.json
\wwwroot\Plugins\Widgets.FacebookPixel\Nop.Web.runtimeconfig.dev.json

-- possible candidates for remove from release?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.