You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
LoadListDataAsStreamAsync: System.InvalidOperationException: The requested operation requires an element of type 'Object', but the target element has type 'String'.
#1588
We have a SharePoint Online document library and for some documents the function "LoadListDataAsStream" runs into an error.
The problem seems to be related to the the metadata fields of the documents.
Unlike issue #1365 we don't use any image field data or location field data.
The error message is System.InvalidOperationException:
'The requested operation requires an element of type 'Object', but the target element has type 'String'.'
And the stacktrace of the error is:
at System.Text.Json.ThrowHelper.ThrowJsonElementWrongTypeException(JsonTokenType expectedType, JsonTokenType actualType)
at System.Text.Json.JsonElement.EnumerateObject()
at PnP.Core.Model.SharePoint.ListDataAsStreamHandler.TransformRowData(JsonElement row, IFieldCollection fields, Dictionary`2 fieldLookupCache)
at PnP.Core.Model.SharePoint.ListDataAsStreamHandler.d__1.MoveNext()
at PnP.Core.Model.SharePoint.List.d__198.MoveNext()
at PnP.Core.Model.SharePoint.List.LoadListDataAsStream(RenderListDataOptions renderOptions)
Steps to reproduce
Since the error is specific to documents within our company and without knowing what the underlying problem is, I can't provide steps to reproduce.
Category
Describe the bug
We have a SharePoint Online document library and for some documents the function "LoadListDataAsStream" runs into an error.
The problem seems to be related to the the metadata fields of the documents.
Unlike issue #1365 we don't use any image field data or location field data.
We call the function like this:
The ViewXML looks like this:
The error message is System.InvalidOperationException:
And the stacktrace of the error is:
Steps to reproduce
Since the error is specific to documents within our company and without knowing what the underlying problem is, I can't provide steps to reproduce.
Expected behavior
Loading the list items without an error.
Environment details (development & target environment)
Additional context
We are migrating documents from SharePoint 2019 to SharePoint Online.
The text was updated successfully, but these errors were encountered: