Continuous Integration Error: Message: Restoration of object type "User" failed during objects' dele

Lance Keay asked on September 28, 2017 13:17

I'm trying to use the CI in v10.0.24. When trying to restore the CI objects from Git, it runs fine for a few minutes and then shows the following error. It seems that CI is trying to delete the Global Admin and having a problem:

...running fine
Object type Meta file: ecommerce.png updated
Object type Meta file: updating intranet.png
Object type Meta file: intranet.png updated
Object type Meta file: updating personal.png
Object type Meta file: personal.png updated
Object type Meta file: updating tsia-account-sign-in-bkg.png
Object type Meta file: tsia-account-sign-in-bkg.png updated
Object type User: deleting Global Administrator
Message: Restoration of object type "User" failed during objects' deletion. See inner exception for further details.

Exception type: CMS.ContinuousIntegration.ObjectTypeSerializationException
Stack trace:
   at CMS.ContinuousIntegration.Internal.FileSystemRestoreAllJob.TryRun(Action`2 method, String objectType, CancellationToken cancellationToken, String exceptionMessageFormat)
   at CMS.ContinuousIntegration.Internal.FileSystemRestoreAllJob.<>c__DisplayClassb.<RunInternal>b__3(String objectType)
   at CMS.ContinuousIntegration.Internal.AbstractFileSystemJob.CancellableForEach[T](CancellationToken cancellationToken, IEnumerable`1 collection, Action`2 action)
   at CMS.ContinuousIntegration.Internal.AbstractFileSystemJob.CancellableForEach[T](CancellationToken cancellationToken, IEnumerable`1 collection, Action`1 action)
   at CMS.ContinuousIntegration.Internal.FileSystemRestoreAllJob.RunInternal(CancellationToken cancellationToken)
   at CMS.ContinuousIntegration.Internal.AbstractFileSystemAllJob.Run(Nullable`1 cancellationToken)

Message: Deletion of object type "User" (cms.user) failed for object "Global Administrator" (UserID: 53). See inner exception for further details.

Exception type: CMS.ContinuousIntegration.ObjectTypeSerializationException
Stack trace:
   at CMS.ContinuousIntegration.Internal.FileSystemDeleteObjectsByTypeJob.DeleteObjectBase(String objectType, BaseInfo info, ISet`1 mainFilesLocations, String logMessageFormat, Queue`1 notDeletedObjects)
   at CMS.ContinuousIntegration.Internal.FileSystemDeleteObjectsByTypeJob.<>c__DisplayClass3.<ProcessDeletedObjects>b__1(BaseInfo info)
   at CMS.ContinuousIntegration.Internal.AbstractFileSystemJob.CancellableForEach[T](CancellationToken cancellationToken, IEnumerable`1 collection, Action`2 action)
   at CMS.ContinuousIntegration.Internal.AbstractFileSystemJob.CancellableForEach[T](CancellationToken cancellationToken, IEnumerable`1 collection, Action`1 action)
   at CMS.ContinuousIntegration.Internal.FileSystemDeleteObjectsByTypeJob.ProcessDeletedObjects(String objectType, ISet`1 repositoryLocations, CancellationToken cancellationToken)
   at CMS.ContinuousIntegration.Internal.FileSystemDeleteObjectsByTypeJob.RunInternal(String objectType, ISet`1 fileLocations, CancellationToken cancellationToken)
   at CMS.ContinuousIntegration.Internal.FileSystemRestoreObjectsByTypeInternalJob.RunDeleteObjectsByTypeJob()
   at CMS.ContinuousIntegration.Internal.FileSystemRestoreAllJob.DeleteAndDispose(String objectType, CancellationToken cancellationToken)
   at CMS.ContinuousIntegration.Internal.FileSystemRestoreAllJob.TryRun(Action`2 method, String objectType, CancellationToken cancellationToken, String exceptionMessageFormat)

Message: The default object of object type "cms.user" cannot be deleted.

Exception type: System.Exception
Stack trace:
   at CMS.DataEngine.ObjectDependenciesRemover.ProcessRemoveDependency(BaseInfo infoObj, Boolean getAll, IWhereCondition baseWhere, DependencyReference dependencyReference, HashSet`1 processed)
   at CMS.DataEngine.ObjectDependenciesRemover.GetRemoveDependenciesList(BaseInfo infoObj, Boolean getAll, IWhereCondition baseWhere, HashSet`1 processed)
   at CMS.DataEngine.ObjectDependenciesRemover.RemoveObjectDependenciesAuto(BaseInfo infoObj, Boolean deleteAll, Boolean clearCache)
   at CMS.DataEngine.ObjectDependenciesRemover.RemoveObjectDependencies(BaseInfo infoObj, Boolean deleteAll, Boolean clearCache)
   at CMS.Membership.UserInfo.RemoveObjectDependencies(Boolean deleteAll, Boolean clearHashtables)
   at CMS.DataEngine.AbstractInfoBase`1.DeleteData()
   at CMS.DataEngine.AbstractInfoProvider`3.DeleteInfo(TInfo info)
   at CMS.Membership.UserInfoProvider.DeleteUserInternal(UserInfo userObj)
   at CMS.Membership.UserInfo.DeleteObject()
   at CMS.DataEngine.BaseInfo.Delete()
   at CMS.ContinuousIntegration.Internal.FileSystemDeleteObjectsByTypeJob.DeleteObject(BaseInfo obj, RepositoryLocationsCollection objectLocations, ISet`1 repositoryLocations, String logMessageFormat)
   at CMS.ContinuousIntegration.Internal.FileSystemDeleteObjectsByTypeJob.DeleteObjectBase(String objectType, BaseInfo info, ISet`1 mainFilesLocations, String logMessageFormat, Queue`1 notDeletedObjects)

Errors occurred while restoring objects from the repository:
Object type ObjectType.customtableitem_customtable_onboarding_user_memory: Object serialized in file @global\customtableitem.customtable.onboarding_user_memory\11aad6f7-1907-4fcd-bb35-6cc878e30a60.xml cannot be deserialized. Deserialization of the following fields failed: [ItemCreatedBy, ], [ItemModifiedBy, ].
Object type ObjectType.customtableitem_customtable_onboarding_user_memory: Object serialized in file @global\customtableitem.customtable.onboarding_user_memory\529a67b6-6642-42ed-92cf-c2796a860f8c.xml cannot be deserialized. Deserialization of the following fields failed: [ItemCreatedBy, ], [ItemModifiedBy, ].
Object type ObjectType.customtableitem_customtable_onboarding_user_memory: Object serialized in file @global\customtableitem.customtable.onboarding_user_memory\5ffae39e-226a-4a2d-b98c-d2694a2f5f7b.xml cannot be deserialized. Deserialization of the following fields failed: [ItemCreatedBy, ], [ItemModifiedBy, ].
Object type ObjectType.customtableitem_customtable_onboarding_user_memory: Object serialized in file @global\customtableitem.customtable.onboarding_user_memory\6448a233-50ad-4811-841d-962d4fb4dffd.xml cannot be deserialized. Deserialization of the following fields failed: [ItemCreatedBy, ], [ItemModifiedBy, ].
Object type ObjectType.customtableitem_customtable_onboarding_user_memory: Object serialized in file @global\customtableitem.customtable.onboarding_user_memory\6968f621-9080-4b1c-bf5b-21ef97bdfb75.xml cannot be deserialized. Deserialization of the following fields failed: [ItemCreatedBy, ], [ItemModifiedBy, ].
Object type ObjectType.customtableitem_customtable_onboarding_user_memory: Object serialized in file @global\customtableitem.customtable.onboarding_user_memory\6f2405c7-24b7-4760-8c37-1f24ea3af851.xml cannot be deserialized. Deserialization of the following fields failed: [ItemCreatedBy, ], [ItemModifiedBy, ].
Object type ObjectType.customtableitem_customtable_onboarding_user_memory: Object serialized in file @global\customtableitem.customtable.onboarding_user_memory\b9db133a-fc33-4370-bae9-cbe7ebca3048.xml cannot be deserialized. Deserialization of the following fields failed: [ItemCreatedBy, ], [ItemModifiedBy, ].
Object type ObjectType.customtableitem_customtable_onboarding_user_memory: Object serialized in file @global\customtableitem.customtable.onboarding_user_memory\ceb75057-4c7c-45f4-8a16-8a5a1429f655.xml cannot be deserialized. Deserialization of the following fields failed: [ItemCreatedBy, ], [ItemModifiedBy, ].
Object type ObjectType.customtableitem_customtable_onboarding_user_memory: Object serialized in file @global\customtableitem.customtable.onboarding_user_memory\df1dc58f-4fdf-4a6e-8c62-63ecbef472ad.xml cannot be deserialized. Deserialization of the following fields failed: [ItemCreatedBy, ], [ItemModifiedBy, ].
Object type ObjectType.customtableitem_customtable_onboarding_user_memory: Object serialized in file @global\customtableitem.customtable.onboarding_user_memory\e0105d1c-0214-4c6c-906e-de6a073b9c64.xml cannot be deserialized. Deserialization of the following fields failed: [ItemCreatedBy, ], [ItemModifiedBy, ].
Object type ObjectType.customtableitem_customtable_onboarding_user_memory: Object serialized in file @global\customtableitem.customtable.onboarding_user_memory\e146a6de-a73c-4cd8-98af-e185e566e873.xml cannot be deserialized. Deserialization of the following fields failed: [ItemCreatedBy, ], [ItemModifiedBy, ].
Message: Restoration of object type "User" failed during objects' deletion. See inner exception for further details.

