Closed rzck closed 3 years ago
Synchronizing of locally edited ms-office files misbehaves too
onedrive --synchronize --sync-shared-folders
onedrive --synchronize --sync-shared-folders
Configuring Global Azure AD Endpoints
Initializing the Synchronization Engine ...
Syncing changes from OneDrive ...
Syncing this OneDrive Business Shared Folder: 1_HW_plans_costs_ONDREJ
Uploading differences of ~/OneDrive
Uploading modified file 1_HW_plans_costs_ONDREJ/testfolder/Text Document.docx ...
Uploading 100% |oooooooooooooooooooooooooooooooooooooooo| DONE IN 00:00:00
ERROR: Microsoft OneDrive API returned an error with the following message:
Error Message: HTTP request returned status code 404 (Not Found)
Error Reason: Item not found
Calling Function: upload()
ERROR: Microsoft OneDrive API returned an error with the following message:
Error Message: HTTP request returned status code 404 (Not Found)
Error Reason: Item not found
Calling Function: upload()
done.
ERROR: An error was returned from OneDrive and the resulting response is not a valid JSON object
ERROR: Increase logging verbosity to assist determining why.
Retry sync count: 1: JSONValue is not an object
Syncing changes from OneDrive ...
Syncing this OneDrive Business Shared Folder: 1_HW_plans_costs_ONDREJ
Downloading file 1_HW_plans_costs_ONDREJ/testfolder/Text Document.docx ... done.
Uploading differences of ~/OneDrive
Uploading new items of ~/OneDrive
Uploading new file ./1_HW_plans_costs_ONDREJ/testfolder/Text Document-ruzovylatitude.docx ...
Uploading 100% |oooooooooooooooooooooooooooooooooooooooo| DONE IN 00:00:01
done.
Uploaded file size does not match local file - upload failure - retrying
Uploading new file ./1_HW_plans_costs_ONDREJ/testfolder/Text Document-ruzovylatitude.docx ...
Uploading 100% |oooooooooooooooooooooooooooooooooooooooo| DONE IN 00:00:00 ^C
@rzck This is not a bug or issue - sorry.
When uploading Microsoft files to OneDrive (and this is more prevalent when using SharePoint Libraries) - Microsoft will take that upload, modify it by adding metadata to it. When they add the metadata, they remove the file, then put it back - its a feature.
As such, this is why:
Unfortunately, the only thing that can be done here is for you to complain to Microsoft. For further details, refer to https://github.com/OneDrive/onedrive-api-docs/issues/935 - but it is interesting that you are seeing this on a 'shared business folder' - but most likely this is coming from a SharePoint site - thus - this is why this issue is impacting you.
@rzck Just to provide extra validation here - if this was a SharePoint site / document library, the code traps this and generates the following message:
This would give you the further details as provided above that links the feature of SharePoint to this particular quirk of using OneDrive and Microsoft documents.
@rzck Closing issue, not a bug, but a feature of OneDrive and SharePoint
eh thanks for the reply Honestly the most annoying thing is with the edited files - as I end up with stuff like textdocument.docx- which remain unchanged textdocument-hostname.docx which is the updated document Guess I can go and complain to Microsoft, hehe *edit: that was rather harsh - thank you very much anyway, at least for the swift reply, I appreciate your work and indeed it is a sharepoint site
@rzck If you are able to reliably reproduce this - even though this is a MS issue, I could develop a PR that tries to work around the stupidity. Would you be able to test this?
@abraunegg Sure, gladly, what does it mean exactly?
@rzck
Sure, gladly, what does it mean exactly?
If I can work out to reproduce this (which I have tried this morning and I cannot) - essentially I would have to make code changes blind for your issue, but test them locally to ensure nothing has broken, then get you to test to see if the issue is worked around.
This really is a Microsoft SharePoint issue which is the root cause here ... it is their bug that should be fixed - or at least the OneDrive API fixed to work around this issue.
That would be cool - if you think it is worth your time, it seems to me it could be a bit corner case... I was unable to reproduce it in cases other than shared folders - sharepoint libraries and personal drive work just fine for me. anyway thanks again
@rzck
That would be cool - if you think it is worth your time, it seems to me it could be a bit corner case...
It is an interesting issue, but not really a corner case - as, a realistic expectation would be that a SharePoint library folder could be shared with a user .. thus, the same issue as what happens (https://github.com/OneDrive/onedrive-api-docs/issues/935) is going to occur. I am just surprised however that this use case has taken up until now to surface.
Anyhow - I can now actually replicate this issue, which means I can also test any fix that I am working on before asking you to validate.
@rzck Please can you test the following PR to hopefully resolve your issue:
git clone https://github.com/abraunegg/onedrive.git
cd onedrive
git fetch origin pull/1352/head:pr1352
git checkout pr1352
./configure; make clean; make;
To run the PR, you need to run the client from the PR build directory:
./onedrive <any options needed>
When running the PR, your version should be: onedrive v2.4.10-24-geb14af1
or greater.
The PR still needs work to clean it up, but, from my testing, this is able to work around the SharePoint bug where uploaded files are modified by Microsoft, thus, technically making your upload void which is the root cause of this issue.
@rzck Any update in being able to test the above fix for your issue?
@abraunegg Sorry for taking it so long. So far I have ecountered this error while building it. I am sorry this is very new to me, so I dont know how to proceed
if [ -f .git/HEAD ] ; then \
git describe --tags > version ; \
else \
echo v2.4.11-dev > version ; \
fi
dmd -w -g -O -J. -L-lcurl -L-lsqlite3 -L-ldl src/config.d src/itemdb.d src/log.d src/main.d src/monitor.d src/onedrive.d src/qxor.d src/selective.d src/sqlite.d src/sync.d src/upload.d src/util.d src/progress.d -ofonedrive
cc: No such file or directory
Error: linker exited with status 255
make: *** [Makefile:101: onedrive] Error 1
@rzck That appears to be a generic error, but most likely due to dependencies not being met.
For OpenSuSE Leap 15, these were:
sudo zypper addrepo --check --refresh --name "D" http://download.opensuse.org/repositories/devel:/languages:/D/openSUSE_Leap_15.0/devel:languages:D.repo
sudo zypper install git libcurl-devel sqlite3-devel D:dmd D:libphobos2-0_81 D:phobos-devel D:phobos-devel-static
For Tumbleweed which you are running, you may need to massage these to work. At a minimum:
Additionally, instead of all the D lang repo's from above, install via the actual DMD RPM file for SuSE: https://s3.us-west-2.amazonaws.com/downloads.dlang.org/releases/2021/dmd-2.096.0-0.openSUSE.x86_64.rpm
I do not have an OpenSuSE environment running at the moment, so unable to give you more direct instructions here
@abraunegg i installed the dmd rpm, it pulled bunch of other dependencies and some of it did it so far uploading new files seem to work editing locally seems to have some troubles I am sorry, will do thorough testing in the evening (it is morning here and I am already late to work) thanks!
@abraunegg Uploading new files to shared folder now works - which it did not before The program throws this warning but goes on:
Uploading new file ./1_HW_plans_costs_ONDREJ/testfolder/testfile3.xlsx ...
Uploading 100% |oooooooooooooooooooooooooooooooooooooooo| DONE IN 00:00:01
done.
WARNING: Uploaded file size does not match local file - skipping upload validation
Syncing this OneDrive Business Shared Folder: 1_HW_plans_costs_ONDREJ
Unfortunately, modifying already added folder does not work ideally. The program throws error, saves changed document locally as "originalfilenam-hostname" and redownloads the original file. Not that bad, as you dont you don't lose any data.
Initializing the Synchronization Engine ...
Syncing changes from OneDrive ...
Syncing this OneDrive Business Shared Folder: 1_HW_plans_costs_ONDREJ
Uploading differences of ~/OneDrive
Uploading modified file 1_HW_plans_costs_ONDREJ/testfolder/testfile3.xlsx ... skipped.
Uploading new items of ~/OneDrive
Uploading new file ./1_HW_plans_costs_ONDREJ/testfolder/testfile3.xlsx ...
Uploading 100% |oooooooooooooooooooooooooooooooooooooooo| DONE IN 00:00:00
ERROR: Microsoft OneDrive API returned an error with the following message:
Error Message: HTTP request returned status code 404 (Not Found)
Error Reason: Item not found
Calling Function: upload()
ERROR: Microsoft OneDrive API returned an error with the following message:
Error Message: HTTP request returned status code 404 (Not Found)
Error Reason: Item not found
Calling Function: upload()
Syncing this OneDrive Business Shared Folder: 1_HW_plans_costs_ONDREJ
Downloading file 1_HW_plans_costs_ONDREJ/testfolder/testfile3.xlsx ... done.
@abraunegg And a verbose output (I ve removed some unimportant lines to increase readability - markedwith three dots)
No user or system config file found, using application defaults
Initializing the OneDrive API ...
Configuring Global Azure AD Endpoints
Opening theUsing 'user' Config Dir: /home/ruza/.config/onedrive
item database ...
All operations will be performed in: /home/ruza/OneDrive
Application version: v2.4.10-26-g49fbc74
Account Type: business
Default Drive ID: b!xxxxxxxxxx
Default Root ID: yyyyyyyyyyy
Remaining Free Space: 1099442188199
Fetching details for OneDrive Root
OneDrive Root exists in the database
Initializing the Synchronization Engine ...
Syncing changes from OneDrive ...
Applying changes of Path ID: yyyyyyyyyyy
Updated Remaining Free Space: 1099442188199
Number of items from OneDrive to process: 0
Attempting to sync OneDrive Business Shared Folders
Syncing this OneDrive Business Shared Folder: 1_HW_plans_costs_ONDREJ
OneDrive Business Shared Folder - Shared By: firstname lastname (firstname@company.domain)
Applying changes of Path ID: zzzzzzzzzzzzzzzzz
OneDrive quota information is set at zero, as this is not our drive id, ignoring
Adding OneDrive root details for processing
Adding OneDrive folder details for processing
Adding 11 OneDrive items for processing from OneDrive folder
Adding 29 OneDrive items for processing from /1_HW_plans_costs_ONDREJ/_old
Adding 13 OneDrive items for processing from /1_HW_plans_costs_ONDREJ/dwg
Adding 17 OneDrive items for processing from /1_HW_plans_costs_ONDREJ/dwg/_old
Adding 4 OneDrive items for processing from /1_HW_plans_costs_ONDREJ/dwg/archicraft xrefs
Adding 4 OneDrive items for processing from /1_HW_plans_costs_ONDREJ/testfolder
Processing 80 OneDrive items to ensure consistent local state
WARNING: Not syncing this OneDrive Business Shared File: treeoflife_dinosauria 2.jpg
OneDrive Business Shared File - Shared By: firstname lastname (firstname.lastname@company.domain)
...
WARNING: Not syncing this OneDrive Business Shared File: 20201010_DMP_ProjectSchedule.pdf
OneDrive Business Shared File - Shared By: firstname lastname (firstname@company.domain)
WARNING: Not syncing this OneDrive Business Shared File: DMP_coop_scheme_2020_0728.xlsx
OneDrive Business Shared File - Shared By: firstname lastname (firstname@company.domain)
Uploading differences of ~/OneDrive
Processing .
The directory has not changed
Processing Microsoft Teams Chat Files
The directory has not changed
...
Processing Microsoft Teams Chat Files/popisky example.png
The file has not changed
Processing Documents
The directory has not changed
Processing Documents/zalando equipment and material list.xlsx
The file has not changed
Processing Documents/zalando equipment and material list1.xlsx
The file has not changed
Processing Documents/test.xlsx
The file has not changed
Processing .
The directory has not changed
Processing 1_HW_plans_costs_ONDREJ
The directory has not changed
Processing 1_HW_plans_costs_ONDREJ/_old
The directory has not changed
Processing 1_HW_plans_costs_ONDREJ/_old/161020 DNP floorplan light tracksV2.dwg
The file has not changed
Processing 1_HW_plans_costs_ONDREJ/_old/playground tunnel costs(2).xlsx
The file has not changed
Processing 1_HW_plans_costs_ONDREJ/_old/playground tunnel costs.xlsx
The file has not changed
Processing 1_HW_plans_costs_ONDREJ/_old/uchyt pro lišty.pdf
The file has not changed
Processing 1_HW_plans_costs_ONDREJ/dwg
The directory has not changed
Processing 1_HW_plans_costs_ONDREJ/dwg/_old
The directory has not changed
Processing 1_HW_plans_costs_ONDREJ/dwg/_old/Dinosauria POP DZS 2.bak
The file has not changed
...
Processing 1_HW_plans_costs_ONDREJ/dwg/_old/Úprava velké VZT-R2_akt_dispozice (1)_XREF.dwg
The file has not changed
Processing 1_HW_plans_costs_ONDREJ/dwg/archicraft xrefs
The directory has not changed
Processing 1_HW_plans_costs_ONDREJ/dwg/archicraft xrefs/Dinosauria ESI podklad.bak
The file has not changed
...
Processing 1_HW_plans_costs_ONDREJ/dwg/archicraft xrefs/Dinosauria POP DZS - nabytek.dwg
The file has not changed
Processing 1_HW_plans_costs_ONDREJ/dwg/210317_PG_LED_tunel.bak
The file has not changed
...
Processing 1_HW_plans_costs_ONDREJ/dwg/Screenshot_2021-03-17 Lxf cz LED profil KLUS PDS4-K černý - B3776.png
The file has not changed
Processing 1_HW_plans_costs_ONDREJ/testfolder
The directory has not changed
Processing 1_HW_plans_costs_ONDREJ/testfolder/Book.xlsx
The file has not changed
Processing 1_HW_plans_costs_ONDREJ/testfolder/HTML File.html
The file has not changed
Processing 1_HW_plans_costs_ONDREJ/testfolder/Spread Sheet Document.xlsx
The file has not changed
Processing 1_HW_plans_costs_ONDREJ/testfolder/testfile3.xlsx
The file last modified time has changed
The file content has changed
Uploading modified file 1_HW_plans_costs_ONDREJ/testfolder/testfile3.xlsx ... skipped.
Skip Reason: Microsoft Sharepoint 'enrichment' after upload issue
See: https://github.com/OneDrive/onedrive-api-docs/issues/935 for further details
Processing 1_HW_plans_costs_ONDREJ/20210215_DMP_Lights_eq_report.xlsx
The file has not changed
Processing 1_HW_plans_costs_ONDREJ/210215_DMP_lighting_plot_1 _lighting_museum_general.pdf
The file has not changed
Processing 1_HW_plans_costs_ONDREJ/210215_DMP_lighting_plot_2_lighting_tracks_positions.pdf
The file has not changed
Processing 1_HW_plans_costs_ONDREJ/210215_DMP_lighting_plot_3_lighting_tracks_heights.pdf
The file has not changed
Processing 1_HW_plans_costs_ONDREJ/2103017_DNP_lighting_plot_4_POP_lights.pdf
The file has not changed
Processing 1_HW_plans_costs_ONDREJ/210315_playground_tunnel_costs.xlsx
The file has not changed
Processing 1_HW_plans_costs_ONDREJ/DMP_lighting_museum_210309-5_playground_tunnel.pdf
The file has not changed
Processing 1_HW_plans_costs_ONDREJ/plot.log
The file has not changed
Uploading new items of ~/OneDrive
Uploading new file ./1_HW_plans_costs_ONDREJ/testfolder/testfile3.xlsx ...
Uploading 0% | | ETA --:--:--:
Uploading 100% |oooooooooooooooooooooooooooooooooooooooo| DONE IN 00:00:00
Fragment upload failed - received an exception response from OneDrive
Retrying fragment upload
Retry to upload fragment failed
File upload session failed - invalid response from OneDrive
Applying changes of Path ID: yyyyyyyyyyy
Updated Remaining Free Space: 1099442188199
Number of items from OneDrive to process: 0
Attempting to sync OneDrive Business Shared Folders
Syncing this OneDrive Business Shared Folder: 1_HW_plans_costs_ONDREJ
OneDrive Business Shared Folder - Shared By: firstname lastname (firstname@company.domain)
Applying changes of Path ID: xxxxxxxxx
OneDrive quota information is set at zero, as this is not our drive id, ignoring
Adding OneDrive root details for processing
Adding OneDrive folder details for processing
Adding 11 OneDrive items for processing from OneDrive folder
Adding 29 OneDrive items for processing from /1_HW_plans_costs_ONDREJ/_old
Adding 13 OneDrive items for processing from /1_HW_plans_costs_ONDREJ/dwg
Adding 17 OneDrive items for processing from /1_HW_plans_costs_ONDREJ/dwg/_old
Adding 4 OneDrive items for processing from /1_HW_plans_costs_ONDREJ/dwg/archicraft xrefs
Adding 4 OneDrive items for processing from /1_HW_plans_costs_ONDREJ/testfolder
Processing 80 OneDrive items to ensure consistent local state
The local item has a different modified time 2021-Mar-19 14:41:32Z when compared to remote modified time 2021-Mar-19 14:43:44Z
The local item has a different hash when compared to remote item hash
Remote item modified time is newer based on UTC time conversion
The local item is out-of-sync with OneDrive, renaming to preserve existing file and prevent data loss: 1_HW_plans_costs_ONDREJ/testfolder/testfile3.xlsx -> 1_HW_plans_costs_ONDREJ/testfolder/testfile3-ruzovylatitude.xlsx
Downloading file 1_HW_plans_costs_ONDREJ/testfolder/testfile3.xlsx ... done.
WARNING: Not syncing this OneDrive Business Shared File: treeoflife_dinosauria 2.jpg
OneDrive Business Shared File - Shared By: firstname lastname (firstname.lastname@company.domain)
...
@rzck
@abraunegg Uploading new files to shared folder now works - which it did not before The program throws this warning but goes on:
Uploading new file ./1_HW_plans_costs_ONDREJ/testfolder/testfile3.xlsx ... Uploading 100% |oooooooooooooooooooooooooooooooooooooooo| DONE IN 00:00:01 done. WARNING: Uploaded file size does not match local file - skipping upload validation Syncing this OneDrive Business Shared Folder: 1_HW_plans_costs_ONDREJ
This is 100% normal for working around the problem caused by SharePoint.
The program throws error, saves changed document locally as "originalfilenam-hostname" and redownloads the original file. Not that bad, as you dont you don't lose any data.
Initializing the Synchronization Engine ... Syncing changes from OneDrive ... Syncing this OneDrive Business Shared Folder: 1_HW_plans_costs_ONDREJ Uploading differences of ~/OneDrive Uploading modified file 1_HW_plans_costs_ONDREJ/testfolder/testfile3.xlsx ... skipped. Uploading new items of ~/OneDrive Uploading new file ./1_HW_plans_costs_ONDREJ/testfolder/testfile3.xlsx ... Uploading 100% |oooooooooooooooooooooooooooooooooooooooo| DONE IN 00:00:00 ERROR: Microsoft OneDrive API returned an error with the following message: Error Message: HTTP request returned status code 404 (Not Found) Error Reason: Item not found Calling Function: upload() ERROR: Microsoft OneDrive API returned an error with the following message: Error Message: HTTP request returned status code 404 (Not Found) Error Reason: Item not found Calling Function: upload() Syncing this OneDrive Business Shared Folder: 1_HW_plans_costs_ONDREJ Downloading file 1_HW_plans_costs_ONDREJ/testfolder/testfile3.xlsx ... done.
This is not normal - and this error message is what occurs when using 'master' and not the PR - refer to this in the PR as my testing results.
Can you please double check that you are running the right binary :) When running the PR version you have to:
./onedrive
make install
. The packager 'may' place the binary in a different path search root which might be taking precedence if the old binary is left on the system.If you are running the right binary / application PR version, can you please send through a verbose debug log as per this process - archive and send via email.
Below is a new test to validate using a XLSX file & your folder structure:
Without --verbose:
./onedrive --confdir '~/.config/onedrive-business-test/' --synchronize --sync-shared-folders
Configuration file successfully loaded
Configuring Global Azure AD Endpoints
Initializing the Synchronization Engine ...
Syncing changes from OneDrive ...
Syncing this OneDrive Business Shared Folder: my-library-folder
Syncing this OneDrive Business Shared Folder: Top Folder
Uploading differences of ~/OneDriveBusinessTest
Uploading modified file my-library-folder/1_HW_plans_costs_ONDREJ/testfolder/testfile3.xlsx ... skipped.
Uploading new items of ~/OneDriveBusinessTest
Uploading modified file ./my-library-folder/1_HW_plans_costs_ONDREJ/testfolder/testfile3.xlsx ... done.
Syncing this OneDrive Business Shared Folder: my-library-folder
Syncing this OneDrive Business Shared Folder: Top Folder
With --verbose:
Using 'user' Config Dir: /home/alex/.config/onedrive-business-test/
Using 'system' Config Dir:
Configuration file successfully loaded
Initializing the OneDrive API ...
Configuring Global Azure AD Endpoints
Opening the item database ...
All operations will be performed in: /home/alex/OneDriveBusinessTest
Application version: v2.4.10-26-g49fbc74
Account Type: business
Default Drive ID: b!bO8V7s9SSk6r7mWHpIjURotN33W1W2tEv3OXV_oFIdQimEdOHR-1So7CqeT1MfHA
Default Root ID: 01WIXGO5V6Y2GOVW7725BZO354PWSELRRZ
Remaining Free Space: 1092356978292
Fetching details for OneDrive Root
OneDrive Root exists in the database
Initializing the Synchronization Engine ...
Syncing changes from OneDrive ...
Applying changes of Path ID: 01WIXGO5V6Y2GOVW7725BZO354PWSELRRZ
Updated Remaining Free Space: 1092356978292
Number of items from OneDrive to process: 0
Attempting to sync OneDrive Business Shared Folders
Syncing this OneDrive Business Shared Folder: my-library-folder
OneDrive Business Shared Folder - Shared By: test user (testuser@mynasau3.onmicrosoft.com)
Applying changes of Path ID: 016ZTNKVQSDBSV7CCGIBGJ2PJ5GE5DAUTG
OneDrive quota information is set at zero, as this is not our drive id, ignoring
Adding OneDrive root details for processing
Adding OneDrive folder details for processing
Adding 1 OneDrive items for processing from OneDrive folder
Adding 1 OneDrive items for processing from /my-library-folder/1_HW_plans_costs_ONDREJ
Adding 1 OneDrive items for processing from /my-library-folder/1_HW_plans_costs_ONDREJ/testfolder
Processing 5 OneDrive items to ensure consistent local state
Syncing this OneDrive Business Shared Folder: Top Folder
OneDrive Business Shared Folder - Shared By: test user
Applying changes of Path ID: 01TZRSBFB37BC7IMQSQZBLGD62FOC65NYE
OneDrive quota information is set at zero, as this is not our drive id, ignoring
Adding OneDrive root details for processing
Adding OneDrive folder details for processing
Adding 1 OneDrive items for processing from OneDrive folder
Number of items from OneDrive to process: 3
Uploading differences of ~/OneDriveBusinessTest
Processing .
The directory has not changed
Processing .
The directory has not changed
Processing my-library-folder
The directory has not changed
Processing my-library-folder/1_HW_plans_costs_ONDREJ
The directory has not changed
Processing my-library-folder/1_HW_plans_costs_ONDREJ/testfolder
The directory has not changed
Processing my-library-folder/1_HW_plans_costs_ONDREJ/testfolder/testfile3.xlsx
The file last modified time has changed
The file content has changed
Uploading modified file my-library-folder/1_HW_plans_costs_ONDREJ/testfolder/testfile3.xlsx ... skipped.
Skip Reason: Microsoft Sharepoint 'enrichment' after upload issue
See: https://github.com/OneDrive/onedrive-api-docs/issues/935 for further details
Processing .
The directory has not changed
Processing Top Folder
The directory has not changed
Processing Top Folder/Document2.docx
The file has not changed
Uploading new items of ~/OneDriveBusinessTest
Requested file to upload exists on OneDrive - local database is out of sync for this file: ./my-library-folder/1_HW_plans_costs_ONDREJ/testfolder/testfile3.xlsx
Requested file to upload is newer than existing file on OneDrive
Uploading modified file ./my-library-folder/1_HW_plans_costs_ONDREJ/testfolder/testfile3.xlsx ... done.
Due to Microsoft Sharepoint 'enrichment' of files, downloading 'enriched' file to ensure local file is in-sync
See: https://github.com/OneDrive/onedrive-api-docs/issues/935 for further details
Applying changes of Path ID: 01WIXGO5V6Y2GOVW7725BZO354PWSELRRZ
Updated Remaining Free Space: 1092356978292
Number of items from OneDrive to process: 0
Attempting to sync OneDrive Business Shared Folders
Syncing this OneDrive Business Shared Folder: my-library-folder
OneDrive Business Shared Folder - Shared By: test user (testuser@mynasau3.onmicrosoft.com)
Applying changes of Path ID: 016ZTNKVQSDBSV7CCGIBGJ2PJ5GE5DAUTG
OneDrive quota information is set at zero, as this is not our drive id, ignoring
Adding OneDrive root details for processing
Adding OneDrive folder details for processing
Adding 1 OneDrive items for processing from OneDrive folder
Adding 1 OneDrive items for processing from /my-library-folder/1_HW_plans_costs_ONDREJ
Adding 1 OneDrive items for processing from /my-library-folder/1_HW_plans_costs_ONDREJ/testfolder
Processing 5 OneDrive items to ensure consistent local state
Syncing this OneDrive Business Shared Folder: Top Folder
OneDrive Business Shared Folder - Shared By: test user
Applying changes of Path ID: 01TZRSBFB37BC7IMQSQZBLGD62FOC65NYE
OneDrive quota information is set at zero, as this is not our drive id, ignoring
Adding OneDrive root details for processing
Adding OneDrive folder details for processing
Adding 1 OneDrive items for processing from OneDrive folder
Number of items from OneDrive to process: 3
As you can see - the modified XLSX file is uploaded without issue.
Please can you double check what binary file you are running to ensure you are running the right version.
@rzck
Also to rule out your are seeing this issue when using --monitor
:
OneDrive monitor interval (seconds): 60
Monitor directory: .
Monitor directory: ./Top Folder
Monitor directory: ./my-library-folder
Monitor directory: ./my-library-folder/1_HW_plans_costs_ONDREJ
Monitor directory: ./my-library-folder/1_HW_plans_costs_ONDREJ/testfolder
Starting a sync with OneDrive
Applying changes of Path ID: 01WIXGO5V6Y2GOVW7725BZO354PWSELRRZ
Updated Remaining Free Space: 1092356978292
Number of items from OneDrive to process: 0
Attempting to sync OneDrive Business Shared Folders
Syncing this OneDrive Business Shared Folder: my-library-folder
OneDrive Business Shared Folder - Shared By: test user (testuser@mynasau3.onmicrosoft.com)
Applying changes of Path ID: 016ZTNKVQSDBSV7CCGIBGJ2PJ5GE5DAUTG
OneDrive quota information is set at zero, as this is not our drive id, ignoring
Adding OneDrive root details for processing
Adding OneDrive folder details for processing
Adding 1 OneDrive items for processing from OneDrive folder
Adding 1 OneDrive items for processing from /my-library-folder/1_HW_plans_costs_ONDREJ
Adding 1 OneDrive items for processing from /my-library-folder/1_HW_plans_costs_ONDREJ/testfolder
Processing 5 OneDrive items to ensure consistent local state
Syncing this OneDrive Business Shared Folder: Top Folder
OneDrive Business Shared Folder - Shared By: test user
Applying changes of Path ID: 01TZRSBFB37BC7IMQSQZBLGD62FOC65NYE
OneDrive quota information is set at zero, as this is not our drive id, ignoring
Adding OneDrive root details for processing
Adding OneDrive folder details for processing
Adding 1 OneDrive items for processing from OneDrive folder
Number of items from OneDrive to process: 3
Uploading differences of ~/OneDriveBusinessTest
Processing .
The directory has not changed
Processing .
The directory has not changed
Processing my-library-folder
The directory has not changed
Processing my-library-folder/1_HW_plans_costs_ONDREJ
The directory has not changed
Processing my-library-folder/1_HW_plans_costs_ONDREJ/testfolder
The directory has not changed
Processing my-library-folder/1_HW_plans_costs_ONDREJ/testfolder/testfile3.xlsx
The file has not changed
Processing .
The directory has not changed
Processing Top Folder
The directory has not changed
Processing Top Folder/Document2.docx
The file has not changed
Uploading new items of ~/OneDriveBusinessTest
Applying changes of Path ID: 01WIXGO5V6Y2GOVW7725BZO354PWSELRRZ
Updated Remaining Free Space: 1092356978292
Processing 1 OneDrive items to ensure consistent local state due to a full scan being requested
Attempting to sync OneDrive Business Shared Folders
Syncing this OneDrive Business Shared Folder: my-library-folder
OneDrive Business Shared Folder - Shared By: test user (testuser@mynasau3.onmicrosoft.com)
Applying changes of Path ID: 016ZTNKVQSDBSV7CCGIBGJ2PJ5GE5DAUTG
OneDrive quota information is set at zero, as this is not our drive id, ignoring
Adding OneDrive root details for processing
Adding OneDrive folder details for processing
Adding 1 OneDrive items for processing from OneDrive folder
Adding 1 OneDrive items for processing from /my-library-folder/1_HW_plans_costs_ONDREJ
Adding 1 OneDrive items for processing from /my-library-folder/1_HW_plans_costs_ONDREJ/testfolder
Processing 5 OneDrive items to ensure consistent local state due to a full scan being requested
Syncing this OneDrive Business Shared Folder: Top Folder
OneDrive Business Shared Folder - Shared By: test user
Applying changes of Path ID: 01TZRSBFB37BC7IMQSQZBLGD62FOC65NYE
OneDrive quota information is set at zero, as this is not our drive id, ignoring
Adding OneDrive root details for processing
Adding OneDrive folder details for processing
Adding 1 OneDrive items for processing from OneDrive folder
Processing 3 OneDrive items to ensure consistent local state due to a full scan being requested
Sync with OneDrive is complete
[M] File changed: my-library-folder/1_HW_plans_costs_ONDREJ/testfolder/testfile3.xlsx
Uploading differences of my-library-folder/1_HW_plans_costs_ONDREJ/testfolder/testfile3.xlsx
Processing .
The directory has not changed
Processing my-library-folder
The directory has not changed
Processing my-library-folder/1_HW_plans_costs_ONDREJ
The directory has not changed
Processing my-library-folder/1_HW_plans_costs_ONDREJ/testfolder
The directory has not changed
Processing my-library-folder/1_HW_plans_costs_ONDREJ/testfolder/testfile3.xlsx
The file last modified time has changed
The file content has changed
Uploading modified file my-library-folder/1_HW_plans_costs_ONDREJ/testfolder/testfile3.xlsx ... skipped.
Skip Reason: Microsoft Sharepoint 'enrichment' after upload issue
See: https://github.com/OneDrive/onedrive-api-docs/issues/935 for further details
Processing .
The directory has not changed
Processing Top Folder
The directory has not changed
Processing Top Folder/Document2.docx
The file has not changed
Uploading new items of my-library-folder/1_HW_plans_costs_ONDREJ/testfolder/testfile3.xlsx
Requested file to upload exists on OneDrive - local database is out of sync for this file: my-library-folder/1_HW_plans_costs_ONDREJ/testfolder/testfile3.xlsx
Requested file to upload is newer than existing file on OneDrive
Uploading modified file my-library-folder/1_HW_plans_costs_ONDREJ/testfolder/testfile3.xlsx ... done.
Due to Microsoft Sharepoint 'enrichment' of files, downloading 'enriched' file to ensure local file is in-sync
See: https://github.com/OneDrive/onedrive-api-docs/issues/935 for further details
[M] File changed: my-library-folder/1_HW_plans_costs_ONDREJ/testfolder/testfile3.xlsx
Uploading differences of my-library-folder/1_HW_plans_costs_ONDREJ/testfolder/testfile3.xlsx
Processing .
The directory has not changed
Processing my-library-folder
The directory has not changed
Processing my-library-folder/1_HW_plans_costs_ONDREJ
The directory has not changed
Modified file uploaded without issue
Now .. if I go back to using the current 'master' - I get this exact scenario you are detailing:
Application Output:
Using 'user' Config Dir: /home/alex/.config/onedrive-business-test/
Using 'system' Config Dir:
Configuration file successfully loaded
Initializing the OneDrive API ...
Configuring Global Azure AD Endpoints
Opening the item database ...
All operations will be performed in: /home/alex/OneDriveBusinessTest
Application version: v2.4.10-19-g6b20478
Account Type: business
Default Drive ID: b!bO8V7s9SSk6r7mWHpIjURotN33W1W2tEv3OXV_oFIdQimEdOHR-1So7CqeT1MfHA
Default Root ID: 01WIXGO5V6Y2GOVW7725BZO354PWSELRRZ
Remaining Free Space: 1092356978293
Fetching details for OneDrive Root
OneDrive Root exists in the database
Initializing the Synchronization Engine ...
Syncing changes from OneDrive ...
Applying changes of Path ID: 01WIXGO5V6Y2GOVW7725BZO354PWSELRRZ
Updated Remaining Free Space: 1092356978293
Number of items from OneDrive to process: 0
Attempting to sync OneDrive Business Shared Folders
Syncing this OneDrive Business Shared Folder: my-library-folder
OneDrive Business Shared Folder - Shared By: test user (testuser@mynasau3.onmicrosoft.com)
Applying changes of Path ID: 016ZTNKVQSDBSV7CCGIBGJ2PJ5GE5DAUTG
OneDrive quota information is set at zero, as this is not our drive id, ignoring
Adding OneDrive root details for processing
Adding OneDrive folder details for processing
Adding 1 OneDrive items for processing from OneDrive folder
Adding 1 OneDrive items for processing from /my-library-folder/1_HW_plans_costs_ONDREJ
Adding 1 OneDrive items for processing from /my-library-folder/1_HW_plans_costs_ONDREJ/testfolder
Processing 5 OneDrive items to ensure consistent local state
Syncing this OneDrive Business Shared Folder: Top Folder
OneDrive Business Shared Folder - Shared By: test user
Applying changes of Path ID: 01TZRSBFB37BC7IMQSQZBLGD62FOC65NYE
OneDrive quota information is set at zero, as this is not our drive id, ignoring
Adding OneDrive root details for processing
Adding OneDrive folder details for processing
Adding 1 OneDrive items for processing from OneDrive folder
Number of items from OneDrive to process: 3
Uploading differences of ~/OneDriveBusinessTest
Processing .
The directory has not changed
Processing .
The directory has not changed
Processing my-library-folder
The directory has not changed
Processing my-library-folder/1_HW_plans_costs_ONDREJ
The directory has not changed
Processing my-library-folder/1_HW_plans_costs_ONDREJ/testfolder
The directory has not changed
Processing my-library-folder/1_HW_plans_costs_ONDREJ/testfolder/testfile3.xlsx
The file last modified time has changed
The file content has changed
Uploading modified file my-library-folder/1_HW_plans_costs_ONDREJ/testfolder/testfile3.xlsx ...
Uploading 100% |oooooooooooooooooooooooooooooooooooooooo| DONE IN 00:00:00
Fragment upload failed - received an exception response from OneDrive
ERROR: Microsoft OneDrive API returned an error with the following message:
Error Message: HTTP request returned status code 404 (Not Found)
Error Reason: Item not found
Calling Function: upload()
Retrying fragment upload
Retry to upload fragment failed
ERROR: Microsoft OneDrive API returned an error with the following message:
Error Message: HTTP request returned status code 404 (Not Found)
Error Reason: Item not found
Calling Function: upload()
File upload session failed - invalid response from OneDrive
done.
ERROR: An error was returned from OneDrive and the resulting response is not a valid JSON object
ERROR: Increase logging verbosity to assist determining why.
Retry sync count: 1: JSONValue is not an object
Syncing changes from OneDrive ...
Applying changes of Path ID: 01WIXGO5V6Y2GOVW7725BZO354PWSELRRZ
Updated Remaining Free Space: 1092356978293
Number of items from OneDrive to process: 0
Attempting to sync OneDrive Business Shared Folders
Syncing this OneDrive Business Shared Folder: my-library-folder
OneDrive Business Shared Folder - Shared By: test user (testuser@mynasau3.onmicrosoft.com)
Applying changes of Path ID: 016ZTNKVQSDBSV7CCGIBGJ2PJ5GE5DAUTG
OneDrive quota information is set at zero, as this is not our drive id, ignoring
Adding OneDrive root details for processing
Adding OneDrive folder details for processing
Adding 1 OneDrive items for processing from OneDrive folder
Adding 1 OneDrive items for processing from /my-library-folder/1_HW_plans_costs_ONDREJ
Adding 1 OneDrive items for processing from /my-library-folder/1_HW_plans_costs_ONDREJ/testfolder
Processing 5 OneDrive items to ensure consistent local state
The local item has a different modified time 2021-Mar-19 19:55:09Z when compared to database modified time 2021-Mar-19 19:51:50Z
The local item has a different hash when compared to database item hash
Remote item modified time is newer based on UTC time conversion
The local item is out-of-sync with OneDrive, renaming to preserve existing file and prevent data loss: my-library-folder/1_HW_plans_costs_ONDREJ/testfolder/testfile3.xlsx -> my-library-folder/1_HW_plans_costs_ONDREJ/testfolder/testfile3-centos7full.xlsx
Downloading file my-library-folder/1_HW_plans_costs_ONDREJ/testfolder/testfile3.xlsx ... done.
Syncing this OneDrive Business Shared Folder: Top Folder
OneDrive Business Shared Folder - Shared By: test user
Applying changes of Path ID: 01TZRSBFB37BC7IMQSQZBLGD62FOC65NYE
OneDrive quota information is set at zero, as this is not our drive id, ignoring
Adding OneDrive root details for processing
Adding OneDrive folder details for processing
Adding 1 OneDrive items for processing from OneDrive folder
Number of items from OneDrive to process: 3
Uploading differences of ~/OneDriveBusinessTest
Processing .
The directory has not changed
Processing .
The directory has not changed
Processing my-library-folder
The directory has not changed
Processing my-library-folder/1_HW_plans_costs_ONDREJ
The directory has not changed
Processing my-library-folder/1_HW_plans_costs_ONDREJ/testfolder
The directory has not changed
Processing my-library-folder/1_HW_plans_costs_ONDREJ/testfolder/testfile3.xlsx
The file has not changed
Processing .
The directory has not changed
Processing Top Folder
The directory has not changed
Processing Top Folder/Document2.docx
The file has not changed
Uploading new items of ~/OneDriveBusinessTest
Uploading new file ./my-library-folder/1_HW_plans_costs_ONDREJ/testfolder/testfile3-centos7full.xlsx ...
Uploading 100% |oooooooooooooooooooooooooooooooooooooooo| DONE IN 00:00:01
done.
Uploaded file size does not match local file - upload failure - retrying
Uploading new file ./my-library-folder/1_HW_plans_costs_ONDREJ/testfolder/testfile3-centos7full.xlsx ...
Uploading 100% |oooooooooooooooooooooooooooooooooooooooo| DONE IN 00:00:01
done.
Uploaded file size does not match local file - upload failure - retrying
Uploading new file ./my-library-folder/1_HW_plans_costs_ONDREJ/testfolder/testfile3-centos7full.xlsx ...
Uploading 100% |oooooooooooooooooooooooooooooooooooooooo| DONE IN 00:00:01
done.
Uploaded file size does not match local file - upload failure - retrying
Uploading new file ./my-library-folder/1_HW_plans_costs_ONDREJ/testfolder/testfile3-centos7full.xlsx ...
Uploading 100% |oooooooooooooooooooooooooooooooooooooooo| DONE IN 00:00:01
done.
Uploaded file size does not match local file - upload failure - retrying
Uploading new file ./my-library-folder/1_HW_plans_costs_ONDREJ/testfolder/testfile3-centos7full.xlsx ...
Uploading 100% |oooooooooooooooooooooooooooooooooooooooo| DONE IN 00:00:01
done.
Uploaded file size does not match local file - upload failure - retrying
Uploading new file ./my-library-folder/1_HW_plans_costs_ONDREJ/testfolder/testfile3-centos7full.xlsx ...
Uploading 100% |oooooooooooooooooooooooooooooooooooooooo| DONE IN 00:00:01
done.
Uploaded file size does not match local file - upload failure - retrying
Uploading new file ./my-library-folder/1_HW_plans_costs_ONDREJ/testfolder/testfile3-centos7full.xlsx ...
Uploading 100% |oooooooooooooooooooooooooooooooooooooooo| DONE IN 00:00:01
done.
Uploaded file size does not match local file - upload failure - retrying
Uploading new file ./my-library-folder/1_HW_plans_costs_ONDREJ/testfolder/testfile3-centos7full.xlsx ...
Uploading 100% |oooooooooooooooooooooooooooooooooooooooo| DONE IN 00:00:01
done.
Uploaded file size does not match local file - upload failure - retrying
Uploading new file ./my-library-folder/1_HW_plans_costs_ONDREJ/testfolder/testfile3-centos7full.xlsx ...
Uploading 100% |oooooooooooooooooooooooooooooooooooooooo| DONE IN 00:00:02
done.
Uploaded file size does not match local file - upload failure - retrying
Uploading new file ./my-library-folder/1_HW_plans_costs_ONDREJ/testfolder/testfile3-centos7full.xlsx ...
Uploading 100% |oooooooooooooooooooooooooooooooooooooooo| DONE IN 00:00:01
done.
Uploaded file size does not match local file - upload failure - retrying
Uploading new file ./my-library-folder/1_HW_plans_costs_ONDREJ/testfolder/testfile3-centos7full.xlsx ...
Uploading 100% |oooooooooooooooooooooooooooooooooooooooo| DONE IN 00:00:01
done.
Uploaded file size does not match local file - upload failure - retrying
Uploading new file ./my-library-folder/1_HW_plans_costs_ONDREJ/testfolder/testfile3-centos7full.xlsx ...
Uploading 100% |oooooooooooooooooooooooooooooooooooooooo| DONE IN 00:00:00 ^C
@rzck Any update in your testing of the PR?
@rzck Any update in your testing of the PR?
@rzck Any update in your testing of the PR?
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.
Hi, I have this issue: when I try to upload changes or newly created files in ms-office format (.xlxs, .docx etc) I got this error:
Uploaded file size does not match local file - upload failure - retrying
onedrive is then stuck with retrying to upload - you have to interrupt syncing manually oddly, the folder is eventually uploaded - I can see it and use it from the Onedrive browser interface No problem like that with other formats (.ods , .pdf, .dwg whatever I tried works just fine) It only happen with shared foldersApplication and Operating System Details:
openSUSE Tumbleweed 20210311, kernel version 5.11.4-1-default
installed from openSUSE official repo
OneDrive Application Version: 2.4.10
OneDrive Application Configuration: Output of
onedrive --display-config
Provide the version of curl you are using:
Is your configured 'sync_dir' a local directory or a network mount point? local
What partition format type does your configured 'sync_dir' reside on? Output of:
lsblk -f
sync_dir resides on nvme0n1p5To Reproduce Steps to reproduce the behavior if not causing an application crash:
onedrive --synchronize --sync-shared-folders
Complete Verbose Log Output A clear and full log of the problem when running the application in the following manner (ie, not in monitor mode):
Bug Report Checklist