Closed Nijco closed 4 days ago
@Nijco Thanks for the feedback and bug report.
Looking at the code, based on the provided output, it certainly looks like a slight logic error.
Whilst I can correct this, I am unsure of you or me being able to actually reproduce this in a consistent manner to validate the fix.
If you are able to reproduce this consistently, please let me know otherwise I will bug fix straight to 'master'
@Nijco If you are able to reproduce this consistently, please can you test PR #3017 to resolve your issue.
NOTE: You will need to run this PR on all your devices to ensure this bug is not being re-introduced elsewhere by running multiple versions.
First install all the require platform dependencies to build the client on your respective platforms. Please read https://github.com/abraunegg/onedrive/blob/master/docs/install.md#building-from-source---high-level-requirements and then follow correctly for your platform.
Once this is done, to clone the PR to resolve your issue, you can use a script like the following:
#!/bin/bash
PR=3017
rm -rf ./onedrive-pr${PR}
git clone https://github.com/abraunegg/onedrive.git onedrive-pr${PR}
cd onedrive-pr${PR}
git fetch origin pull/${PR}/head:pr${PR}
git checkout pr${PR}
# Configure and Build
./configure --enable-debug --enable-notifications; make clean; make;
./onedrive --version
This script will create a local folder called onedrive-pr3017
with the PR version.
To run the PR, you need to run the client from the PR build directory:
./onedrive <any other options needed>
To install the PR, you will need to perform sudo make install
to install the PR version to your system.
When running the PR, your version should be: onedrive v2.5.3-14-g60403f8
or greater.
Thank you for the quick fix! I was able to reproduce the situation by running mitmproxy and having a script that throws a 401 for a specific file id.
2024-11-28 12:49:38,349 [onedrivegui:2022][fn=read_stdout][INFO] - [nico] Performing a last examination of the most recent online data within Microsoft OneDrive to complete the reconciliation process
2024-11-28 12:49:38,349 [onedrivegui:2022][fn=read_stdout][INFO] - [nico] Fetching /delta response from the OneDrive API for Drive ID: [**]
2024-11-28 12:49:38,488 [onedrivegui:2022][fn=read_stdout][INFO] - [nico] Processing API Response Bundle: 1 - Quantity of 'changes|items' in this bundle to process: 0
2024-11-28 12:49:38,490 [onedrivegui:2022][fn=read_stdout][INFO] - [nico] Finished processing /delta JSON response from the OneDrive API
2024-11-28 12:49:38,491 [onedrivegui:2022][fn=read_stdout][INFO] - [nico] No changes or items that can be applied were discovered while processing the data received from Microsoft OneDrive
2024-11-28 12:49:38,493 [onedrivegui:2022][fn=read_stdout][INFO] - [nico] Failed items to download to/from Microsoft OneDrive: 1
** 2024-11-28 12:49:38,493 [onedrivegui:2022][fn=read_stdout][INFO] - [nico] Failed to download: Hörbücher/my-text.txt
2024-11-28 12:49:38,493 [onedrivegui:2022][fn=read_stdout][INFO] - [nico] Sync with Microsoft OneDrive has completed, however there are items that failed to sync.
2024-11-28 12:49:38,494 [onedrivegui:2022][fn=read_stdout][INFO] - [nico] To fix any download failures you may need to perform a --resync to ensure this system is correctly synced with your Microsoft OneDrive Account
The file is not deleted online anymore :tada: When syncing again on the same machine, it is also not downloaded again, but when the file download error occurs the output here says resync might be necessary and the gui gives a warning, so I guess this is fixed. :)
@Nijco Thanks for the confirmation - will mark this as fixed and merge into 'master'
Describe the bug
First of all: Abraunegg, thank you so much for this awesome project!
Now to my Issue: I changed a text file on one of my devices, synced that change to onedrive. When I started onedrive on my other device, the download of that updated file failed. That seemingly caused the file to be deleted locally on that device, and this was later propagated to onedrive and my other devices.
Here is the relevant log of the device where the download failed, the relevant file is 'Edumedia/hsh/greenit/notes.md', seemingly especially relevant lines marked with '**':
A few hours later I synced with my other device, and the file was deleted:
I really hope this is enough info to track down the problem. Thank you.
Operating System Details
Client Installation Method
From 3rd Party Source (PPA, OpenSuSE Build Service etc)
OneDrive Account Type
Personal
What is your OneDrive Application Version
onedrive v2.5.3
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 use onedrive one to Linux PCs, both with the same setup:
Steps to reproduce the behaviour
I don't know why the download of the file failed, which lead to this. As far as I can tell, OneDrive API wanted me to login again? And gave my a 401 because of that?
Complete Verbose Log Output
Screenshots
No response
Other Log Information or Details
No response
Additional context
No response