Exception type: CMS.ContinuousIntegration.ObjectTypeSerializationException
Stack trace:
   at CMS.ContinuousIntegration.Internal.FileSystemRestoreAllJob.TryRun(Action`2 method, String objectType, CancellationToken cancellationToken, String exceptionMessageFormat)
   at CMS.ContinuousIntegration.Internal.FileSystemRestoreAllJob.<>c__DisplayClassb.<RunInternal>b__3(String objectType)
   at CMS.ContinuousIntegration.Internal.AbstractFileSystemJob.CancellableForEach[T](CancellationToken cancellationToken, IEnumerable`1 collection, Action`2 action)
   at CMS.ContinuousIntegration.Internal.AbstractFileSystemJob.CancellableForEach[T](CancellationToken cancellationToken, IEnumerable`1 collection, Action`1 action)
   at CMS.ContinuousIntegration.Internal.FileSystemRestoreAllJob.RunInternal(CancellationToken cancellationToken)
   at CMS.ContinuousIntegration.Internal.AbstractFileSystemAllJob.Run(Nullable`1 cancellationToken)

Message: Deletion of object type "User" (cms.user) failed for object "Global Administrator" (UserID: 53). See inner exception for further details.

Exception type: CMS.ContinuousIntegration.ObjectTypeSerializationException
Stack trace:
   at CMS.ContinuousIntegration.Internal.FileSystemDeleteObjectsByTypeJob.DeleteObjectBase(String objectType, BaseInfo info, ISet`1 mainFilesLocations, String logMessageFormat, Queue`1 notDeletedObjects)
   at CMS.ContinuousIntegration.Internal.FileSystemDeleteObjectsByTypeJob.<>c__DisplayClass3.<ProcessDeletedObjects>b__1(BaseInfo info)
   at CMS.ContinuousIntegration.Internal.AbstractFileSystemJob.CancellableForEach[T](CancellationToken cancellationToken, IEnumerable`1 collection, Action`2 action)
   at CMS.ContinuousIntegration.Internal.AbstractFileSystemJob.CancellableForEach[T](CancellationToken cancellationToken, IEnumerable`1 collection, Action`1 action)
   at CMS.ContinuousIntegration.Internal.FileSystemDeleteObjectsByTypeJob.ProcessDeletedObjects(String objectType, ISet`1 repositoryLocations, CancellationToken cancellationToken)
   at CMS.ContinuousIntegration.Internal.FileSystemDeleteObjectsByTypeJob.RunInternal(String objectType, ISet`1 fileLocations, CancellationToken cancellationToken)
   at CMS.ContinuousIntegration.Internal.FileSystemRestoreObjectsByTypeInternalJob.RunDeleteObjectsByTypeJob()
   at CMS.ContinuousIntegration.Internal.FileSystemRestoreAllJob.DeleteAndDispose(String objectType, CancellationToken cancellationToken)
   at CMS.ContinuousIntegration.Internal.FileSystemRestoreAllJob.TryRun(Action`2 method, String objectType, CancellationToken cancellationToken, String exceptionMessageFormat)

Message: The default object of object type "cms.user" cannot be deleted.

Exception type: System.Exception
Stack trace:
   at CMS.DataEngine.ObjectDependenciesRemover.ProcessRemoveDependency(BaseInfo infoObj, Boolean getAll, IWhereCondition baseWhere, DependencyReference dependencyReference, HashSet`1 processed)
   at CMS.DataEngine.ObjectDependenciesRemover.GetRemoveDependenciesList(BaseInfo infoObj, Boolean getAll, IWhereCondition baseWhere, HashSet`1 processed)
   at CMS.DataEngine.ObjectDependenciesRemover.RemoveObjectDependenciesAuto(BaseInfo infoObj, Boolean deleteAll, Boolean clearCache)
   at CMS.DataEngine.ObjectDependenciesRemover.RemoveObjectDependencies(BaseInfo infoObj, Boolean deleteAll, Boolean clearCache)
   at CMS.Membership.UserInfo.RemoveObjectDependencies(Boolean deleteAll, Boolean clearHashtables)
   at CMS.DataEngine.AbstractInfoBase`1.DeleteData()
   at CMS.DataEngine.AbstractInfoProvider`3.DeleteInfo(TInfo info)
   at CMS.Membership.UserInfoProvider.DeleteUserInternal(UserInfo userObj)
   at CMS.Membership.UserInfo.DeleteObject()
   at CMS.DataEngine.BaseInfo.Delete()
   at CMS.ContinuousIntegration.Internal.FileSystemDeleteObjectsByTypeJob.DeleteObject(BaseInfo obj, RepositoryLocationsCollection objectLocations, ISet`1 repositoryLocations, String logMessageFormat)
   at CMS.ContinuousIntegration.Internal.FileSystemDeleteObjectsByTypeJob.DeleteObjectBase(String objectType, BaseInfo info, ISet`1 mainFilesLocations, String logMessageFormat, Queue`1 notDeletedObjects)

