-
-
Notifications
You must be signed in to change notification settings - Fork 871
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OneDrive API Bug: OneDrive API inconsistency - the file does not have any hash #2433
Comments
Same here, but it also occurs during |
Just adding another observation, The client is still uploading changed files and it also downloads files I manually upload to OneDrive through the web interface. So it doesn't seem to stop the client from working, at least not for the few files I tested. |
This is NOT a bug with this application, but a BUG with the OneDrive API. The content being provided by @microsoft by their OneDrive API is being inconsistent - and the files that are reporting this error message have no hash as provided by the API. Essentially - for these files - they have no hash, and in the v2.4.23 application, the file item would have just been stored without a hash, making any file comparison for that file impossible - leading to all of unpredictable of situations. This is NOT a bug I can solve for - if the OneDrive API data does not contain the hash values - I cant fix that. @ificator , @microsoft I have evidenced this in debug logs as per below: Please urgently fix the OneDrive API |
Thanks for clearing this up 😄 At the moment only |
Those logs are for a business account, which has never has If you have logs for a consumer user I can definitely drill in. |
@ificator It appears to be only OneDrive Business Accounts at the moment ... it is a valid issue as the file hash is needed to accurately compare above timestamp as to if the file has indeed been modified. It does not stand for reason why, on the same OneDrive Business
Computationally expensive or not - all files should have at least 1 hash available ... not 0 ! I can understand not wanting to compute |
I completely agree - there's no reason we shouldn't have a hash to return. Do you have any idea why your change would have started manifesting this for OneDrive Business? |
Noted .. will update this in the v2.5.x codebase |
Absolutely - in prior releases, there was no warning message printed if there was a hash missing - now it does .. to catch this sort of situation .... so I am guessing that having the hash data missing has been a long standing API bug or problem that has only now just been surfaced. |
Has anyone noticed a pattern with the missing hashes? E.g. specific file types etc? |
I'm not sure how to tell since there's no way to see what file has the missing hash currently. Well, that I know of anyway. |
The snippet of response with the missing hash is for a 0-byte file.. I wonder if that's an edge case where the hash calculation is skipped. |
Potentially .. looking at the log file provided - all of those items are indeed zero size from what I can tell Can you generate a debug log please as per: https://github.com/abraunegg/onedrive/wiki/Generate-debug-log-for-support and email to the support address. |
I think using Edit: I can confirm, that they were not deleted, as per The Recycle Bin of the onedrive web-interface |
I reported this also; you can see that at #2430 (comment). I generated a verbose log as explained in https://github.com/abraunegg/onedrive/wiki/Generate-debug-log-for-support, with
I can't say for sure, but all the files that failed for me that I could track in the file (I had to stop it when it passed 50 Mbyte) are either
Both subtrees are ignored in my configuration, but they still send the delta data (which I think they shouldn't), even if there have been no changes at all. Given that the files I can easily check on my PC are under the
and the used I can confirm that in my case (I repeat, this is only a subset of the files) those are all zero-length files. |
After creating a bunch of empty files, the error message reappears, so I can confirm, that the empty files are the problem on my site |
Well that's an easy fix - I have a very efficient algorithm for generating the hash of a 0-byte file ;) |
And that would be 👀 🕋 (imagine a kappa there) |
But in the example (from my log) that @abraunegg posted (thanks!) in OneDrive/onedrive-api-docs#1704 (comment), it seems that one the file has non-zero length... let me check. Ah, ok, it seems a cut-and-paste problem --- there is a |
For those that are impacted by this issue, please can you test the following PR:
To run the PR, you need to run the client from the PR build directory:
To install the PR, you will need to perform When running the PR, your version should be: |
Were you able to test the PR ? With a slight tweak locally to actually print a message on a known zero byte file .. this PR is known to be working as intended:
The PR version does not output this line: |
I tested it, and it doesn't log any error, it seems to fix it. I also tested downloading on another device, and it worked too. |
I still have some warnings, although much less than before. My problem is:
How do I get from here to the file/directory name? |
So that will take some tracking down. You are getting that message as the file is > 0 in size and has no hash ... so it is a legitimate problem from the OneDrive API The item id is being printed - so this means that the parents of this item are not in the database - thus the path cannot be calculated. If the parents were in the database - the actual path would have been calculated and presented instead of the item id This tells me then that this particular item is potentially being skipped by your configuration. |
Yes, I suppose it's being skipped. The previous warning was for
which are the strange things created by OneNote, I suppose, and that I do not know how to get rid of ;-) |
That warning is for a legitimate file + path - again, has zero hash. It should not be a OneNote item - as they are filtered out - this item has the item type = file and is denoted by the API as such. |
Hrmm .. OK .. will have to look into this as part of v2.5.x work ... they should be filtered out from the get-go |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Describe the bug
I just updated to onedrive v2.4.24 which incorporates the deprecation of the SHA checksum. However, now my logs are full of these lines now:
So it kind of looks like something broke in the hashing.
It's possible these errors are harmless, but I don't know how to tell which files are affected. It's also possible it will give this error just once for every file while it switches over to another checksum algorithm, but if so it should maybe mention that.
I tried a
onedrive --synchronize
operation too which did not have these errors. I usually useonedrive --monitor
though.Operating System Details
$ uname -a Linux goat 6.3.8-arch1-1 #1 SMP PREEMPT_DYNAMIC Wed, 14 Jun 2023 20:10:31 +0000 x86_64 GNU/Linux $ lsb_release -a LSB Version: n/a Distributor ID: Arch Description: Arch Linux Release: rolling Codename: n/a
Client Installation Method
From Distribution Package
OneDrive Account Type
Business | Office365
What is your OneDrive Application Version
onedrive v2.4.24
What is your OneDrive Application Configuration
What is your 'curl' version
Where is your 'sync_dir' located
Local
What are all your system 'mount points'
What are all your local file system partition types
How do you use 'onedrive'
I have the client on my laptop and on my desktop. They are never in operation at the same time.
Steps to reproduce the behaviour
Start onedrive client in a user SystemD service using onedrive --monitor
Observe errors in the logs
Complete Verbose Log Output
Screenshots
No response
Other Log Information or Details
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: