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

The parent item is not in the local database #121

Closed
fgauvrit opened this issue Aug 14, 2018 · 25 comments
Closed

The parent item is not in the local database #121

fgauvrit opened this issue Aug 14, 2018 · 25 comments
Labels
Bug Something isn't working Fixed Local Environment Issue Cannot locally reproduce issue

Comments

@fgauvrit
Copy link

fgauvrit commented Aug 14, 2018

Bug Report Details

The parent item is not in the local database

Application and Operating System Details:

  • OS: Linux FGA-E6540.HOME 4.4.140-62-default Fix config folder. #1 SMP Tue Jul 17 12:14:34 UTC 2018 (951943d) x86_64 x86_64 x86_64 GNU/Linux (Leap 42.3)
  • Application version: onedrive v2.1.0-5-gf10fa97
  • DMD or LDC compiler version: DMD64 D Compiler v2.081.0n`

To Reproduce
onedrive --upload-only --synchronize --resync

Complete Verbose Log Output

Initializing the Synchronization Engine ...
Syncing changes from local path only - NOT syncing data changes from OneDrive ...
The parent item is not in the local database
Syncing changes from local path only - NOT syncing data changes from OneDrive ...
The parent item is not in the local database
Syncing changes from local path only - NOT syncing data changes from OneDrive ...
object.Exception@src/sync.d(1109): The parent item is not in the local database
----------------
/usr/include/dlang/dmd/std/exception.d:515 pure @safe void std.exception.bailOut!(Exception).bailOut(immutable(char)[], ulong, scope const(char)[]) [0x556442]
??:? pure @safe bool std.exception.enforce!().enforce!(bool).enforce(bool, lazy const(char)[], immutable(char)[], ulong) [0x5f04ad]
src/sync.d:1109 void sync.SyncEngine.uploadNewFile(immutable(char)[]) [0x5c760d]
src/sync.d:1011 void sync.SyncEngine.uploadNewItems(immutable(char)[]) [0x5c6d9a]
src/sync.d:1002 void sync.SyncEngine.uploadNewItems(immutable(char)[]) [0x5c6c91]
src/sync.d:1002 void sync.SyncEngine.uploadNewItems(immutable(char)[]) [0x5c6c91]
src/sync.d:1002 void sync.SyncEngine.uploadNewItems(immutable(char)[]) [0x5c6c91]
src/sync.d:1002 void sync.SyncEngine.uploadNewItems(immutable(char)[]) [0x5c6c91]
src/sync.d:1002 void sync.SyncEngine.uploadNewItems(immutable(char)[]) [0x5c6c91]
src/sync.d:1002 void sync.SyncEngine.uploadNewItems(immutable(char)[]) [0x5c6c91]
src/sync.d:1002 void sync.SyncEngine.uploadNewItems(immutable(char)[]) [0x5c6c91]
src/sync.d:736 void sync.SyncEngine.scanForDifferences(immutable(char)[]) [0x5c59cd]
src/main.d:383 void main.performSync(sync.SyncEngine, immutable(char)[], bool, bool, bool) [0x5a8c9c]
src/main.d:264 _Dmain [0x5a85c7]
@abraunegg
Copy link
Owner

abraunegg commented Aug 14, 2018

You need to uninstall any prior 'onedrive' version which is the skilion codebase & reinstall using my branch.

You also need to ensure you remove any ~/.config/onedrive/items.* file

The above message is totally indicative of the prior skilion compiled application being installed on your system and is being found through the default path.

Refer to #98 for any additional help

@abraunegg abraunegg added Duplicate This issue or pull request already exists Answer Provided labels Aug 14, 2018
@abraunegg
Copy link
Owner

Updated the FAQ (https://github.com/abraunegg/onedrive/wiki/Frequently-Asked-Questions) with details on this error

@fgauvrit
Copy link
Author

fgauvrit commented Aug 16, 2018

Hi,

actually, there was no previous skilion installation since this onedrive was deployed on a brand new Leap 42.3...

What is the purpose of the 2 service files (onedrive.service and ondrive@.service)? One is not sufficient ?

In any case, you have to change the URL in your service files which is incorrect (still pointing to skilion) :

# cat /usr/lib/systemd/user/onedrive.service 
[Unit]
Description=OneDrive Free Client
Documentation=https://github.com/skilion/onedrive
After=network-online.target
Wants=network-online.target

[Service]
ExecStart=/usr/local/bin/onedrive --monitor
Restart=on-failure
RestartSec=3

[Install]
WantedBy=default.target
# cat /usr/lib/systemd/user/onedrive@.service 
[Unit]
Description=OneDrive Free Client for %i
Documentation=https://github.com/skilion/onedrive
After=network-online.target
Wants=network-online.target

[Service]
ExecStart=/usr/local/bin/onedrive --monitor --confdir=/home/%i/.config/onedrive
User=%i
Group=users
Restart=on-failure
RestartSec=3

Thanks.

@abraunegg
Copy link
Owner

abraunegg commented Aug 16, 2018

actually, there was no previous skilion installation since this onedrive was deployed on a brand new Leap 42.3...

OK .. thats a worry - everything should be added to the database correctly ..... this will need investigating

What is the purpose of the 2 service files (onedrive.service and ondrive@.service)? One is not sufficient ?

The best reference for this is skilion/onedrive#314 - have a look at the comments from @sbocquet ~ late March / April 2018.

In any case, you have to change the URL in your service files which is incorrect (still pointing to skilion)

Yes it does - thanks for pointing this out.

@abraunegg abraunegg reopened this Aug 16, 2018
@abraunegg abraunegg added Bug Something isn't working Investigating and removed Answer Provided Duplicate This issue or pull request already exists labels Aug 16, 2018
@abraunegg
Copy link
Owner

To Reproduce
onedrive --upload-only --synchronize --resync

Is there any reason why your specifying --resync on the command line?

With this error:

Initializing the Synchronization Engine ...
Syncing changes from local path only - NOT syncing data changes from OneDrive ...
The parent item is not in the local database
Syncing changes from local path only - NOT syncing data changes from OneDrive ...
The parent item is not in the local database
Syncing changes from local path only - NOT syncing data changes from OneDrive ...
object.Exception@src/sync.d(1109): The parent item is not in the local database

Do you still get the error when you run this command line:

onedrive --upload-only --synchronize --verbose

If you do - can you post the entire full debug log please

@fgauvrit
Copy link
Author

fgauvrit commented Aug 16, 2018

Hi,

I have deleted all the local db files, all the files in my onedrive storage and it seems to work fine now with the following service file :

[Unit]
Description=OneDrive Free Client
Documentation=https://github.com/abraunegg/onedrive
After=network-online.target
Wants=network-online.target

[Service]
ExecStart=/usr/local/bin/onedrive --monitor --local-first --upload-only --skip-symlinks --verbose
Restart=on-failure
RestartSec=3

[Install]
WantedBy=default.target

Note: I have also deleted the onedrive@.service file which is not used in my case.

Keep you posted if the issue occurs again.

Thanks.

@abraunegg
Copy link
Owner

OK .. it's weird then that it didn't work but now it is ...

@fgauvrit
Copy link
Author

fgauvrit commented Aug 17, 2018

Sorry, but the error occurred again... With onedrive v2.1.1-3-gb98c938

onedrive --synchronize --upload-only --local-first --verbose (and same error with --resync)

object.Exception@src/sync.d(1114): The parent item is not in the local database
----------------
/usr/include/dlang/dmd/std/exception.d:515 pure @safe void std.exception.bailOut!(Exception).bailOut(immutable(char)[], ulong, scope const(char)[]) [0x556482]
??:? pure @safe bool std.exception.enforce!().enforce!(bool).enforce(bool, lazy const(char)[], immutable(char)[], ulong) [0x5f069d]
src/sync.d:1114 void sync.SyncEngine.uploadNewFile(immutable(char)[]) [0x5c7701]
src/sync.d:1016 void sync.SyncEngine.uploadNewItems(immutable(char)[]) [0x5c6e8e]
src/sync.d:1007 void sync.SyncEngine.uploadNewItems(immutable(char)[]) [0x5c6d85]
src/sync.d:1007 void sync.SyncEngine.uploadNewItems(immutable(char)[]) [0x5c6d85]
src/sync.d:1007 void sync.SyncEngine.uploadNewItems(immutable(char)[]) [0x5c6d85]
src/sync.d:1007 void sync.SyncEngine.uploadNewItems(immutable(char)[]) [0x5c6d85]
src/sync.d:1007 void sync.SyncEngine.uploadNewItems(immutable(char)[]) [0x5c6d85]
src/sync.d:1007 void sync.SyncEngine.uploadNewItems(immutable(char)[]) [0x5c6d85]
src/sync.d:1007 void sync.SyncEngine.uploadNewItems(immutable(char)[]) [0x5c6d85]
src/sync.d:736 void sync.SyncEngine.scanForDifferences(immutable(char)[]) [0x5c5a95]
src/main.d:390 void main.performSync(sync.SyncEngine, immutable(char)[], bool, bool, bool) [0x5a8d40]
src/main.d:269 _Dmain [0x5a861f]

@abraunegg
Copy link
Owner

Can you post the full log rather than just the last extract like you have?

The full log shows me what the client was doing before the error occured

@abraunegg abraunegg reopened this Aug 17, 2018
@abraunegg
Copy link
Owner

Can you please rebuild and use this specific version of the client to collect diagnostic details on your issue:

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

When posting the log, I need the entire log from start to finish, not just the crash please.

@fgauvrit
Copy link
Author

Hi,

for onedrive v2.1.1-3-gb98c938, with which I have the initial error "The parent item is not in the local database", you can check the log fgauvrit.onedrive.log.old.

for onedrive v2.1.1-4-ge215c1b, check the log fgauvrit.onedrive.log.

I have added my config file, service file and db just in case.
onedrive_files.zip

Thanks in advance for your help.

@abraunegg
Copy link
Owner

abraunegg commented Aug 18, 2018

Thanks the for log files. fgauvrit.onedrive.log does not show me anything out of the ordinary at this stage.

I have made added further logging into the PR. Please can you reclone the PR and retest:

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

However, when running this version please run via a separate terminal / SSH session, do NOT use monitor mode:

onedrive --synchronize --verbose <any of your other needed options>

When the error occurs again, send me the entire 'console' output including the crash, not just the log file as the crash does not get written to the log file.

@fgauvrit
Copy link
Author

fgauvrit commented Aug 19, 2018

Hi,

onedrive v2.1.1-5-g6946808

I used onedrive --synchronize --upload-only --local-first --verbose > console_output.log 2>&1 and here are the 2 resulting files :

onedrive_logs.zip

The error occurs after 21 Gb of upload.

Thanks.

@fgauvrit
Copy link
Author

Same test on another computer with a crash after 45 Gb of upload.
onedrive_2.zip

Not sure it is the same error but it crashes all the time just like the previous computer.

Thanks.

@abraunegg
Copy link
Owner

Thanks .. will have to also diagnose this locally using a OpenSuSE Leap 42.3 system to rule out any local environmental issue.

@abraunegg
Copy link
Owner

So looking at the latest logs this is where the client appears to be breaking:

ERROR - This item was not found in the database: photos, 51e9aeceea51cd05, 51E9AECEEA51CD05!68235
OneDrive Client requested to create remote path: ./Photos/A traiter/photos
The requested directory to create was found on OneDrive - skipping creating the directory: ./Photos/A traiter/photos
The parent for this path is in the local database - adding requested path (./Photos/A traiter/photos) to database

This narrows things down as to where to start looking for the problem

@abraunegg
Copy link
Owner

From 'onedrive_2.zip' you have a bad file name with a weird white space character - this is why that crash occurred.

Please can you archive and email "309 GLA-60809-51� lounge sofa.xls" without changing it's name or anything & email that to support@mynas.com.au

@fgauvrit
Copy link
Author

Hi,

I found the reason of the first crash : That stupid Microsoft onedrive can't make difference between "Photos" and "photos", so it makes the client crash. I renamed the directory and it seems to work fine now... Keep you posted if I see something weird like that.

For the second crash, I can't send you the file since it is confidential data. I fixed the name and it is syncing fine now.

Thanks.

@abraunegg
Copy link
Owner

If you still have the file before you renamed it - please can you send it but delete all the data inside of it - that I don't need - just the file name.

I found the reason of the first crash : That stupid Microsoft onedrive can't make difference between "Photos" and "photos", so it makes the client crash.

I don't think this is the case, as using your logs to replicate your directory tree, I am able to create the entire path without issue - no error at all.

@abraunegg abraunegg added the Local Environment Issue Cannot locally reproduce issue label Aug 20, 2018
@fgauvrit
Copy link
Author

Hi.

Sorry, I didn't kept the strange file.

I confirm that the fact to rename "photo" to "photo2" fixed the problem.

Thanks.

@abraunegg
Copy link
Owner

Can you email to support@mynas.com.au a full directory listing / path output so I can try and replicate somehow? Ive tried replicating but to no avail as yet

@fgauvrit
Copy link
Author

For info, I was able to extract the commit version with the following command :
wget -O - -o /dev/null master | grep "commit=" | head -1 | awk -F= '{print $4}' | awk -F"&" '{print $1}'

@fgauvrit
Copy link
Author

fgauvrit commented Aug 21, 2018

The impacted tree was /home/data/Medias/Photos/A traiter/Photos and .../photos.

The fact to rename "photos" to "photos2" fixed the problem.

@abraunegg
Copy link
Owner

abraunegg commented Aug 26, 2018

@fgauvrit

I confirm that the fact to rename "photo" to "photo2" fixed the problem.

Is there any chance for you to test the following PR:

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

What it should do is clearly articulate that there is a similar named directory in the same folder path, thus skip syncing of the files with a warning message.

@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 Local Environment Issue Cannot locally reproduce issue
Projects
None yet
Development

No branches or pull requests

2 participants