Hi team,
I am in the process of upgrading our Umbraco instance from version 14.3.1 to the latest stable release 16.2.0. The upgrade has been completed successfully in our Dev and Test environments.
However, while performing the upgrade on the Production environment, I encountered the following error:
[15:56:07 DBG] Getting Umbraco.Cms.Core.Composing.IDiscoverable: scanning assemblies.
[15:56:09 DBG] Got Umbraco.Cms.Core.Composing.IDiscoverable, caching (true).
[15:56:09 DBG] Getting Umbraco.Cms.Core.PropertyEditors.IPropertyValueConverter: filtering IDiscoverable.
[15:56:09 DBG] Got Umbraco.Cms.Core.PropertyEditors.IPropertyValueConverter, caching (true).
[15:56:09 DBG] Getting Umbraco.Cms.Core.Composing.IDiscoverable: found a cached type list.
[15:56:09 DBG] Getting Umbraco.Cms.Core.Packaging.PackageMigrationPlan: filtering IDiscoverable.
[15:56:09 DBG] Got Umbraco.Cms.Core.Packaging.PackageMigrationPlan, caching (true).
[15:56:09 DBG] Getting Umbraco.Cms.Core.Composing.IDiscoverable: found a cached type list.
[15:56:09 DBG] Getting Umbraco.Cms.Web.Common.Controllers.UmbracoApiController: filtering IDiscoverable.
[15:56:09 DBG] Got Umbraco.Cms.Web.Common.Controllers.UmbracoApiController, caching (true).
[15:56:10 DBG] Getting Umbraco.Cms.Core.Composing.IDiscoverable: found a cached type list.
[15:56:10 DBG] Getting Umbraco.Cms.Web.Website.Controllers.SurfaceController: filtering IDiscoverable.
[15:56:10 DBG] Got Umbraco.Cms.Web.Website.Controllers.SurfaceController, caching (true).
[15:56:10 DBG] Getting Umbraco.Cms.Core.Composing.IDiscoverable: found a cached type list.
[15:56:10 DBG] Getting Umbraco.Cms.Core.Composing.IComposer: filtering IDiscoverable.
[15:56:10 DBG] Got Umbraco.Cms.Core.Composing.IComposer, caching (true).
[15:56:10 DBG] Ordered Composers: [“Umbraco.Cms.Persistence.SqlServer.SqlServerComposer”, “Umbraco.Cms.Persistence.Sqlite.SqliteComposer”, “Umbraco.Cms.Persistence.EFCore.SqlServer.EFCoreSqlServerComposer”, “Umbraco.Cms.Persistence.EFCore.Sqlite.EFCoreSqliteComposer”, “Umbraco.Cms.Persistence.EFCore.Composition.UmbracoEFCoreComposer”, “Umbraco.Cms.Imaging.ImageSharp.ImageSharpComposer”, “Umbraco.Cms.Api.Management.ManagementApiComposer”, “Umbraco.Cms.Infrastructure.Examine.AddExamineComposer”, “Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_15_0_0.LocalLinks.ConvertLocalLinkComposer”, “FSHP.Umbraco.Auth.AzureB2CBackOfficeExternalLoginComposer”]
[15:56:10 DBG] Getting Umbraco.Cms.Core.Composing.IDiscoverable: found a cached type list.
[15:56:10 DBG] Getting Umbraco.Cms.Core.Cache.ICacheRefresher: filtering IDiscoverable.
[15:56:10 DBG] Got Umbraco.Cms.Core.Cache.ICacheRefresher, caching (true).
[15:56:10 DBG] Getting Umbraco.Cms.Core.Composing.IDiscoverable: found a cached type list.
[15:56:10 DBG] Getting Umbraco.Cms.Core.PropertyEditors.IDataEditor: filtering IDiscoverable.
[15:56:10 DBG] Got Umbraco.Cms.Core.PropertyEditors.IDataEditor, caching (true).
[15:56:10 DBG] Getting Umbraco.Cms.Core.Composing.IDiscoverable: found a cached type list.
[15:56:10 DBG] Getting Umbraco.Cms.Core.Actions.IAction: filtering IDiscoverable.
[15:56:10 DBG] Got Umbraco.Cms.Core.Actions.IAction, caching (true).
[15:56:10 DBG] Getting Umbraco.Cms.Core.Composing.IDiscoverable: found a cached type list.
[15:56:10 DBG] Getting Umbraco.Cms.Core.Editors.IEditorValidator: filtering IDiscoverable.
[15:56:10 DBG] Got Umbraco.Cms.Core.Editors.IEditorValidator, caching (true).
[15:56:10 DBG] Getting Umbraco.Cms.Core.Composing.IDiscoverable: found a cached type list.
[15:56:10 DBG] Getting Umbraco.Cms.Core.HealthChecks.HealthCheck: filtering IDiscoverable.
[15:56:10 DBG] Got Umbraco.Cms.Core.HealthChecks.HealthCheck, caching (true).
[15:56:10 DBG] Getting Umbraco.Cms.Core.Composing.IDiscoverable: found a cached type list.
[15:56:10 DBG] Getting Umbraco.Cms.Core.HealthChecks.NotificationMethods.IHealthCheckNotificationMethod: filtering IDiscoverable.
[15:56:10 DBG] Got Umbraco.Cms.Core.HealthChecks.NotificationMethods.IHealthCheckNotificationMethod, caching (true).
[15:56:10 DBG] Getting Umbraco.Cms.Core.Composing.IDiscoverable: found a cached type list.
[15:56:10 DBG] Getting Umbraco.Cms.Core.DeliveryApi.ISelectorHandler: filtering IDiscoverable.
[15:56:10 DBG] Got Umbraco.Cms.Core.DeliveryApi.ISelectorHandler, caching (true).
[15:56:10 DBG] Getting Umbraco.Cms.Core.Composing.IDiscoverable: found a cached type list.
[15:56:10 DBG] Getting Umbraco.Cms.Core.DeliveryApi.IFilterHandler: filtering IDiscoverable.
[15:56:10 DBG] Got Umbraco.Cms.Core.DeliveryApi.IFilterHandler, caching (true).
[15:56:10 DBG] Getting Umbraco.Cms.Core.Composing.IDiscoverable: found a cached type list.
[15:56:10 DBG] Getting Umbraco.Cms.Core.DeliveryApi.ISortHandler: filtering IDiscoverable.
[15:56:10 DBG] Got Umbraco.Cms.Core.DeliveryApi.ISortHandler, caching (true).
[15:56:10 DBG] Getting Umbraco.Cms.Core.Composing.IDiscoverable: found a cached type list.
[15:56:10 DBG] Getting Umbraco.Cms.Core.DeliveryApi.IContentIndexHandler: filtering IDiscoverable.
[15:56:10 DBG] Got Umbraco.Cms.Core.DeliveryApi.IContentIndexHandler, caching (true).
[15:56:10 DBG] Acquiring MainDom. [Timing c08a9cd]
[15:56:10 INF] Acquiring MainDom.
[15:56:10 DBG] Attempting to obtain MainDom lock file handle D:\LAWA\2464\Umbraco-Prj\FSHP.Umbraco\umbraco\Data\TEMP\MainDom_db9b3a46d80e86c313e98c8425b7cf3456725d0a.lock
[15:56:10 INF] Acquired MainDom.
[15:56:10 DBG] Acquired. (19ms) [Timing c08a9cd]
[15:56:10 DBG] Running a full, cached, scan for non-discoverable type Umbraco.Cms.Api.Management.Controllers.ManagementApiControllerBase (slow).
[15:56:10 DBG] Getting Umbraco.Cms.Api.Management.Controllers.ManagementApiControllerBase: scanning assemblies.
[15:56:10 DBG] Got Umbraco.Cms.Api.Management.Controllers.ManagementApiControllerBase, caching (true).
[15:56:11 DBG] Initializing.
[15:56:11 DBG] SqlServer Other, DatabaseType is NPoco.DatabaseTypes.SqlServer2012DatabaseType (detected).
[15:56:11 DBG] Initialized.
[15:56:12 DBG] Final upgrade state is {BE11D4D3-3A1F-4598-90D4-B548BD188C48}, database contains {1A8835EF-F8AB-4472-B4D8-D75B7C164022}
[15:56:12 DBG] Has not reached the final upgrade step, need to upgrade Umbraco.
[15:56:12 DBG] Determining runtime level. [Timing be7989a]
[15:56:12 DBG] Running a full, cached, scan for non-discoverable type Umbraco.Cms.Api.Management.Controllers.ManagementApiControllerBase (slow).
[15:56:12 DBG] Getting Umbraco.Cms.Api.Management.Controllers.ManagementApiControllerBase: found a cached type list.
[15:56:12 DBG] Final upgrade state is {BE11D4D3-3A1F-4598-90D4-B548BD188C48}, database contains {1A8835EF-F8AB-4472-B4D8-D75B7C164022}
[15:56:12 DBG] Has not reached the final upgrade step, need to upgrade Umbraco.
[15:56:12 DBG] Runtime level: Run - UpgradeMigrations
[15:56:12 DBG] Determined. (114ms) [Timing be7989a]
[15:56:12 DBG] Requesting ReadLock for id -333
[15:56:12 DBG] Acquired ReadLock for id -333
[15:56:12 DBG] Dropped ReadLock for id -333
[15:56:12 DBG] Requesting ReadLock for id -333
[15:56:12 DBG] Acquired ReadLock for id -333
[15:56:12 DBG] Dropped ReadLock for id -333
[15:56:12 DBG] Requesting ReadLock for id -334
[15:56:12 DBG] Acquired ReadLock for id -334
[15:56:12 DBG] Dropped ReadLock for id -334
[15:56:12 DBG] Requesting ReadLock for id -334
[15:56:12 DBG] Acquired ReadLock for id -334
[15:56:12 DBG] Dropped ReadLock for id -334
[15:56:13 INF] Database upgrade started
[15:56:13 INF] Starting ‘Umbraco.Core’…
[15:56:13 INF] At {1A8835EF-F8AB-4472-B4D8-D75B7C164022}
[15:56:13 INF] Execute RebuildDocumentUrls
[15:56:13 INF] Rebuilding all document URLs.
[15:56:13 DBG] Requesting ReadLock for id -333
[15:56:13 DBG] Acquired ReadLock for id -333
[15:56:13 DBG] Dropped ReadLock for id -333
[15:56:13 ERR] Plan Umbraco.Core failed at step {3FE0FA2D-CF4F-4892-BA8D-E97D06E028DC}
System.NullReferenceException: Object reference not set to an instance of an object.
at Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement.DocumentRepository.MapDtosToContent(List1 dtos, Boolean withCache, Boolean loadProperties, Boolean loadTemplates, Boolean loadVariants) at Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement.DocumentRepository.PerformGetAll(Int32[] ids) at Umbraco.Cms.Core.Cache.DefaultRepositoryCachePolicy2.GetAll(TId ids, Func2 performGetAll) at Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement.EntityRepositoryBase2.GetMany(TId ids)
at Umbraco.Cms.Core.Services.DocumentUrlService.RebuildAllUrlsAsync()
at Umbraco.Cms.Core.Services.DocumentUrlService.InitAsync(Boolean forceEmpty, CancellationToken cancellationToken)
at Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_15_0_0.RebuildDocumentUrls.Migrate()
at Umbraco.Cms.Infrastructure.Migrations.MigrationBase.MigrateAsync()
at Umbraco.Cms.Infrastructure.Migrations.AsyncMigrationBase.RunAsync()
at Umbraco.Cms.Infrastructure.Migrations.MigrationPlanExecutor.RunMigrationAsync(Type migrationType, MigrationContext context)
at Umbraco.Cms.Infrastructure.Migrations.MigrationPlanExecutor.RunScopedMigrationAsync(Transition transition, MigrationPlan plan)
at Umbraco.Cms.Infrastructure.Migrations.MigrationPlanExecutor.RunMigrationPlanAsync(MigrationPlan plan, String fromState)
[15:56:13 ERR] Database configuration failed