stylus
stylus copied to clipboard
[Bug] OneDrive for Business cloud sync: failed to fetch [404]
Bug Report
Bug Description
Error when trying to sync Stylus to OneDrive for Business:
failed to fetch [404]: {
"error": {
"code": "itemNotFound",
"message": "Item not found",
"innerError": {
"date": "2021-10-29T03:17:18",
"request-id": "a2a6152d-044e-4ab6-b272-50257cc1aaac",
"client-request-id": "a2a6152d-044e-4ab6-b272-50257cc1aaac"
}
}
}
System Information
- OS: macOS 11.6 and macOS 12.0.1
- Browser: Firefox 93.0 M1 and Intel
- Stylus Version: 1.5.21
Additional Context
I have tried Disconnecting/Connecting and clicking the "Sync" button to no difference.
So Stylus requests Files.ReadWrite.AppFolder
permissions.
It looks like OneDrive for business doesn't support this permission.
Note, Business OneDrive accounts do not currently support the
Files.ReadWrite.AppFolder
permission
Although when looking in my own permissions, I see:
Permission description: (Preview) Allows the app to read, create, update and delete files in the application's folder.
So I am not sure if the permission actually exists or not.
That link mentions a second permission, Files.ReadWrite, which is not forbidden in OneDrive Business. @eight04, could you check if it's usable for Stylus?
I think it is usable:
- However, it is a broader permission compared to
Files.ReadWrite.AppFolder
(https://docs.microsoft.com/en-us/onedrive/developer/rest-api/concepts/permissions_reference) - We have to make the root folder customizable.
- Update db-to-cloud to make it accept a custom path. Currently it always operate on
special/approot
: https://github.com/eight04/db-to-cloud/blob/cf3b4f690f0e29d666c1a4f8274e8899dc28e214/lib/drive/onedrive.js#L19