jackdesert / freecinc

A hosted solution for syncing your TaskWarrior client
MIT License
69 stars 3 forks source link

Unrecognized taskwarrior file format #4

Closed davisdude closed 6 years ago

davisdude commented 6 years ago

Hi,

I have been using freecinc for several months now without any problems. Yesterday there was a small issue, but it was fixed.

Since the server was down, I have been unable to sync, getting the message: Sync failed. The Taskserver returned error: 500 Unrecognized taskwarrior file format. at line 2015.

I believe the problem is with freecinc, because when I try syncing with another server there are no issues:

# Changed to inthe.am credentials
$ task sync init
Please confirm that you wish to upload all your pending tasks to the Taskserver (yes/no) y
Syncing with inthe.am:53589

Sync successful.  311 changes uploaded.
$ task
[task next]

ID Age Tag                     Recur Due  Description                                        Urg 
...

But when I try to sync use freecinc:

# Trying with freecinc credentials
$ task sync init
Please confirm that you wish to upload all your pending tasks to the Taskserver (yes/no) y
Syncing with freecinc.com:53589

Handshake failed.  Error in the pull function.
Sync failed.  Could not connect to the Taskserver.

$ task sync init
Please confirm that you wish to upload all your pending tasks to the Taskserver (yes/no) y
Syncing with freecinc.com:53589

Could not connect to freecinc.com 53589
Sync failed.  Could not connect to the Taskserver.

$ task sync init
Please confirm that you wish to upload all your pending tasks to the Taskserver (yes/no) y
Syncing with freecinc.com:53589

Sync failed.  The Taskserver returned error: 500 Unrecognized taskwarrior file format. at line 2015

It's all the same data, so it makes no sense that it won't sync with freecinc, but will with other services.

I believe this is related to #3. Could my log file have been the one that filled the disk, causing it to be cut off and corrupted?

jackdesert commented 6 years ago

There is one log file, as far as I know.

davisdude commented 6 years ago

I don't think it really matters that there's only one log file; that wasn't really part of the issue. I've updated the question so that it's hopefully a little more clear what the issue is.

jackdesert commented 6 years ago

So you are suggesting that your account on freecinc is essentially corrupt, or otherwise unusable? And you propose that it is a by-product of the outage?

davisdude commented 6 years ago

Essentially, I believe that part of my file was lost during the outage. I could be wrong, but here's what I believe happened:

  1. I ran task sync
  2. taskwarrior sent my log file to the server
  3. The server began storing new log, but then ran out of room, truncating the file

Now, whenever I try to sync, I believe this is what happens:

  1. I run task sync
  2. taskwarrior fetches my log file from the server
  3. taskwarrior tries to read the log file and apply the new changes
  4. Because the log file was truncated, the file is corrupt and unreadable

This is just my educated guess, based off of it failing to sync to freecinc, but syncing perfectly fine with other services.

jackdesert commented 6 years ago

@davisdude Are you requesting your account be reset somehow?

davisdude commented 6 years ago

That's what I assume would be needed, though I know on the website it's mentioned that there is no option to "delete my account," so I'm not sure how possible it is.

jackdesert commented 6 years ago

@davisdude what's your username? I'll try deleting it.

jackdesert commented 6 years ago

I suppose it would be more correct to say there is no automated way to delete your account.

davisdude commented 6 years ago

I'm not sure what you mean. I don't think I had to make a username when creating the account; as far as I remember, I just generated the cert, key, and ca and that was it.

jackdesert commented 6 years ago

@davisdude Can you send me the filename of one of your freecinc certs? For example, mine is freecinc_1fc768cb.cert.pem. Everything before the "cert.pem" is your username.

davisdude commented 6 years ago

Ah, got it. Mine username is freecinc_a4918972

jackdesert commented 6 years ago

@davisdude Your suppositions appear to correct. Here is the last line of your tx.data:

{"description":"<>","due":"<>","entry":"<>","modified":"<>","status":"pending","tags":[<>],"uuid":"6c346ddc-6114-412e-a91a

The "<>" are sections I removed for privacy reasons. But the line is clearly unfinished. It ends partway through a (36-character) uuid.

Anyway, I've renamed your tx.data file so taskd will (likely) recreate it when you sync again. Let me know how that goes.

davisdude commented 6 years ago

That did it, thanks! :+1:

jackdesert commented 6 years ago

It appears that most of the format is expected to be JSON, except for the last line which is simply an uuid.

This command prints the last line of each account's tx.data file, which is expected to simple be an uuid. If it's not, it probably is corrupt by the same fashion.

tail -n 1 */tx.data

Found five other accounts with incomplete last lines, and repaired them.