-
-
Notifications
You must be signed in to change notification settings - Fork 872
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
API Bug: File download size and hash mis-match with iOS .heic files #2471
Comments
@thomasfedb
The application is asking you to increase your logging output to help determine why you are getting this error message. To do this, you need to add Once you do this, the reason as to why there is a size and hash mis-match will be visible and it can be determined what to do. If this has only started occurring, 100% most likely there has been an API change, which would make this an API bug, not a bug with this application. Please can you generate the required:
|
Indeed this is a long standing OneDrive API bug: OneDrive/onedrive-api-docs#1532 - which has been over-zealously closed. |
@thomasfedb Please can you provide the debug log with priority so that this can be used in the API bug report. |
@thomasfedb
This was done several times:
Comparing the actual data, using the sample heic files I have found, pre-upload and what was downloaded shows zero difference:
So my outstanding question here for you to answer is this:
I do not own an iOS device - so I cannot test this. The only other item I can think of here is that a local file system is the issue. You are using |
I did generate the log and email it through at the time of reporting the issue. If you haven't received it yet then let me know and I will send it again. Regarding how the |
Nothing has been received and/or blocked or in any spam folder. Please can you resend. You may also need to validate all the received data by also adding
OK .. so this is something that I cannot test - however as of now, when |
@abraunegg Can you confirm the correct email address? |
It is as per: https://github.com/abraunegg/onedrive#reporting-an-issue-or-bug |
I've resent the email just now. |
There are a couple of things going on here based on the debug log:
Evidence:
The reported size online is 3039814 bytes. When the application is processing this JSON we get the following:
The file size as downloaded by the application via the API is 682474 bytes - a dramatic difference - thus this is why the trigger for file size & hash mis-match is being hit. Now one could say where is the evidence that the application is not at fault here. Without looking deeper into the application by using However, in your debug log there are some .heic files that are >4Mb in size, and, when doing a session download, the application writes out all of the chunked bytes that the application is receiving. When the log is analysed for these types of files we get the following JSON:
When this is processed:
We can see here that the application is expecting, based on the JSON, to download a file size of 6887427, however when the OneDrive API session is initiated, the data from the OneDrive API changes 6887427 to 4583414 When the session download chunks have completed, we get the expected size difference detected application response:
So the application is receiving all the API data correctly. The issue here is that the OneDrive API, for .heic files, is stripping data out of the actual file (causing data loss on your data) - and telling this application to download the smaller file that is being provided to the application. |
@thomasfedb Please can you test the following PR:
To run the PR, you need to run the client from the PR build directory:
Now - this PR only impacts debug logging output, it does not change any application fundamentals / comparison as to what is being received via JSON from the OneDrive API and what the OneDrive API sends via the HTTP Transport. Also, this PR, the logging changes are 100% going to be changed with v2.5.0 alpha-0 in the next few weeks, so this is your call here to test the PR | use the PR, however the hash comparison piece is a valid bug in v2.4.25 and will exist until v2.5.0 is released. The bigger aspect here is this is 100% a @microsoft bug with the OneDrive API that is causing data loss and there is nothing I can do to fix this unfortunately. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
Hi. I have been struggling with this issue for some months. I cannot force it to happen, but it happens all the time with files in my camera roll. I did an interesting thing to troubleshoot this. I created a Power Automate flow that copies new files being uploaded to my camera roll and into a /CameraRollCopy folder. This has been running for some weeks now and the interesting thing is that I do not see any errors on that folder. So maybe this is related to how the iOS OneDrive app backups/uploads photos? Or maybe it is related to the fact that this is in this special folder? My folder is called SkyDrive Camera Roll, so you might guess I have been using this for a while (since 2009). And maybe that is the reason? Some compatibility issue on old folders? I will probably try to change the folder some day when I have time for it. However, it could be interesting to learn if others having this issue also have "old" folder names. |
An update: I have now renamed "SkyDrive camera roll" to "Kamerarulle" (Danish) so let's see if that changes anything (I doubt). |
An update: The rename did not change anything. My /CameraRollCopy (see two comments up) syncs fine. Anyone who has ideas on how we can move this forward? Hmm. I think I will capture the traffic on Windows some day to see if the requests are different. |
I have the same problem. My images are uploaded from an iPhone SE 2nd generation to OneDrive using the iOS OneDrive backup feature. In the same folder, JPG and MOV files are downloaded correctly, while some HEIC files cause a mismatch error. I'm not sure if the mismatched files are the ones edited with the iPhone Photo app or if it's random. This issue occurs during the initial synchronization and installation after authenticating with OneDrive version 2.4.25-1+np1 with the command onedrive --monitor
I'm waiting the completion of the first sync for additional info |
@centomila |
You must complain to Microsoft, This is a bug with their platform and there is nothing this client can do to remediate the situation. |
Please raise your issue with this @microsoft bug here: OneDrive/onedrive-api-docs#1723 If this fails - if you have a business account with support, raise a support case with @microsoft - it is a OneDrive Platform Bug |
Describe the bug
When synchronizing
.heic
files appear to have hash and file size mismatch errors similar to the following:Operating System Details
Client Installation Method
From Distribution Package
OneDrive Account Type
Personal
What is your OneDrive Application Version
2.4.25
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'
Local install without multiple access of any sort.
Steps to reproduce the behaviour
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: