Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrading Umbraco 13.5.1 to 14.3.0 fails #17182

Closed
martinthogersen opened this issue Oct 3, 2024 · 5 comments
Closed

Upgrading Umbraco 13.5.1 to 14.3.0 fails #17182

martinthogersen opened this issue Oct 3, 2024 · 5 comments
Labels
state/needs-more-info We don't have enough information to give a good reply state/sprint-candidate We're trying to get this in a sprint at HQ in the next few weeks type/bug

Comments

@martinthogersen
Copy link

martinthogersen commented Oct 3, 2024

Which Umbraco version are you using? (Please write the exact version, example: 10.1.0)

13.5.1

Bug summary

While attempting to upgrade Umbraco from version 13.5.1 to 14.3.0, the process fails with the following error: "Invalid column name 'listView'." (Full error details below).

The error seems to stem from an issue in the migration plan, as indicated by the relevant code:
https://github.com/umbraco/Umbraco-CMS/blob/release-14.3.0/src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs

Here are the relevant log entries:

[13:20:51 INF] Create Primary Key:
ALTER TABLE [umbracoUserGroup2GranularPermission] ADD CONSTRAINT [PK_umbracoUserGroup2GranularPermissionDto] PRIMARY KEY CLUSTERED ([id])
[13:20:51 INF] Create Index:
CREATE NONCLUSTERED INDEX [IX_umbracoUserGroup2GranularPermissionDto_UserGroupKey_UniqueId] ON [umbracoUserGroup2GranularPermission] ([userGroupKey]) INCLUDE ([uniqueId])
[13:20:51 INF] Create Index:
CREATE NONCLUSTERED INDEX [IX_umbracoUserGroup2GranularPermissionDto_UniqueId] ON [umbracoUserGroup2GranularPermission] ([uniqueId])
[13:20:51 INF] Create Foreign Key:
ALTER TABLE [umbracoUserGroup2GranularPermission] ADD CONSTRAINT [FK_umbracoUserGroup2GranularPermission_umbracoUserGroup_key] FOREIGN KEY ([userGroupKey]) REFERENCES [umbracoUserGroup] ([key])
[13:20:51 INF] Create Foreign Key:
ALTER TABLE [umbracoUserGroup2GranularPermission] ADD CONSTRAINT [FK_umbracoUserGroup2GranularPermission_umbracoNode_uniqueId] FOREIGN KEY ([uniqueId]) REFERENCES [umbracoNode] ([uniqueId])
[13:20:51 WRN] No last synced Id found, this generally means this is a new server/install. A cold boot will be triggered.
[13:20:52 INF] Registered with MainDom, localContentDbExists? True, localMediaDbExists? True
[13:20:52 INF] Creating the content store, localContentDbExists? True
[13:20:52 INF] Creating the media store, localMediaDbExists? True
[13:20:52 ERR] Exception (e7a213eb).
Microsoft.Data.SqlClient.SqlException (0x80131904): Invalid column name 'listView'.
at Microsoft.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction)
at Microsoft.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction)
at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at Microsoft.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at Microsoft.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
at Microsoft.Data.SqlClient.SqlDataReader.get_MetaData()
at Microsoft.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
at Microsoft.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean isAsync, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
at Microsoft.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, TaskCompletionSource1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry, String method)
at Microsoft.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at Microsoft.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
at Microsoft.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
at StackExchange.Profiling.Data.ProfiledDbCommand.ExecuteDbDataReader(CommandBehavior behavior) in C:\projects\dotnet\src\MiniProfiler.Shared\Data\ProfiledDbCommand.cs:line 211
at Umbraco.Cms.Infrastructure.Persistence.FaultHandling.FaultHandlingDbCommand.<>c__DisplayClass35_0.b__0()
at Umbraco.Cms.Infrastructure.Persistence.FaultHandling.FaultHandlingDbCommand.<>c__DisplayClass38_01.b__0()
at Umbraco.Cms.Infrastructure.Persistence.FaultHandling.RetryPolicy.ExecuteAction[TResult](Func1 func)
at Umbraco.Cms.Infrastructure.Persistence.FaultHandling.FaultHandlingDbCommand.Execute[T](Func1 f)
at Umbraco.Cms.Infrastructure.Persistence.FaultHandling.FaultHandlingDbCommand.ExecuteDbDataReader(CommandBehavior behavior)
at NPoco.Database.<>c__DisplayClass298_0.b__0()
at NPoco.Database.ExecutionHook[T](Func1 action)
at NPoco.Database.ExecuteReaderHelper(DbCommand cmd)
at NPoco.Database.ExecuteDataReader(DbCommand cmd, Boolean sync)
at NPoco.AsyncHelper.RunSync[T](Task1 task)
at NPoco.Database.QueryImp[T](T instance, Expression1 listExpression, Func2 idFunc, Sql Sql, PocoData pocoData)+MoveNext()
at System.Collections.Generic.List1..ctor(IEnumerable1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source)
at NPoco.Database.Fetch[T](Sql sql)
at Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement.ContentTypeCommonRepository.GetAllTypesInternal()
at Umbraco.Extensions.AppCacheExtensions.<>c__DisplayClass0_01.b__0()
at Umbraco.Cms.Core.Cache.SafeLazy.<>c__DisplayClass1_0.b__0()
--- End of stack trace from previous location ---
at Umbraco.Cms.Core.Cache.ObjectCacheAppCache.Get(String key, Func1 factory, Nullable1 timeout, Boolean isSliding)
at Umbraco.Cms.Core.Cache.DeepCloneAppCache.Get(String key, Func1 factory, Nullable1 timeout, Boolean isSliding)
at Umbraco.Extensions.AppCacheExtensions.GetCacheItem[T](IAppPolicyCache provider, String cacheKey, Func1 getCacheItem, Nullable1 timeout, Boolean isSliding)
at Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement.ContentTypeCommonRepository.GetAllTypes()
at Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement.ContentTypeRepository.GetAllWithFullCachePolicy()
at Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement.ContentTypeRepositoryBase1.PerformGetAll(Int32[] ids)
at Umbraco.Cms.Core.Cache.FullDataSetRepositoryCachePolicy2.GetAllCached(Func2 performGetAll)
at Umbraco.Cms.Core.Cache.FullDataSetRepositoryCachePolicy2.GetAll(TId[] ids, Func2 performGetAll)
at Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement.EntityRepositoryBase2.GetMany(TId[] ids)
at Umbraco.Cms.Core.Services.ContentTypeServiceBase2.GetAll(Int32[] ids)
at Umbraco.Cms.Infrastructure.PublishedCache.PublishedSnapshotService.LoadContentFromDatabaseLocked(Boolean onStartup)
at Umbraco.Cms.Infrastructure.PublishedCache.PublishedSnapshotService.b__56_3()
at Umbraco.Cms.Infrastructure.PublishedCache.PublishedSnapshotService.LockAndLoadContent(Func1 action)
at Umbraco.Cms.Infrastructure.PublishedCache.PublishedSnapshotService.b__56_0()
at System.Threading.LazyInitializer.EnsureInitializedCore[T](T& target, Boolean& initialized, Object& syncLock, Func1 valueFactory)
at System.Threading.LazyInitializer.EnsureInitialized[T](T& target, Boolean& initialized, Object& syncLock, Func1 valueFactory)
at Umbraco.Cms.Infrastructure.PublishedCache.PublishedSnapshotService.EnsureCaches()
at Umbraco.Cms.Infrastructure.PublishedCache.PublishedSnapshotService.GetDocumentUid(Int32 id)
at Umbraco.Extensions.UmbracoBuilderExtensions.<>c__DisplayClass0_0.b__5(Int32 id)
at Umbraco.Cms.Core.Services.IdKeyMap.GetKeyForId(Int32 id, UmbracoObjectTypes umbracoObjectType)
at Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_14_0_0.MigrateCharPermissionsToStrings.<>c__DisplayClass5_2.b__5(String permission)
at System.Linq.Enumerable.SelectEnumerableIterator2.MoveNext()
at System.Linq.Enumerable.SelectManySingleSelectorIterator2.MoveNext()
at NPoco.SqlServer.SqlBulkCopyHelper.BuildBulkInsertDataTable[T](IDatabase db, IEnumerable1 list, SqlBulkCopy bulkCopy, SqlBulkCopyOptions sqlBulkCopyOptions, InsertBulkOptions insertBulkOptions)
at NPoco.SqlServer.SqlBulkCopyHelper.BulkInsert[T](IDatabase db, IEnumerable1 list, SqlBulkCopyOptions sqlBulkCopyOptions, InsertBulkOptions insertBulkOptions)
at NPoco.SqlServer.SqlBulkCopyHelper.BulkInsert[T](IDatabase db, IEnumerable1 list, InsertBulkOptions insertBulkOptions)
at NPoco.DatabaseTypes.SqlServerDatabaseType.InsertBulk[T](IDatabase db, IEnumerable1 pocos, InsertBulkOptions options)
at NPoco.Database.InsertBulk[T](IEnumerable1 pocos, InsertBulkOptions options)
at Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_14_0_0.MigrateCharPermissionsToStrings.Migrate()
at Umbraco.Cms.Infrastructure.Migrations.MigrationBase.Run()
at Umbraco.Cms.Infrastructure.Migrations.MigrationPlanExecutor.RunMigration(Type migrationType, MigrationContext context)
at Umbraco.Cms.Infrastructure.Migrations.MigrationPlanExecutor.RunScopedMigration(Transition transition, MigrationPlan plan)
at Umbraco.Cms.Infrastructure.Migrations.MigrationPlanExecutor.RunMigrationPlan(MigrationPlan plan, String fromState)

Specifics

No response

Steps to reproduce

  1. Set up a website using Umbraco 13.5.1.
  2. Attempt to upgrade the website to Umbraco 14.3.0.

Expected result / actual result

No response


This item has been added to our backlog AB#44668

Copy link

github-actions bot commented Oct 3, 2024

Hi there @martinthogersen!

Firstly, a big thank you for raising this issue. Every piece of feedback we receive helps us to make Umbraco better.

We really appreciate your patience while we wait for our team to have a look at this but we wanted to let you know that we see this and share with you the plan for what comes next.

  • We'll assess whether this issue relates to something that has already been fixed in a later version of the release that it has been raised for.
  • If it's a bug, is it related to a release that we are actively supporting or is it related to a release that's in the end-of-life or security-only phase?
  • We'll replicate the issue to ensure that the problem is as described.
  • We'll decide whether the behavior is an issue or if the behavior is intended.

We wish we could work with everyone directly and assess your issue immediately but we're in the fortunate position of having lots of contributions to work with and only a few humans who are able to do it. We are making progress though and in the meantime, we will keep you in the loop and let you know when we have any questions.

Thanks, from your friendly Umbraco GitHub bot 🤖 🙂

@bergmania bergmania added the state/sprint-candidate We're trying to get this in a sprint at HQ in the next few weeks label Oct 4, 2024
@bergmania
Copy link
Member

Hi @martinthogersen

We are three people that have tried to reproduce without any luck.

Do you have any packages installed, that could interfear? Alternatively can you describe your setup i more details.

@bergmania bergmania added the state/needs-more-info We don't have enough information to give a good reply label Oct 8, 2024
@martinthogersen
Copy link
Author

@bergmania I'll get back to you early next week. Thank you for looking into it!

@martinthogersen
Copy link
Author

@bergmania
It's quite strange. I attempted to set up a new project using version 13.5.1 with the same dependencies, and I was able to upgrade to version 14.3.0 without any issues.

I've compared the logs from both installations: the left side displays the output from a clean 13.5.1 install, while the right side shows the results from my upgrade attempt.

Before the error occurs, I see this message:

No last synced Id found, this generally means this is a new server/install. A cold boot will be triggered.

However, this isn't a new server or installation - it's an existing website.
Do you have any suggestions?

image

@bergmania
Copy link
Member

@martinthogersen

That log message should only occur, if the folder/umbraco/Data/TEMP/DistCache is missing or empty. I just tested when that file is removed, but I can still not reproduce, but I think I understand what is going on.

I'll look into a fix

bergmania added a commit that referenced this issue Oct 16, 2024
bergmania added a commit that referenced this issue Oct 21, 2024
* Fixes #17182

* Ensure wait-on is installed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state/needs-more-info We don't have enough information to give a good reply state/sprint-candidate We're trying to get this in a sprint at HQ in the next few weeks type/bug
Projects
None yet
Development

No branches or pull requests

2 participants