Migration error MetaUIMigration

I will try to migrate to Kinetic 2022.1 and get this error in conversion #191

Program Ice.Services.Lib.RunTask raised an unexpected exception with the following message: RunTask:
System.Data.Entity.Core.EntityCommandExecutionException: An error occurred while executing the command definition. See the inner exception for details.
—> System.InvalidOperationException: The transaction associated with the current connection has completed but has not been disposed. The transaction must be disposed before the connection can be used to execute SQL statements.
at System.Data.SqlClient.SqlInternalConnectionTds.CheckEnlistedTransactionBinding()
at System.Data.SqlClient.TdsParser.TdsExecuteRPC(_SqlRPC[] rpcArray, Int32 timeout, Boolean inSchema, SqlNotificationRequest notificationRequest, TdsParserStateObject stateObj, Boolean isCommandProc, Boolean sync, TaskCompletionSource1 completion, Int32 startRpc, Int32 startParam) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds) at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior) at System.Data.Entity.Infrastructure.Interception.InternalDispatcher1.Dispatch[TTarget,TInterceptionContext,TResult](TTarget target, Func3 operation, TInterceptionContext interceptionContext, Action3 executing, Action3 executed) at System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.Reader(DbCommand command, DbCommandInterceptionContext interceptionContext) at System.Data.Entity.Core.EntityClient.Internal.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior) --- End of inner exception stack trace --- at System.Data.Entity.Core.EntityClient.Internal.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior) at System.Data.Entity.Core.Objects.Internal.ObjectQueryExecutionPlan.Execute[TResultType](ObjectContext context, ObjectParameterCollection parameterValues) at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess)
at System.Data.Entity.Core.Objects.ObjectQuery1.<>c__DisplayClass41_0.<GetResults>b__0() at System.Data.Entity.Core.Objects.ObjectQuery1.<System.Collections.Generic.IEnumerable.GetEnumerator>b__31_0()
at System.Data.Entity.Internal.LazyEnumerator1.MoveNext() at System.Linq.Enumerable.TryGetFirst[TSource](IEnumerable1 source, Boolean& found)
at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable1 source) at System.Data.Entity.Core.Objects.CompiledQuery.ExecuteQuery[TResult](ObjectContext context, Object[] parameterValues) at Epicor.Data.DBExpressionCompiler.GetResult[TDataContext,TQuery,TResult](Func3 executeQuery, Cache cacheSetting, TDataContext dataContext, TQuery query) in C:_releases\ICE\ICE4.2.100.0\Source\Server\Framework\Epicor.System\Data\DBExpressionCompiler.cs:line 446
at Epicor.Data.DBExpressionCompiler.InvokeSingle[TDataContext,TQuery,TResult](Expression expression, Cache currentCacheSetting, Boolean cacheQuery, TDataContext dataContext, Func2 getDataCacheKey, Func2 compileQuery, Func3 executeQuery) in C:\_releases\ICE\ICE4.2.100.0\Source\Server\Framework\Epicor.System\Data\DBExpressionCompiler.cs:line 307 at Epicor.Data.DBExpressionCompiler.<>c__DisplayClass56_04.b__0(TContext context, TArg1 arg1, TArg2 arg2) in C:_releases\ICE\ICE4.2.100.0\Source\Server\Framework\Epicor.System\Data\DBExpressionCompiler.Generated.cs:line 0
at Ice.Internal.Conversion.MetaUIMigration.MetaUIMigration.MigrateUIAppsJsonFiles() in C:_releases\ICE\ICE4.2.100.0\Source\Server\Internal\Conversions\Ice.Internal.Conversion.MetaUIMigration\MetaUIMigration.cs:line 83
at Ice.Internal.Conversion.MetaUIMigration.MetaUIMigration.RunConversion(Int64 instanceTaskNum) in C:_releases\ICE\ICE4.2.100.0\Source\Server\Internal\Conversions\Ice.Internal.Conversion.MetaUIMigration\MetaUIMigration.cs:line 56
at Ice.Core.ConversionTaskBase1.RunProcess(Int64 instanceTaskNum, String outputFileName) in C:\_releases\ICE\ICE4.2.100.0\Source\Server\Internal\Lib\TaskLib\ConversionBase\ConversionTaskBase.cs:line 69 at Ice.Core.TaskBase1.StartProcess(Int64 instanceTaskNum, String outputFileName) in C:_releases\ICE\ICE4.2.100.0\Source\Server\Internal\Lib\TaskLib\TaskBase\TaskBase.cs:line 81
at Ice.Hosting.TaskCaller.InnerExecuteTask(IceDataContext newContext) in C:_releases\ICE\ICE4.2.100.6\Source\Server\Framework\Epicor.Ice\Hosting\TaskCaller\TaskCaller.cs:line 68
at Ice.Hosting.TaskCaller.ExecuteTask(IceDataContext dataContext, Boolean suppressTransaction) in C:_releases\ICE\ICE4.2.100.6\Source\Server\Framework\Epicor.Ice\Hosting\TaskCaller\TaskCaller.cs:line 45
at Ice.Services.Lib.RunTaskSvc.<>c__DisplayClass30_1.b__1() in C:_releases\ICE\ICE4.2.100.0\Source\Server\Services\Lib\RunTask\RunTask.cs:line 453
at Ice.Lib.RunTask.BpmFriendlyTaskLauncher.Run(String sessionIdPrefix, IceContext db, Action taskRunner) in C:_releases\ICE\ICE4.2.100.0\Source\Server\Services\Lib\RunTask\BpmFriendlyTaskLauncher.cs:line 57
at Ice.Services.Lib.RunTaskSvc.InnerRunTask(Int64 ipTaskNum, Boolean suppressTransaction) in C:_releases\ICE\ICE4.2.100.0\Source\Server\Services\Lib\RunTask\RunTask.cs:line 450

If it always fails at 5 minutes it seems related to a timeout issue we found and fixed on 2022.1.8.

It seems to be failing when moving all MetaUI json files from Deployment/Server/Apps/MetaUI into the database, as a workaround you could try processing the files in batches.
Leave some json files, run the conversion, after it finishes you can remove those files and put the next batch, once all have been move to the database you should be fine.

1 Like

I am also getting that same error on that step when updating from 2021.2.12 to 2021.2.20. Seems like it may be related to SSO but I don’t have non-SSO app servers on these environments so can’t confirm.

Is there a PRB number?

Yes, PRB0251619, although that is 2022.1 only.

1 Like

So its not the SSO, thank you for the PRB reference, hopefully that will help the person who has my ticket.

Unfortunately that workaround didn’t work for me. Even with only a few files in the directory it still errors out. Its erroring out in less than a minute so I think whatever is wrong is unrelated to the timeout.

Is the error the same?

Original error message:
Program Ice.Services.Lib.RunTask raised an unexpected exception with the following message: RunTask:
System.Transactions.TransactionAbortedException: The transaction has aborted.
at System.Transactions.TransactionStateAborted.BeginCommit(InternalTransaction tx, Boolean asyncCommit, AsyncCallback asyncCallback, Object asyncState)
at System.Transactions.CommittableTransaction.Commit()
at System.Transactions.TransactionScope.InternalDispose()
at System.Transactions.TransactionScope.Dispose()
at Ice.Internal.Conversion.MetaUIMigration.MetaUIMigration.MigrateMetaFxLayers() in C:_releases\ICE\ICE4.1.200.0\Source\Server\Internal\Conversions\Ice.Internal.Conversion.MetaUIMigration\MetaUIMigration.cs:line 189
at Ice.Internal.Conversion.MetaUIMigration.MetaUIMigration.RunConversion(Int64 instanceTaskNum) in C:_releases\ICE\ICE4.1.200.0\Source\Server\Internal\Conversions\Ice.Internal.Conversion.MetaUIMigration\MetaUIMigration.cs:line 58
at Ice.Core.ConversionTaskBase1.RunProcess(Int64 instanceTaskNum, String outputFileName) in C:\_releases\ICE\ICE4.1.200.20\Source\Server\Internal\Lib\TaskLib\ConversionBase\ConversionTaskBase.cs:line 75 at Ice.Core.TaskBase1.StartProcess(Int64 instanceTaskNum, String outputFileName) in C:_releases\ICE\ICE4.1.200.20\Source\Server\Internal\Lib\TaskLib\TaskBase\TaskBase.cs:line 84
at Ice.Hosting.TaskCaller.InnerExecuteTask(IceDataContext newContext) in C:_releases\ICE\ICE4.1.200.20\Source\Server\Framework\Epicor.Ice\Hosting\TaskCaller\TaskCaller.cs:line 117
at Ice.Hosting.TaskCaller.ExecuteTask(IceDataContext dataContext, Boolean suppressTransaction) in C:_releases\ICE\ICE4.1.200.20\Source\Server\Framework\Epicor.Ice\Hosting\TaskCaller\TaskCaller.cs:line 45
at Ice.Lib.RunTask.BpmFriendlyTaskLauncher.Run(String sessionIdPrefix, IceContext db, Action taskRunner) in C:_releases\ICE\ICE4.1.200.0\Source\Server\Services\Lib\RunTask\BpmFriendlyTaskLauncher.cs:line 63
at Ice.Services.Lib.RunTaskSvc.InnerRunTask(Int64 ipTaskNum, Boolean suppressTransaction) in C:_releases\ICE\ICE4.1.200.0\Source\Server\Services\Lib\RunTask\RunTask.cs:line 455

New error message:
Program Ice.Services.Lib.RunTask raised an unexpected exception with the following message: RunTask:
System.Transactions.TransactionAbortedException: The transaction has aborted.
at System.Transactions.TransactionStateAborted.BeginCommit(InternalTransaction tx, Boolean asyncCommit, AsyncCallback asyncCallback, Object asyncState)
at System.Transactions.CommittableTransaction.Commit()
at System.Transactions.TransactionScope.InternalDispose()
at System.Transactions.TransactionScope.Dispose()
at Ice.Internal.Conversion.MetaUIMigration.MetaUIMigration.MigrateMetaFxLayers() in C:_releases\ICE\ICE4.1.200.0\Source\Server\Internal\Conversions\Ice.Internal.Conversion.MetaUIMigration\MetaUIMigration.cs:line 189
at Ice.Internal.Conversion.MetaUIMigration.MetaUIMigration.RunConversion(Int64 instanceTaskNum) in C:_releases\ICE\ICE4.1.200.0\Source\Server\Internal\Conversions\Ice.Internal.Conversion.MetaUIMigration\MetaUIMigration.cs:line 58
at Ice.Core.ConversionTaskBase1.RunProcess(Int64 instanceTaskNum, String outputFileName) in C:\_releases\ICE\ICE4.1.200.20\Source\Server\Internal\Lib\TaskLib\ConversionBase\ConversionTaskBase.cs:line 75 at Ice.Core.TaskBase1.StartProcess(Int64 instanceTaskNum, String outputFileName) in C:_releases\ICE\ICE4.1.200.20\Source\Server\Internal\Lib\TaskLib\TaskBase\TaskBase.cs:line 84
at Ice.Hosting.TaskCaller.InnerExecuteTask(IceDataContext newContext) in C:_releases\ICE\ICE4.1.200.20\Source\Server\Framework\Epicor.Ice\Hosting\TaskCaller\TaskCaller.cs:line 117
at Ice.Hosting.TaskCaller.ExecuteTask(IceDataContext dataContext, Boolean suppressTransaction) in C:_releases\ICE\ICE4.1.200.20\Source\Server\Framework\Epicor.Ice\Hosting\TaskCaller\TaskCaller.cs:line 45
at Ice.Lib.RunTask.BpmFriendlyTaskLauncher.Run(String sessionIdPrefix, IceContext db, Action taskRunner) in C:_releases\ICE\ICE4.1.200.0\Source\Server\Services\Lib\RunTask\BpmFriendlyTaskLauncher.cs:line 63
at Ice.Services.Lib.RunTaskSvc.InnerRunTask(Int64 ipTaskNum, Boolean suppressTransaction) in C:_releases\ICE\ICE4.1.200.0\Source\Server\Services\Lib\RunTask\RunTask.cs:line 455

They look the same to me but I pasted both of them in case there is a difference I’m missing.

Support says my issue is environmental because they can run the conversion successfully on my database on their server. I don’t see how it can be environmental though when Demo upgrades successfully on my server. It has to be some combo of database specific and environmental but nobody seems to have any idea to get past it. It’s frustrating that this conversion is a show stopper - cannot log into the database until its solved which means I can’t get any of my other bug fixes. It would be better if this was like some of the other conversions where it can complete with errors and let you still use the database.

Do you absolutely need the Kinetic forms to check the bugs? If not I would suggest to request a fix to mark the conversion as completed and just log in using Classic.

This conversion can always be executed manually later. Related to this, do you have conversion sequence 192?

No, we aren’t using the kinetic forms at all yet. I don’t know how I would even apply a data fix since I can’t get to the data fix workbench. Yes we have conversion 192, it shows it last ran when we upgraded from E10 to 2021.2 in April.

Ah, I forget you guys use a special datafix format instead of direct sql.
Do you have access to the database? I believe as long as you mark it as COMPLETE and progress to 100 in Ice.CnvProgs, it should let you continue.

yes I did it, this works for me for now Thanks Jonathan

I do have database access - that worked when I got this same error trying to apply the 2021.2.8 update, but its not working this time.

There is no other conversion pending? That seems odd, you still get the “you need to run pending conversions”?

I guess I hadn’t set the progress percent to 100 - still want to figure out why this conversion won’t run though as we do want to begin using the kinetic UI.