Recent Answers


Wojciech Małek answered on September 28, 2017 13:30

I think I wouldn't trust such sources that wants to delete Global Admin. I would rather ask what author of those changes wanted to achieve.

0 votesVote for this answer Mark as a Correct answer

Trevor Fayas answered on September 28, 2017 14:15

It is very odd that someone deleted global administrator. For the interum, take your instance that has global admin, in continuous integration serialize all objects, push your global admin user XML file up to GitHub and then try to pull down and full restore. Should get you back going, also may want to look it for some reason that file was just not pushed in the initial ci push. Git is usually good about not missing the files but it's definitely possible.

Are you using visual studio online tfs or GitHub though, because visual studio online tfs skips user and class objects and you need special ignore files to include them.

0 votesVote for this answer Mark as a Correct answer

Lance Keay answered on September 28, 2017 19:20

@Woj - I just dumped all the objects, and by default, it delete the Global Admin! I don't think that there were any changes. But when you turn on CI and serialize all objects, this is what happens!

Thanks for the help guys. I ended up editing the repository.config file and only choosing some of the objects that I was interested in - templates, pages, etc. Now it only takes about 30 seconds to run, rather than 15min and failing.

@trev - We are using Github - I don't think I was missing files. I think serializing all objects, committing them to github then running ContinuousIntegration.exe -r without a modified .config file was what caused the error.

I would have expected that Kentico would have gracefully ignored attempting to delete objects that are not allowed to be deleted.

0 votesVote for this answer Mark as a Correct answer

Trevor Fayas answered on September 28, 2017 19:24

Very odd, glad you resolve it Lance, we have a CI integration site and although a bit of a learning curve with getting the repositories right, haven't ran into that issue.

0 votesVote for this answer Mark as a Correct answer

Michael Fernandez answered on December 1, 2017 00:59

I just ran into the same issue, but made no edits to the repository config file. I'm not certain what is causing this issue, going to try the above recommended solution.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.