jotta / jotta-cli-issues

45 stars 1 forks source link

How to get rid of error message and stop syncing? #147

Closed aerique closed 3 years ago

aerique commented 3 years ago

Make sure you are running the latest version of jotta-cli before reporting an issue.

jotta-cli release (jotta-cli version): 0.10.44027

Description of problem: I have a could not download error and status stays at syncing now....

Expected: I can manually get rid of the error since the file is gone and I do not care and jotta-cli knows it is done syncing.

jotta-cli status (jotta-cli status):

------------------------------------------------------------------------------
 Account   : user@domain on Jottacloud
 Usage     : 1.08TiB / 5.00TiB 
 Device    : work-laptop@home
------------------------------------------------------------------------------
 Sync      :
------------------------------------------------------------------------------
   Path      : /home/user/Jottacloud
   Files     : 18387 (35.71GiB)
   Mode      : listening to events
   Status    : syncing now...
   Errors    : could not download: /photos/sailfish-approx-jan-2021/Camera/20210208_160519.jpg (785effc4afce5db15f2bd94b2bded9da)
------------------------------------------------------------------------------
 No folders added to backup yet
------------------------------------------------------------------------------
OK
coopersimon commented 3 years ago

Does jotta-cli sync stop not work?

aerique commented 3 years ago

Nope:

$ jotta-cli status
------------------------------------------------------------------------------
 Account   : a@b.c on Jottacloud
 Usage     : 1.08TiB / 5.00TiB 
 Device    : work-laptop@home
------------------------------------------------------------------------------
 Sync      :
------------------------------------------------------------------------------
   Path      : /home/user/Jottacloud
   Files     : 18420 (35.76GiB)
   Mode      : listening to events
   Status    : syncing now...
   Errors    : could not download: /photos/sailfish-approx-jan-2021/Camera/20210208_160519.jpg (785effc4afce5db15f2bd94b2bded9da)
------------------------------------------------------------------------------
 No folders added to backup yet
------------------------------------------------------------------------------
OK

$ jotta-cli sync stop
OK

$ jotta-cli status
------------------------------------------------------------------------------
 Account   : a@b.c on Jottacloud
 Usage     : 1.08TiB / 5.00TiB 
 Device    : work-laptop@home
------------------------------------------------------------------------------
 Sync      :
------------------------------------------------------------------------------
   Path      : /home/user/Jottacloud
   Files     : 18420 (35.76GiB)
   Mode      : manually triggered
   Status    : syncing now...
   Errors    : could not download: /photos/sailfish-approx-jan-2021/Camera/20210208_160519.jpg (785effc4afce5db15f2bd94b2bded9da)
------------------------------------------------------------------------------
 No folders added to backup yet
------------------------------------------------------------------------------
OK

$ jotta-cli sync start
OK

$ jotta-cli status
------------------------------------------------------------------------------
 Account   : a@b.c on Jottacloud
 Usage     : 1.08TiB / 5.00TiB 
 Device    : work-laptop@home
------------------------------------------------------------------------------
 Sync      :
------------------------------------------------------------------------------
   Path      : /home/user/Jottacloud
   Files     : 18420 (35.76GiB)
   Mode      : listening to events
   Status    : syncing now...
   Errors    : could not download: /photos/sailfish-approx-jan-2021/Camera/20210208_160519.jpg (785effc4afce5db15f2bd94b2bded9da)
------------------------------------------------------------------------------
 No folders added to backup yet
------------------------------------------------------------------------------
OK

What diagnostic data would be useful for you?

aerique commented 3 years ago

If I grep on the checksum I get some hits:

$ rg 785effc4afce5db15f2bd94b2bded9da
sync/remote.diff
39:               "checksum": "785effc4afce5db15f2bd94b2bded9da"

sync/cursor/MTsxNjIxNTQ1NjQ0NjYy
92960:               "checksum": "785effc4afce5db15f2bd94b2bded9da"

sync/cursor/MTsxNjIxMDAwMjMwMTEw
92085:               "checksum": "785effc4afce5db15f2bd94b2bded9da"

sync/remote.tree
92547:               "checksum": "785effc4afce5db15f2bd94b2bded9da"

Can I remove these entries to fix the issue or is that too blunt an approach?

Kimbsen commented 3 years ago

That will not fix it. For some reason it seems sync is unable to download that file. If you remove the file from the sync folder in the webapplication the error should go away.

But i'm curious as to why its unable to download the file. If you run jotta-cli sync diag jottad will upload the logfile and some diagnostic data and i can take a look at the underlying error.

aerique commented 3 years ago

If you remove the file from the sync folder in the webapplication the error should go away.

Wow, I'm so dumb. I was fully running on the assumption that the file did not exist on the server but it did. I've removed it to see what happens and before that I had run jotta-cli sync diag like you asked.

aerique commented 3 years ago

Another point that may or may not be relevant: I moved / copied (I don't remember) that /photos/sailfish-approx-jan-2021/Camera/ folder from "Backed up" to "Synced" and renamed it a while ago and then this issue popped up.

I had jotta-cli (unstable I think) running on my Sailfish OS phone for backing up photos.

Kimbsen commented 3 years ago

Thanks for the diag upload! We've identified the problem and i think we've fixed it. Thus the file should be downloadable now if you want to put it back in place. Just restore it from Trash in the webapp, or using jotta-cli.

We also identified a problem with the "synching now..." status sticking even after sync had completed. This will be fixed in new version of jotta-cli.

aerique commented 3 years ago

Thanks!

edit: it is indeed fixed for me now