Umbraco Cloud copy of live DB on local machine - Engage Migration prevents startup

I’ve used the connection details from the Umbraco Cloud portal and SSMS to deploy the content of the live database to my local SQL server. Once connected when I try to run the site I get the following:

[15:11:07 INF] Acquiring MainDom.
[15:11:07 INF] Acquired MainDom.
[15:11:09 INF] Starting 'UrlTracker'...
[15:11:09 INF] At 3.4
[15:11:09 INF] Done
[15:11:09 INF] Starting 'Umbraco.Engage.Forms'...
[15:11:09 INF] At CreateAnalyticsUmbracoFormsSubmissionRecordTable
[15:11:09 INF] Done
[15:11:09 INF] Starting 'Umbraco.Engage'...
[15:11:09 INF] At ModifySegmentControlGroupSize
[15:11:09 ERRUnhandled exception. ] Unhandled exception in AppDomain (terminating).
System.InvalidOperationException: The migration plan does not support migrating from state "ModifySegmentControlGroupSize".
   at Umbraco.Cms.Infrastructure.Migrations.MigrationPlan.ThrowOnUnknownInitialState(String state)
   at Umbraco.Cms.Infrastructure.Migrations.MigrationPlanExecutor.RunMigrationPlan(MigrationPlan plan, String fromState)
   at Umbraco.Cms.Infrastructure.Migrations.MigrationPlanExecutor.ExecutePlan(MigrationPlan plan, String fromState)
   at Umbraco.Cms.Infrastructure.Migrations.Upgrade.Upgrader.Execute(IMigrationPlanExecutor migrationPlanExecutor, ICoreScopeProvider scopeProvider, IKeyValueService keyValueService)
   at Umbraco.Engage.Data.Common.Migrations.MigrationPlanExecuter.Execute(MigrationPlan plan, Boolean ignoreExceptions) in /_/Umbraco.Engage.Data/Common/Migrations/MigrationPlanExecuter.cs:line 40
   at Umbraco.Engage.Web.Migrations.UmsMigrationsComponent.Initialize() in /_/Umbraco.Engage.Web/Migrations/UmsMigrationsComponent.cs:line 73
   at Umbraco.Cms.Core.Composing.ComponentCollection.Initialize()
   at Umbraco.Cms.Infrastructure.Runtime.CoreRuntime.StartAsync(CancellationToken cancellationToken, Boolean isRestarting)
   at Umbraco.Cms.Infrastructure.Runtime.CoreRuntime.StartAsync(CancellationToken cancellationToken)
   at Umbraco.Extensions.WebApplicationExtensions.BootUmbracoAsync(WebApplication app)
   at Program.<Main>$(String[] args) in C:\...\src\UmbracoProject\Program.cs:line 55
   at Program.<Main>(String[] args)
System.InvalidOperationException: The migration plan does not support migrating from state "ModifySegmentControlGroupSize".
   at Umbraco.Cms.Infrastructure.Migrations.MigrationPlan.ThrowOnUnknownInitialState(String state)
   at Umbraco.Cms.Infrastructure.Migrations.MigrationPlanExecutor.RunMigrationPlan(MigrationPlan plan, String fromState)
   at Umbraco.Cms.Infrastructure.Migrations.MigrationPlanExecutor.ExecutePlan(MigrationPlan plan, String fromState)
   at Umbraco.Cms.Infrastructure.Migrations.Upgrade.Upgrader.Execute(IMigrationPlanExecutor migrationPlanExecutor, ICoreScopeProvider scopeProvider, IKeyValueService keyValueService)
   at Umbraco.Engage.Data.Common.Migrations.MigrationPlanExecuter.Execute(MigrationPlan plan, Boolean ignoreExceptions) in /_/Umbraco.Engage.Data/Common/Migrations/MigrationPlanExecuter.cs:line 40
   at Umbraco.Engage.Web.Migrations.UmsMigrationsComponent.Initialize() in /_/Umbraco.Engage.Web/Migrations/UmsMigrationsComponent.cs:line 73
   at Umbraco.Cms.Core.Composing.ComponentCollection.Initialize()
   at Umbraco.Cms.Infrastructure.Runtime.CoreRuntime.StartAsync(CancellationToken cancellationToken, Boolean isRestarting)
   at Umbraco.Cms.Infrastructure.Runtime.CoreRuntime.StartAsync(CancellationToken cancellationToken)
   at Umbraco.Extensions.WebApplicationExtensions.BootUmbracoAsync(WebApplication app)
   at Program.<Main>$(String[] args) in C:\...\src\UmbracoProject\Program.cs:line 55
   at Program.<Main>(String[] args)

Process finished with exit code -532,462,766.

I’m not sure what migration it is trying to run, and perhaps what config setting I’m missing. Any pointers would be most welcome.

I see this “does not support migrating from state” error a lot during upgrades. Maybe it’s the same solution? The fix is usually to go into the DB, find the dbo.UmbracoKeyValue table, then find & delete the matching entry. It’s typically safe to delete these as they’re auto re-generated and simply storing current state of some processes, not any real data (always Umbraco Deploy or Umbraco Forms ^^;)

Admittedly though, I’m used to seeing guids for this error and not some nice readable text.

2 Likes

Of course, I think I should have known that, but it’s been a while since I’ve worked on a local Cloud site.

Also the readable named value threw me, like you, I’m used to seeing a GUID.

But you’re absolutely right deleting the record meant that everything booted up and ran.

Thank you!

1 Like

Umbraco.Engage seemed to run into an issue trying to install/upgrade from that specific version, but gad to hear deleting the record & rebooting resolved the issue!

And you are correct on the GUID part, for Engage I like to be a bit more descriptive on the Migration Plan states & actions than that the core CMS does :wink:

2 Likes

Thanks @cornehoskam, totally agree, if descriptive states can be used it is going to be more helpful :+1:t2: