Skip to content

Exception thrown when upgrading from Umbraco 8.17.0 to 10.0.0 #14408

Open
@halfer53

Description

@halfer53

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

10.0.0

Bug summary

I'm trying to upgrade the database from 8.17.0 to 10.0.0, then I got the following error. The same error can be reproduced using 10.5.1

System.InvalidOperationException: Set an alias before adding the property group. at Umbraco.Cms.Core.Models.PropertyGroupCollection.Add(PropertyGroup item) at Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement.ContentTypeCommonRepository.MapGroupsAndProperties(IDictionary`2 contentTypes) at Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement.ContentTypeCommonRepository.GetAllTypesInternal() at Umbraco.Extensions.AppCacheExtensions.<>c__DisplayClass0_0`1.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, Func`1 factory, Nullable`1 timeout, Boolean isSliding, String[] dependentFiles) at Umbraco.Cms.Core.Cache.DeepCloneAppCache.Get(String key, Func`1 factory, Nullable`1 timeout, Boolean isSliding, String[] dependentFiles) at Umbraco.Extensions.AppCacheExtensions.GetCacheItem[T](IAppPolicyCache provider, String cacheKey, Func`1 getCacheItem, Nullable`1 timeout, Boolean isSliding, String[] dependentFiles) 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.ContentTypeRepositoryBase`1.PerformGetAll(Int32[] ids) at Umbraco.Cms.Core.Cache.FullDataSetRepositoryCachePolicy`2.GetAllCached(Func`2 performGetAll) at Umbraco.Cms.Core.Cache.FullDataSetRepositoryCachePolicy`2.GetAll(TId[] ids, Func`2 performGetAll) at Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement.EntityRepositoryBase`2.GetMany(TId[] ids) at Umbraco.Cms.Core.Services.ContentTypeServiceBase`2.GetAll(Int32[] ids) at Umbraco.Cms.Infrastructure.PublishedCache.DataSource.MsgPackContentNestedDataSerializerFactory.Create(ContentCacheDataSerializerEntityType types) at Umbraco.Cms.Infrastructure.PublishedCache.Persistence.NuCacheContentRepository.Rebuild(IReadOnlyCollection`1 contentTypeIds, IReadOnlyCollection`1 mediaTypeIds, IReadOnlyCollection`1 memberTypeIds) at Umbraco.Cms.Infrastructure.PublishedCache.Persistence.NuCacheContentService.Rebuild(IReadOnlyCollection`1 contentTypeIds, IReadOnlyCollection`1 mediaTypeIds, IReadOnlyCollection`1 memberTypeIds) at Umbraco.Cms.Infrastructure.PublishedCache.Persistence.NuCacheContentService.RebuildDatabaseCacheIfSerializerChanged() at Umbraco.Cms.Infrastructure.PublishedCache.NuCacheStartupHandler.Handle(UmbracoApplicationStartingNotification notification) at Umbraco.Cms.Core.Events.EventAggregator.PublishCore(IEnumerable`1 allHandlers, INotification notification) at Umbraco.Cms.Core.Events.NotificationHandlerWrapperImpl`1.Handle(INotification notification, ServiceFactory serviceFactory, Action`2 publish) at Umbraco.Cms.Core.Events.EventAggregator.PublishNotification(INotification notification) at Umbraco.Cms.Core.Events.EventAggregator.PublishAsync[TNotification](TNotification notification, CancellationToken cancellationToken) at Umbraco.Cms.Infrastructure.Runtime.CoreRuntime.StartAsync(CancellationToken cancellationToken, Boolean isRestarting) at Umbraco.Cms.Infrastructure.Runtime.CoreRuntime.RestartAsync() at Umbraco.Cms.Web.BackOffice.Install.InstallApiController.CompleteInstall() at lambda_method216(Closure , Object ) at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope) at Microsoft.AspNetCore.Routing.EndpointMiddleware.g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger) at Umbraco.Cms.Web.Common.Middleware.BasicAuthenticationMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<b__1>d.MoveNext() --- End of stack trace from previous location --- at Umbraco.Cms.Web.BackOffice.Middleware.BackOfficeExternalLoginProviderErrorMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<b__1>d.MoveNext() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at SixLabors.ImageSharp.Web.Middleware.ImageSharpMiddleware.Invoke(HttpContext httpContext, Boolean retry) at StackExchange.Profiling.MiniProfilerMiddleware.Invoke(HttpContext context) in C:\projects\dotnet\src\MiniProfiler.AspNetCore\MiniProfilerMiddleware.cs:line 119 at Umbraco.Cms.Web.Common.Middleware.UmbracoRequestMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Umbraco.Cms.Web.Common.Middleware.UmbracoRequestMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<b__1>d.MoveNext() --- End of stack trace from previous location --- at Umbraco.Cms.Web.Common.Middleware.PreviewAuthenticationMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<b__1>d.MoveNext() --- End of stack trace from previous location --- at Umbraco.Cms.Web.Common.Middleware.UmbracoRequestLoggingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<b__1>d.MoveNext() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context) HEADERS ======= Accept: application/json, text/plain, */* Connection: keep-alive Host: localhost:3178 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36 Edg/114.0.1823.51 Accept-Encoding: gzip, deflate, br Accept-Language: en-US,en;q=0.9,zh-CN;q=0.8,zh;q=0.7 Content-Type: application/json;charset=UTF-8 Cookie: UMB_UPDCHK=1; Bucket=cEfgioe5QBKeQJ4tYnpGow; Varient=1; umb_installId=8e09e6c8-ba39-4ede-8458-195fd1e3cc2b; UMB_UCONTEXT_C=2023-06-19T10%3A04%3A02.7568504%2B00%3A00; UMB_UCONTEXT=<redacted> Origin: http://localhost:3178 Referer: http://localhost:3178/install?redir=true&url=http://localhost:3178/ Content-Length: 269 sec-ch-ua: "Not.A/Brand";v="8", "Chromium";v="114", "Microsoft Edge";v="114" sec-ch-ua-mobile: ?0 sec-ch-ua-platform: "Windows" Sec-Fetch-Site: same-origin Sec-Fetch-Mode: cors Sec-Fetch-Dest: empty

Specifics

Context: I'm upgrading an old umbraco project from 7. I removed and updated some of the data properties and managed to successfully upgrade to 8.17.0. But I am unable to continue down the path of upgrade to 10 due the above error.

Steps to reproduce

Have my 8.17.0 database
Install a new Umbraco 10 project
Hit upgrade,
failed with the above exception

Expected result / actual result

Upgrade should be successful

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions