-
-
Notifications
You must be signed in to change notification settings - Fork 868
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
Bug: A database consistency issue has been caught. #3072
Comments
@linkwood17 Essentially, build your client from 'master' and re-test. |
Hello @abraunegg, Still see the application crashing. journal -f shows:
I also could send the full log, but preferable on a private channel |
Please send a complete verbose debug log to the support email address. To generate the verbose debug log, please read: https://github.com/abraunegg/onedrive/wiki/Generate-debug-log-for-support In addition to this, please disable any onedrive systemd service so that it does not interfere with the debug log generation. |
@linkwood17 Let me explain this part. For reference please use the debug log as provided. Your OneDrive Account Drive ID looks like the following: When the Shared Folder is 'Processed' to be created, (reference: Your DriveID: The OneDrive API is dropping the leading zero in their API response. When the Shared Folder gets created (reference
When the 'root' (the remote shared folder) details are retrieved, the correct Drive ID Length is provided: The application failure occurs due to the following:
This is because when the API data for your Shared Folder is generated, it is looking for a DriveID of '024470056f5c3e43' as per the root details, but your 'Shared Folder' details is incorrect from the API response, thus this is why the application is crashing. This OneDrive API bug can potentially be worked around, but I need to think of the flow on impacts. If you have paid support for Microsoft OneDrive, please raise a bug report with them as their API is broken and is the root cause of your issue here. |
@linkwood17 I cannot replicate your issue, thus I need you to test this PR to work around the API Bug. To test the PR, 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:
This script will create a local folder called 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: |
Hi @abraunegg, I've now adapted the config to skip the directory and after a resync the onedrive does not crash anymore. I'm now going to test with your bug fix and tell you the result asap. best regards |
Hi @abraunegg, By the way, the workaround mentioned before with the skiped directory did not work. It took longer to crash but stil it does. Thanks for your help and many regards |
The Shared Folder should be syncing if you have configured it to do so .... The PR version works around the API bug - but the data contents should sync if there is no configuration to exlcude it. |
@linkwood17 |
@linkwood17
As requested I need this debug log from this instance .......
The systemd services will restart itself on failure .. so you have a failure going on. Additionally, when doing debugging and problem analysis, as advised above you must disable any systemd services. |
@linkwood17 Please read #2957 I cannot solve this issue - you MUST speak to Microsoft. |
The 3rd debug log you have provided for the Shared Folder issue is 100% not applicable as it is using the 'master' client version. The client version you are using is still: When running the PR debug version you must:
The PR Client version is Please can you:
|
@linkwood17 Please can you rebuild your PR Client Version and retest client version |
Hello @abraunegg, |
Please can you provide the debug log and/or revalidate the process you are using to build the PR. The script provided above should always delete the old PR directory and pull in the new client version. |
@abraunegg, |
What do you mean by this ? its running, but not running .. but does not stop ... that indicates to me it is working .. ??
The other account has account issues ... that is something this application cannot solve for ..... My advice to you is:
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@linkwood17 Please can you run this PR for an extended period, run multiple times to make sure there are no other issues / side effects from the change done to support the broken Microsoft API response. |
@linkwood17 As such, I have added more validation in the entire application to check for and validate the root cause (OneDrive Personal DriveId Length != 16 characters) and correct it where possible. Please can you test this new PR that has all of this expanded validation. This is 100% different from the existing PR you have been currently testing. Once this is done, to clone the PR to resolve your issue, you can use a script like the following:
This script will create a local folder called 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: If you can provide your response via GitHub or email that would be greatly appreciated. |
@linkwood17 As per the debug log, the extra corrections are being used within the application and with any API query. Please continue to use the updated PR (3081) for your access to Microsoft OneDrive. |
@linkwood17 |
@linkwood17 Please can you:
|
@linkwood17 |
@linkwood17 |
@linkwood17
Line 53 | Line 26 Please can you provide for me the sqlite file that is specified. |
@linkwood17 If it resides on an encrypted partition, please move / unencrypt it before archiving as the file as sent cannot be opened: |
@linkwood17 |
@linkwood17 Please can you rebuild your PR 3081 client. When rebuilt your client version should be |
@linkwood17 |
@linkwood17
|
@linkwood17 Please can you rebuild your client to Also I received zero emails, so please can you check your system. |
@linkwood17 However, this latest crash is happening is that for your main drive, all your Graph API responses are for a lowercase driveid as expected, however, the Graph API responding with uppercase driveid values for your Shared Folder .. which is not correct, and does not align with all the other testing. As such, I have had to tweak the PR yet again to work around this API response issue. Please can you rebuild your client and test |
@linkwood17 The true test of this change to support the API issue will be when this is merged into 'master' |
@linkwood17 I have no knowledge why, in your case (this bug report):
In PR #3081 , the solution is to force everything to lowercase, and, where required, pad any 15 character driveId with zeros. As such, PR #3081 I believe (whilst solving your issue) is potentially the incorrect way to solve this problem and has unknown potential blast radius failure for other users. From https://learn.microsoft.com/
Unfortunately Microsoft does not publicly disclose the exact specifications of the driveId, including its length or character composition for any account type. I can only use historic data (bug reports and other) to determine that usually a Personal Account driveId is 16 characters in length and is usually lowercase. As such, in PR #3081 - forcing any compliance to this (16 characters, lowercase) potentially may have undesired results and impacts. To combat this, I have created PR #3086 to negate some of the forced changes that #3081 performs, whilst still checking and validating the driveId length and case (which is your actual issue with this bug report) Please can you test PR #3086 to help validate that this PR resolves your issue - and, if this does, then this is a much better approach to solving the actual issue as this treats the driveId as immutable identifiers and avoid making assumptions about their format or content. This ensures that the application will continue to function correctly, regardless of any changes Microsoft may make to the driveId structure in the future. To test PR #3086 , you can use a script like the following:
This script will create a local folder called 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 (at this point in time): If you could provide confirmation via email including any debug log if this PR fails to operate correctly that would be greatly appreciated. |
@linkwood17
and
I am going to make a slight logging output change, then will commit this PR to 'master' Many thanks your your assistance and extreme patience with testing the PR releases to get to the right outcome for this issue. |
Describe the bug
Each sync ends up with a database consistency issue has been caught. Resync runs without problems.
I use that ubuntu machine with onedrive to sync two different accounts. The issue is only seen with one account.
Completely setup new ubuntu VM (different ubuntu version and different curl version) and synced from scratch but still have the same problem.
Also tried with ip_protocol_version=1 and force_http_11=true: same problem
Operating System Details
Client Installation Method
From Distribution Package
OneDrive Account Type
Personal
What is your OneDrive Application Version
onedrive v2.5.3-1+np1+1.1
What is your OneDrive Application Configuration
What is your 'curl' version
Where is your 'sync_dir' located
Network
What are all your system 'mount points'
What are all your local file system partition types
How do you use 'onedrive'
I use that VM to "download" the onedrive files to create a backup with a history.
Download only and then I create a daily snapshot.
Steps to reproduce the behaviour
new ubuntu and onedrive installation.
Run the onedrive as a service with your service file.
First run downloads all data properly.
Second run then produces the error.
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: