umbraco / Umbraco-CMS

Umbraco is a free and open source .NET content management system helping you deliver delightful digital experiences.
https://umbraco.com
MIT License
4.53k stars 2.7k forks source link

Data migration failed from v13 to v14 #17628

Open ssplyuvrajsingh opened 10 hours ago

ssplyuvrajsingh commented 10 hours ago

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

13.5.2

Bug summary

Error while migrating data from v13 to v14

Plan Umbraco.Core failed at step {1A0FBC8A-6FC6-456C-805C-B94816B2E570}
System.Text.Json.JsonException: Expected start object
   at Umbraco.Cms.Infrastructure.Serialization.JsonBlockValueConverter.Read(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options)
   at System.Text.Json.Serialization.JsonConverter`1.ReadAsObject(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options)
   at System.Text.Json.Serialization.Converters.CastingConverter`1.Read(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options)
   at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value, Boolean& isPopulatedValue)
   at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
   at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan`1 utf8Json, JsonTypeInfo`1 jsonTypeInfo, Nullable`1 actualByteCount)
   at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan`1 json, JsonTypeInfo`1 jsonTypeInfo)
   at System.Text.Json.JsonSerializer.Deserialize[TValue](String json, JsonSerializerOptions options)
   at Umbraco.Cms.Infrastructure.Serialization.SystemTextJsonSerializerBase.Deserialize[T](String input)
   at Umbraco.Cms.Core.Models.Blocks.BlockEditorDataConverter`2.Deserialize(String json)
   at Umbraco.Cms.Core.PropertyEditors.BlockEditorValues`2.DeserializeAndClean(Object propertyValue)
   at Umbraco.Cms.Core.PropertyEditors.BlockEditorPropertyValueEditor`2.GetAllPropertyValues(Object value)+MoveNext()
   at System.Linq.Lookup`2.Create[TSource](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
   at System.Linq.GroupedEnumerable`3.GetEnumerator()
   at Umbraco.Cms.Core.PropertyEditors.BlockEditorPropertyValueEditor`2.GetReferences(Object value)+MoveNext()
   at System.Linq.Enumerable.SelectManySingleSelectorIterator`2.MoveNext()
   at Umbraco.Cms.Core.PropertyEditors.DataValueReferenceFactoryCollection.GetReferencesEnumerable(IDataEditor dataEditor, IEnumerable`1 values)+MoveNext()
   at System.Collections.Generic.HashSet`1.UnionWith(IEnumerable`1 other)
   at System.Collections.Generic.HashSet`1..ctor(IEnumerable`1 collection, IEqualityComparer`1 comparer)
   at System.Linq.Enumerable.ToHashSet[TSource](IEnumerable`1 source, IEqualityComparer`1 comparer)
   at System.Linq.Enumerable.ToHashSet[TSource](IEnumerable`1 source)
   at Umbraco.Cms.Core.PropertyEditors.DataValueReferenceFactoryCollection.GetReferences(IDataEditor dataEditor, IEnumerable`1 values)
   at Umbraco.Cms.Core.PropertyEditors.DataValueReferenceFactoryCollection.GetAllReferences(IPropertyCollection properties, PropertyEditorCollection propertyEditors)
   at Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement.ContentRepositoryBase`3.PersistRelations(TEntity entity)
   at Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement.DocumentRepository.PersistUpdatedItem(IContent entity)
   at Umbraco.Cms.Core.Cache.DefaultRepositoryCachePolicy`2.Update(TEntity entity, Action`1 persistUpdated)
   at Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement.EntityRepositoryBase`2.Save(TEntity entity)
   at Umbraco.Cms.Core.Services.ContentService.SaveBlueprint(IContent content, Int32 userId)
   at Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_14_0_0.MoveDocumentBlueprintsToFolders.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)
[17:28:24 ERR] Database configuration failed
System.Text.Json.JsonException: Expected start object
   at Umbraco.Cms.Infrastructure.Serialization.JsonBlockValueConverter.Read(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options)
   at System.Text.Json.Serialization.JsonConverter`1.ReadAsObject(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options)
   at System.Text.Json.Serialization.Converters.CastingConverter`1.Read(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options)
   at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value, Boolean& isPopulatedValue)
   at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
   at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan`1 utf8Json, JsonTypeInfo`1 jsonTypeInfo, Nullable`1 actualByteCount)
   at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan`1 json, JsonTypeInfo`1 jsonTypeInfo)
   at System.Text.Json.JsonSerializer.Deserialize[TValue](String json, JsonSerializerOptions options)
   at Umbraco.Cms.Infrastructure.Serialization.SystemTextJsonSerializerBase.Deserialize[T](String input)
   at Umbraco.Cms.Core.Models.Blocks.BlockEditorDataConverter`2.Deserialize(String json)
   at Umbraco.Cms.Core.PropertyEditors.BlockEditorValues`2.DeserializeAndClean(Object propertyValue)
   at Umbraco.Cms.Core.PropertyEditors.BlockEditorPropertyValueEditor`2.GetAllPropertyValues(Object value)+MoveNext()
   at System.Linq.Lookup`2.Create[TSource](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
   at System.Linq.GroupedEnumerable`3.GetEnumerator()
   at Umbraco.Cms.Core.PropertyEditors.BlockEditorPropertyValueEditor`2.GetReferences(Object value)+MoveNext()
   at System.Linq.Enumerable.SelectManySingleSelectorIterator`2.MoveNext()
   at Umbraco.Cms.Core.PropertyEditors.DataValueReferenceFactoryCollection.GetReferencesEnumerable(IDataEditor dataEditor, IEnumerable`1 values)+MoveNext()
   at System.Collections.Generic.HashSet`1.UnionWith(IEnumerable`1 other)
   at System.Collections.Generic.HashSet`1..ctor(IEnumerable`1 collection, IEqualityComparer`1 comparer)
   at System.Linq.Enumerable.ToHashSet[TSource](IEnumerable`1 source, IEqualityComparer`1 comparer)
   at System.Linq.Enumerable.ToHashSet[TSource](IEnumerable`1 source)
   at Umbraco.Cms.Core.PropertyEditors.DataValueReferenceFactoryCollection.GetReferences(IDataEditor dataEditor, IEnumerable`1 values)
   at Umbraco.Cms.Core.PropertyEditors.DataValueReferenceFactoryCollection.GetAllReferences(IPropertyCollection properties, PropertyEditorCollection propertyEditors)
   at Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement.ContentRepositoryBase`3.PersistRelations(TEntity entity)
   at Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement.DocumentRepository.PersistUpdatedItem(IContent entity)
   at Umbraco.Cms.Core.Cache.DefaultRepositoryCachePolicy`2.Update(TEntity entity, Action`1 persistUpdated)
   at Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement.EntityRepositoryBase`2.Save(TEntity entity)
   at Umbraco.Cms.Core.Services.ContentService.SaveBlueprint(IContent content, Int32 userId)
   at Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_14_0_0.MoveDocumentBlueprintsToFolders.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)
[17:28:24 ERR] Failed DatabaseUpgradeStep, with the message: The database failed to upgrade. ERROR: The database configuration failed with the following message: Expected start object
 Please check log file for additional information (can be found in 'LoggingSettings.Directory')

Specifics

No response

Steps to reproduce

image

Expected result / actual result

No response

github-actions[bot] commented 10 hours ago

Hi there @ssplyuvrajsingh!

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 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 :robot: :slightly_smiling_face:

bergmania commented 8 hours ago

Hi @ssplyuvrajsingh

Thanks for reporting. It looks like you have some blueprints/ Content templates, that contain some unexpected data in some block based types. Are you able to save all the blueprints in the v13 solution?