mirror of
https://github.com/open-webui/oikb.git
synced 2026-11-05 01:27:25 +00:00
[GH-ISSUE #53] SharePoint connector: validate --deep crashes with NoneType has no len(); sync reports 0 files for a non-empty library #34
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
open-webui/oikb#34
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @foss-eyay on GitHub (Jun 15, 2026).
Original GitHub issue: https://github.com/open-webui/oikb/issues/53
Environment:
oikb version: 0.3.5 (Docker, ghcr.io/open-webui/oikb)
Open WebUI: v0.9.6 (Docker)
Connector: SharePoint, app-only auth (client secret)
Graph permission: Sites.Read.All (Application type, admin consent granted)
SharePoint permissions: Sites.Read.All (Application type, admin consent granted)
Summary:
For a SharePoint document library that demonstrably contains files,
oikb validate --deepcrashes withobject of type 'NoneType' has no len(), andoikb syncreports 0 files found. Authentication to both Open WebUI and SharePoint succeeds, and the library contents are confirmed readable via Microsoft Graph using the exact same app-only credentials oikb is configured with.Config:
Errors:
The NoneType has no len() appears to indicate the library enumeration returns None (or nothing), which is then passed to len() without a guard. The sync path handles the same empty result more gracefully ("Source is empty"), but the underlying problem looks identical: the connector retrieves no items for this library.
The library is NOT empty — confirmed via Graph with the same credentials:
Site resolves: GET /v1.0/sites/.sharepoint.com:/sites/Wiki
Site has exactly one drive, named Dokumente: GET /v1.0/sites/{site-id}/drives
Drive root contains both file and folder entries: GET /v1.0/sites/{site-id}/drives/{drive-id}/root/children
Nested content also readable: GET /v1.0/sites/{site-id}/drives/{drive-id}/root:/General/Folder%20Intern:/children
So files exist at the library root (not only in subfolders) and are readable with the same app-only token oikb uses — yet oikb retrieves 0.
Ruled out:
Auth/permissions — identical Graph calls succeed with the same credentials; Sites.Read.All (Application) + admin consent.
Wrong drive — the site has only one drive, and it's named Dokumente.
Subfolders/recursion — files exist at the root, so this is not merely a missing-recursion case.
Config scoping — reproduced with no filter, with filter.include: ["General/**"], with --path "General/...", and with config path:. All return 0 files.
Expected:
The connector enumerates and syncs the files in the Dokumente drive; validate --deep should handle an empty result without crashing.
Actual:
0 files; validate --deep crashes on len(None).
Additional docs note (separate, minor):
The SharePoint guide doesn't mention that the connector authenticates via Microsoft Graph and therefore needs Microsoft Graph application permissions (Sites.Read.All) — not only SharePoint-API permissions. Granting just the SharePoint-API permission yields a token with the wrong audience and a generalException on every Graph call, which is confusing to debug. Adding this to the guide would help.
Thank you for creating and maintaining this project ;)
@itstechgaurav commented on GitHub (Jul 6, 2026):
Hey @foss-eyay i am also going through this. Were you able to find the solution?
@foss-eyay commented on GitHub (Aug 3, 2026):
Hi @itstechgaurav, no sorry, I was unable to fix it. So I worked around with a direct graph (and sharepoint) API requests to access my content.