coddingtonbear / inthe.am

Access your Taskwarrior tasks from any browser anywhere
https://inthe.am/
GNU Affero General Public License v3.0
592 stars 50 forks source link

Error 500 on sync #203

Closed vonpupp closed 8 years ago

vonpupp commented 8 years ago

Dear @coddingtonbear,

I just closed the prior issue and open this new one as I saw your awesome project! =D. I was very exited to know about it, I think this is the exact missing piece for taskwarrior (and Mirakel sync to work again).

I tried to configure the app via the https://github.com/coddingtonbear/taskwarrior-inthe.am tool. I installed via pip2 and I launch it using the setup command. It prompted me for a password and an API token which I got from the configuration.

After that when I try to sync I get:

[av:~/.task/certs]$ t sync
Syncing with taskwarrior.inthe.am:53589

Sync failed.  The Taskserver returned error: 500 Client sync key not found.

Herewith my diagnostics on Arch Linux: [av:~/.task/certs]$ task diagnostics

task 2.5.0
   Platform: Linux

Compiler
    Version: 5.2.0
       Caps: +stdc +stdc_hosted +LP64 +c8 +i32 +l64 +vp64 +time_t64
 Compliance: C++11

Build Features
      Built: Nov  7 2015 13:14:07
      CMake: 3.3.2
    libuuid: libuuid + uuid_unparse_lower
  libgnutls: 3.4.6
 Build type: 

Configuration
       File: /home/av/.taskrc (found), 5923 bytes, mode 100644
       Data: /home/av/.task/data (found), dir, mode 40755
    Locking: Enabled
         GC: Enabled
  rc.editor: vim
     Server: taskwarrior.inthe.am:53589
         CA: /home/av/.task/data/ca.cert.pem, readable, 2405 bytes
      Trust: ignore hostname
Certificate: /home/av/.task/data/private.cert, readable, 2462 bytes
        Key: /home/av/.task/data/private.key, readable, 3660 bytes
    Ciphers: NORMAL
      Creds: inthe_am/vonpupp/************************************

Hooks
    Scripts: Enabled
             /home/av/.task/data/hooks/on-modify.timetracking (executable) (symlink)

Tests
      $TERM: rxvt-unicode-256color (357x111)
       Dups: Scanned 296 tasks for duplicate UUIDs:
             No duplicates found

I'm sorry to annoy you again, but I would be more than happy to be a beta user and report issues for this project if you want me to.

Regards.

coddingtonbear commented 8 years ago

Glancing at the error, it sounds like you might've been syncing with a different taskserver before; is that the case?

vonpupp commented 8 years ago

Ohh yes, this is my case. I was using freecinc until I decided to try yours. I thought it was just fine to comment a server and add another. This is not possible?

coddingtonbear commented 8 years ago

Oh, you can -- but there are steps you'll have to take for clearing out your client's understanding of its sync state. That error above means that your client and the server couldn't agree on when they last synced -- that's because your client thinks it synced at a certain point, but the server has no record of that.

Check-in with the folks in #taskwarrior and they might have an idea; I ?think all you have to do is delete the backlog file from your task data folder, but it has been some time since I bumped into this, so I'm not 100% confident.

vonpupp commented 8 years ago

task sync init fixed it.

Thank you very much for being so helpful @coddingtonbear.

Amazing project. Congrats! Cheers.

sukima commented 6 years ago

For the future reader. When the inthe.am system corrupted the data I had the problem on two machines. Here is how I fixed it:

Pick only one machine as the source of truth. (Machine A in this example)

InThe.Am Website

  1. Login
  2. Click Configuration button in nav bar
  3. Choose Danger Zone section
  4. Click the Clear Task Data button

Machine A (source of truth)

$ task sync init
$ task sync

Machine B (and any others)

Delete the backlog.data file. On Mac OSX and Ubuntu this was $HOME/.task/backlog.data

$ rm $HOME/.task/backlog.data
$ task sync

Don't continue to make changes until this process is complete or you will notice that some changes might not apply between the computers.