Skip to content
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

Synchronization fails with 'The parent item is not in the local database' #139

Closed
dleslie opened this issue Aug 25, 2018 · 9 comments
Closed
Labels
Bug Something isn't working Fixed

Comments

@dleslie
Copy link

dleslie commented Aug 25, 2018

Bug Report Details

Describe the bug
The execution of synchronize prematurely halts due to an unhandled exception.

Application and Operating System Details:

  • OS: Linux dleslie-ThinkPad-X140e 4.15.0-30-generic Make command during installation encounters error 127 #32-Ubuntu SMP Thu Jul 26 17:42:43 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
  • Application version: bdc33e6
  • OneDrive Account Type: Family
  • DMD or LDC compiler version dmd --version or ldmd2 --version: DMD64 D Compiler v2.078.2

To Reproduce

#> onedrive --resync --synchronize
Initializing the Synchronization Engine ...
Syncing changes from OneDrive ...
The parent item is not in the local database
Syncing changes from OneDrive ...
The parent item is not in the local database
Syncing changes from OneDrive ...
object.Exception@src/sync.d(1114): The parent item is not in the local database
----------------
??:? pure @safe void std.exception.bailOut!(Exception).bailOut(immutable(char)[], ulong, const(char[])) [0x83044266]
??:? pure @safe bool std.exception.enforce!(Exception, bool).enforce(bool, lazy const(char)[], immutable(char)[], ulong) [0x830c68b9]
??:? void sync.SyncEngine.uploadNewFile(immutable(char)[]) [0x830a854d]
??:? void sync.SyncEngine.uploadNewItems(immutable(char)[]) [0x830a7cda]
??:? void sync.SyncEngine.uploadNewItems(immutable(char)[]) [0x830a7bd1]
??:? void sync.SyncEngine.uploadNewItems(immutable(char)[]) [0x830a7bd1]
??:? void sync.SyncEngine.uploadNewItems(immutable(char)[]) [0x830a7bd1]
??:? void sync.SyncEngine.scanForDifferences(immutable(char)[]) [0x830a68fb]
??:? void main.performSync(sync.SyncEngine, immutable(char)[], bool, bool, bool) [0x8308b737]
??:? _Dmain [0x8308afa7]
@abraunegg
Copy link
Owner

abraunegg commented Aug 25, 2018

This may be the same as #121 which was a local path issue.

Can you please rebuild your client with the following PR which will provide some additional diagnostic information:

git clone https://github.com/abraunegg/onedrive.git
cd onedrive
git fetch origin pull/141/head:pr141
git checkout pr141
make
make install

Once rebuilt, can you provide a full log using this command line:

onedrive --synchronize --verbose --debug-https

and email to support@mynas.com.au for analysis

@dleslie
Copy link
Author

dleslie commented Aug 26, 2018

My apologies, but I'm not too comfortable with that, the log is full of private information.

@abraunegg
Copy link
Owner

OK .. can you go through the resulting log and post (via email) the following:

  1. Full path which is failing the check
  2. The HTTP responses where the path is checked on OneDrive & it's returning response
  3. The response of the database

That should trim down the data & allow you to sanitize the details to the extent that your happy.

@abraunegg
Copy link
Owner

Additionally, anything that you do send me is protected by the following legislation: Privacy and Data Protection Act 2014 (Vic)
(http://www8.austlii.edu.au/cgi-bin/viewdb/au/legis/vic/num_act/padpa201460o2014317/)

abraunegg added a commit that referenced this issue Aug 26, 2018
* Initial fix for #139 where data cannot be uploaded / saved to the local database because there are folders in the same path with the same name due to case sensitivity issues
@abraunegg
Copy link
Owner

@dleslie
Based on the work I was doing for #121, please can you test this branch:

git clone https://github.com/abraunegg/onedrive.git
cd onedrive
git fetch origin pull/143/head:pr143
git checkout pr143
make
make install

I suspect that you have the following 'somewhere':

/my/path/to/files/file1.txt
/my/path/to/Files/file1.txt

Note the differences between 'files' and 'Files'

On Linux, this is no issue. For OneDrive, it is the same:

https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file

Do not assume case sensitivity. For example, consider the names OSCAR, Oscar, and oscar to be the same, even though some file systems (such as a POSIX-compliant file system) may consider them as different. Note that NTFS supports POSIX semantics for case sensitivity but this is not the default behavior.

I suspect it is this that is causing the crash, which PR 143 should resolve.

@abraunegg abraunegg added In Progress Currently being worked on and removed Investigating labels Aug 26, 2018
@abraunegg abraunegg changed the title Exception causing Sync to halt Synchronization fails with 'The parent item is not in the local database' Aug 26, 2018
abraunegg added a commit that referenced this issue Aug 26, 2018
* Fix correctly handle file case sensitivity issues in same folder by using the same mechanism as Issue #139
@abraunegg
Copy link
Owner

@dleslie
Any further update on this issue?

abraunegg added a commit that referenced this issue Aug 27, 2018
…143)

* Resolve 'The parent item is not in the local database' where data cannot be uploaded / saved to the local database because there are folders in the same path with the same name due to case sensitivity issues
@abraunegg
Copy link
Owner

PR merged

@abraunegg abraunegg added Fixed and removed In Progress Currently being worked on labels Aug 27, 2018
abraunegg added a commit that referenced this issue Aug 27, 2018
…(Issue #146) (#147)

* Resolve to correctly handle file case sensitivity issues in same folder by using the same mechanism as Issue #139
@dleslie
Copy link
Author

dleslie commented Aug 27, 2018

Yes, that worked. Thank-you! 💯

@lock
Copy link

lock bot commented Jan 5, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Jan 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Something isn't working Fixed
Projects
None yet
Development

No branches or pull requests

2 participants