-
-
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
Foreign key constraint failure leads to subsequent DELETION of the documents in OneDrive #1605
Comments
@colourful-land The problem here is - the original package is probably also still installed. It is still using the authentication tokens that the newer package created (as they as still valid), and if you are running any service, you might also be hit by #1274 When the application generates this message, it is because the local DB schema has been changed / modified - this is the key piece of information that leads me to the assumption you have an old version of code running in the background as the newer client versions have a DB schema change which was needed to implement certain features. Steps for you to perform:
Once you have done these steps to ensure you do not have an old version installed, please try again. |
@colourful-land |
1. Check if double installation happened@abraunegg dpkg -l shows the latest
I don't remember if I deleted the Ubuntu universal edition so: 2. Make sure only one version onedrive is installedI removed the package, tested that
3. Redo the testThen initialise the synchronise:
Output: debug_output.log finding all files in OneDrive deleted. I hurriedly recovered them from OneDrive's online recycle bin. 4. Redo the test without databaseSo I think maybe it's because the database was dirty. Remove:
Then waited 5 hours but still hasn't finished #1608 , check the log there seem to be an unrelated problem (something look like a timeout). Check the Recycle Bin online and there is no new deletion. means the problem failed to reproduce and I'll close this issue for now. |
@colourful-land
Make sure you manually remove this symbolic link which is created in error by the package .... this should not be created - see: #1274 |
Bug Report Details
Describe the bug
This look like a serious bug. It's a bit long to describe, kindly read on.
Overview
First, the initial synchronisation failed, with "Foreign key constraint failure" when 0.1% of the files are downloaded to an empty target. This is not a big deal itself, software breaks all the time. The following is the real problem:
Then, the user - out of habit - rerun the same commandline to see if any sporatic issue caused the failure, which lead every file not yet synced deleted from the OneDrive server side, that is, 99.9% of the files are gone. It seems
onedrive
thought the previous sync was 100% successful and the fact that 99.9% are missing is that someone deleted them, and ordered the deletion from the server. These can be recovered from Recycle Bin but we can't rely on the intelligence of the user to recover from such a failure.The output and log will be provided below. A right solution to this problem should consider not marking the directory as previously synced if any error occurred.
The initial error
Running onedrive synchronise for the first time with an empty directory as target. Got this error:
This may be related to the content of the specific OneDrive account, so for testing please let me know how to reach you to provide the authorisation code / config to support@mynas.com.au if you find useful.
Note that by using 2.4.13, PR #856 is already applied, which was addressing #851
Application and Operating System Details:
uname -a
Ubuntu 20.04
uname:
Linux thinkpad 5.4.0-42-generic #46-Ubuntu SMP Fri Jul 10 00:24:02 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
no gui.
Personal. Free.
OpenSuSE's build service for Ubuntu.
onedrive --version
onedrive v2.4.13-1~np1
onedrive --display-config
curl --version
curl 7.68.0 (x86_64-pc-linux-gnu) libcurl/7.68.0 OpenSSL/1.1.1f zlib/1.2.11 brotli/1.0.7 libidn2/2.3.0 libpsl/0.21.0 (+libidn2/2.2.0) libssh/0.9.3/openssl/zlib nghttp2/1.40.0 librtmp/2.3
local.
lsblk -f
ext4
OneDrive folder is accessible by mobile devices through their app and another OS X computer but they are not in use when this error occur. Also the error occurred while syncing a folder that is disused for years.
Note: Please generate a full debug log whilst reproducing the issue as per https://github.com/abraunegg/onedrive/wiki/Generate-debug-log-for-support and email to support@mynas.com.au
To Reproduce
Steps to reproduce the behavior if not causing an application crash:
See application log output
Debug Log Output
debug_output_of_the_2nd_run_which_lead_to_99.9%_content_deletion.log
** Application Output** (first run, the one that resulted on foreign-key failure, not the one that deleted 99.9% files):
Bug Report Checklist
The text was updated successfully, but these errors were encountered: