WikiTransformationProject / wikitraccs-releases

Releases, issues and discussions for WikiTraccs from the Wiki Transformation Project
https://www.wikitransformationproject.com
10 stars 1 forks source link

WikiTracs exception #49

Closed Alin-Dumitrescu closed 1 year ago

Alin-Dumitrescu commented 1 year ago

Hello,

I am evaluating WikiTracs for a confluence site migration to SharePoint. I am getting the following error in the log - how do we fix it?

Thanks, Alin

[036 01:22:19 WRN 331773582 sre] [https://confluence.bbpd.io] Got an error, applying again without files and and only an empty page (error: Microsoft.SharePoint.Client.ServerException: The specified user first.last@domain.com could not be found. at Microsoft.SharePoint.Client.ClientRequest.ProcessResponseStream(Stream responseStream) at Microsoft.SharePoint.Client.ClientRequest.ProcessResponse() at Microsoft.SharePoint.Client.ClientRequest.ExecuteQueryToServerAsync(ChunkStringBuilder sb) at Microsoft.SharePoint.Client.ClientRequest.ExecuteQueryAsync() at Microsoft.SharePoint.Client.ClientRuntimeContext.ExecuteQueryAsync() at Microsoft.SharePoint.Client.ClientContext.ExecuteQueryAsync() at Microsoft.SharePoint.Client.ClientContextExtensions.ExecuteQueryImplementation(ClientRuntimeContext clientContext, Int32 retryCount, String userAgent) in //src/lib/PnP.Framework/Extensions/ClientContextExtensions.cs:line 172 at Microsoft.SharePoint.Client.ClientContextExtensions.ExecuteQueryRetry(ClientRuntimeContext clientContext, Int32 retryCount, String userAgent) in //src/lib/PnP.Framework/Extensions/ClientContextExtensions.cs:line 97 at PnP.Framework.Provisioning.ObjectHandlers.Utilities.ListItemUtilities.UpdateListItem(ListItem item, TokenParser parser, IDictionary2 valuesToSet, ListItemUpdateType updateType, Boolean SkipExecuteQuery) in /_/src/lib/PnP.Framework/Provisioning/ObjectHandlers/Utilities/ListItemUtilities.cs:line 408 at PnP.Framework.Provisioning.ObjectHandlers.ObjectFiles.SetFileProperties(File file, IDictionary2 properties, TokenParser parser, Boolean checkoutIfRequired) in //src/lib/PnP.Framework/Provisioning/ObjectHandlers/ObjectFiles.cs:line 347 at PnP.Framework.Provisioning.ObjectHandlers.ObjectFiles.ProvisionObjects(Web web, ProvisioningTemplate template, TokenParser parser, ProvisioningTemplateApplyingInformation applyingInformation) in //src/lib/PnP.Framework/Provisioning/ObjectHandlers/ObjectFiles.cs:line 228 at PnP.Framework.Provisioning.ObjectHandlers.SiteToTemplateConversion.ApplyRemoteTemplate(Web web, ProvisioningTemplate template, ProvisioningTemplateApplyingInformation provisioningInfo, Boolean calledFromHierarchy, TokenParser tokenParser) in /_/src/lib/PnP.Framework/Provisioning/ObjectHandlers/SiteToTemplateConversion.cs:line 455 at WikiTraccs.Shared.Stores.SPO.SpoStoreBase.<>c__DisplayClass16_1.sNXrpbdp3R() at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location --- at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) --- End of stack trace from previous location --- at WikiTraccs.Shared.Stores.SPO.SpoStoreBase.ApplyProvisioningTemplateAsync(ConfluenceDataContext cfContext, PnPContext pnpContext, ProvisioningTemplate provisioningTemplate, CancellationToken cancellationToken) at WikiTraccs.Console.Stores.SPO.SpoContentStore.StoreInSpoAsync(TransformationContext trafoCtx, ProvisioningRequest provisioningRequest, CancellationToken cancellationToken) at WikiTraccs.Console.Registries.ConfluenceContentRegistry.StoreInSpoAsync(TransformationContext trafoCtx, ProvisioningRequest provisioningRequest, CancellationToken cancellationToken) in /home/runner/work/wikitraccs-code/wikitraccs-code/WikiTraccs.Console/Registries/ConfluenceUserRegistry.cs:line 139) | WikiTraccs.Console.Registries.ConfluenceContentRegistry

heinrich-ulbricht commented 1 year ago

@Alin-Dumitrescu Thank you for raising this issue and providing the helpful log excerpt.

One question up-front: did you configure a user mapping or did you start the migration without a user mapping in place (which, in general, should be fine)?

I assume "first.last@domain.com" is an anonymized name and I'll keep referring to this anonymized user name. When checking things, please check for the real name instead.

According the log there is a user - first.last@domain.com - that WikiTraccs tries to set as author or editor for a migrated attachment file in SharePoint. But this user cannot be found by WikiTraccs and it rejects to migrate the whole page.

There could be multiple reasons:

Could you verify that the user first.last@domain.com exists in the SharePoint site? The easiest way to check is this:

Does this work?

User mapping is no easy task and issues are common. My gut tells me that WikiTraccs shouldn't fail to migrate the whole page in this case but rather log a warning about the missing user. Would that be your expectation, too?

Alin-Dumitrescu commented 1 year ago

We do not have a user mapping and the user doesn’t exist in the destination. We have likely hundred of users that do not exist and the expectation would be that the pages would be migrated without that info or using a default account. But the error message says the pages are created empty...

Thank you, Alin Dumitrescu Azure DevOps Consultant phone (425) 279-3465

From: Heinrich Ulbricht @.> Sent: Friday, May 26, 2023 1:05 AM To: WikiTransformationProject/wikitraccs-releases @.> Cc: Alin Dumitrescu @.>; Mention @.> Subject: Re: [WikiTransformationProject/wikitraccs-releases] WikiTracs exception (Issue #49)

@Alin-Dumitrescuhttps://github.com/Alin-Dumitrescu Thank you for raising this issue and providing the helpful log excerpt.

One question up-front: did you configure a user mappinghttps://www.wikitransformationproject.com/blog/2023/01/01/mapping-principals-and-migrating-permissions/#mapping-confluence-users-and-groups-to-sharepoint or did you start the migration without a user mapping in place (which, in general, should be fine)?

I assume you anonymized the user @.**@.> and I'll keep referring to this user name. When checking things, please check for the real, unanonymized user instead.

According the log there is a user - @.**@.> - that WikiTraccs tries to set as author or editor for a migrated attachment file in SharePoint. But this user cannot be found by WikiTraccs and it rejects to migrate the whole page.

There could be multiple reasons:

Could you verify that the user @.**@.> exists in the SharePoint site? The easiest way to check is this:

Does this work?

User mapping is no easy task and issues are common. My gut tells me that WikiTraccs shouldn't fail to migrate the whole page in this case but rather log a warning about the missing user. Would that be your expectation, too?

— Reply to this email directly, view it on GitHubhttps://github.com/WikiTransformationProject/wikitraccs-releases/issues/49#issuecomment-1563976687, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AETLUKMUZJJW5VPHJBJRN23XIBPZ7ANCNFSM6AAAAAAYPSQRN4. You are receiving this because you were mentioned.Message ID: @.**@.>>

heinrich-ulbricht commented 1 year ago

@Alin-Dumitrescu I'll schedule a release for next week that handles such users differently.

Alin-Dumitrescu commented 1 year ago

Thank you Heinrich,

What about the other issue with the flat entries in the tree page = any thoughts what the problem is?

Thank you, Alin Dumitrescu Azure DevOps Consultant phone (425) 279-3465

From: Heinrich Ulbricht @.> Sent: Saturday, May 27, 2023 9:58 AM To: WikiTransformationProject/wikitraccs-releases @.> Cc: Alin Dumitrescu @.>; Mention @.> Subject: Re: [WikiTransformationProject/wikitraccs-releases] WikiTracs exception (Issue #49)

@Alin-Dumitrescuhttps://github.com/Alin-Dumitrescu I'll schedule a release for next week that handles such users differently.

— Reply to this email directly, view it on GitHubhttps://github.com/WikiTransformationProject/wikitraccs-releases/issues/49#issuecomment-1565595156, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AETLUKMKZDCIL3EEUBGRQUDXIIXALANCNFSM6AAAAAAYPSQRN4. You are receiving this because you were mentioned.Message ID: @.**@.>>

heinrich-ulbricht commented 1 year ago

@Alin-Dumitrescu The latest release v1.3.7 should show a different behavior regarding unresolved user accounts. Please delete all empty placeholder pages in SharePoint and start another Confluence to SharePoint migration. It should now succeed to create the page.

(I'll hop over to #48 for the page tree issue.)