Tomboy fails to sync after editing note via web: "String was not recognized as a valid DateTime."

Bug #709378 reported by jhfhlkjlj
130
This bug affects 24 people
Affects Status Importance Assigned to Milestone
Ubuntu One Servers
Fix Released
Critical
Paul Hummer
tomboy (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: tomboy

I edited a note via the web interface as I was away from my computers. Next time I reached my laptop and desktop, both of them have been unable to sync notes, stating no helpful error message in the dialog box.

When manually attempting to synchronize notes with Tomboy it seems to begin well
and then it stops with a message "Could not synchronize notes. Check details below
and try again however, in details there is no data.

The debug information shows that it has something to do with a time stamp issue but
am unable to debug it and it may be a server side issue. Files from folders designated
to synch to ubuntu one do however continue to work.

I have verified that the oauth tokens are correct. I have tried removing and re-adding my computers to U1. I have attempted to delete all of my notes from server and computer, delete my ~/.local/share/tomboy and ~/.config/tomboy folders, and then sync an arbitrary, new note. It still fails. I have been unable to get any of this to work.

I will attach the tomboy.log after using 'tomboy --debug' in the terminal.

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: tomboy 1.4.2-0ubuntu1
Uname: Linux 2.6.36-020636-generic x86_64
Architecture: amd64
Date: Fri Jan 28 12:28:52 2011
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release amd64 (20101007)
ProcEnviron:
 LANG=en_US.utf8
 SHELL=/bin/bash
SourcePackage: tomboy

Revision history for this message
jhfhlkjlj (fdsuufijjejejejej-deactivatedaccount) wrote :
Revision history for this message
jhfhlkjlj (fdsuufijjejejejej-deactivatedaccount) wrote :

I'm unsure as to whether U1 or Tomboy is at fault.

Revision history for this message
Thomas Majewski (thomasjmajewski) wrote :

I opened an identical bug #709995 yesterday. Same problem as above [[ERROR]: Synchronization failed with the following exception: String was not recognized as a valid DateTime.]. I am running AMD processor "Turion 64" and Ubuntu 10.10 i386. Filed similar/identical debug log for tomboy and can confirm this issue. I did not think to mention in my bug report that I too had made changes and edits to notes on the Ubuntu One site prior to the advent of the problem. I have tried everything I could find to clear the problem including removing my computer from U1 and setting up tomboy synchronization anew but notes will not synch apparently due to the invalid DateTime issue, something I could not confirm in my review of notes downloaded with the ubuntuone-couchdb-query script as dates appeared to be both consistent and correct. U1 synch daemon *seen via u1sdtool" does not specifically show tomboy but I don't think it needs to as I believe that notes are a server side include.

Revision history for this message
jhfhlkjlj (fdsuufijjejejejej-deactivatedaccount) wrote :

Hi, Thomas. Thanks for confirming this issue. I'm going to go ahead and mark yours as a dupe of mine (for chronological sake).

Changed in tomboy (Ubuntu):
status: New → Confirmed
description: updated
description: updated
Revision history for this message
Sandy Armstrong (sanfordarmstrong) wrote :

This is a U1 server bug. Tomboy shouldn't accept bad data, and doesn't.

Error message could be better, of course.

Changed in tomboy (Ubuntu):
status: Confirmed → Opinion
status: Opinion → Invalid
Changed in ubuntuone-servers:
status: New → Confirmed
Revision history for this message
Rajsite (rajsite) wrote :

I receive this error as well when using the windows tomboy application, however the app conboy on the nokia n900 seems to sync with the web okay.

Here is the windows tomboy console output:
[ERROR 21:41:49.844] Synchronization failed with the following exception: String was not recognized as a valid DateTime.
   at System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles)
   at System.DateTime.Parse(String s)
   at Tomboy.WebSync.Api.NoteInfo.ParseJson(JsonObject jsonObj) in c:\Projects\Private\Tomboy\Tomboy\Addins\WebSyncService\Api\NoteInfo.cs:line 66
   at Tomboy.WebSync.Api.UserInfo.ParseJsonNoteArray(JsonArray jsonArray) in c:\Projects\Private\Tomboy\Tomboy\Addins\WebSyncService\Api\UserInfo.cs:line 183
   at Tomboy.WebSync.Api.UserInfo.ParseJsonNotes(String jsonString, Nullable`1&latestSyncRevision) in c:\Projects\Private\Tomboy\Tomboy\Addins\WebSyncService\Api\UserInfo.cs:line 172
   at Tomboy.WebSync.Api.UserInfo.GetNotes(Boolean includeContent, Int32 sinceRevision, Nullable`1& latestSyncRevision) in c:\Projects\Private\Tomboy\Tomboy\Addins\WebSyncService\Api\UserInfo.cs:line 121
   at Tomboy.WebSync.WebSyncServer.GetNoteUpdatesSince(Int32 revision) in c:\Projects\Private\Tomboy\Tomboy\Addins\WebSyncService\WebSyncServer.cs:line 117
   at Tomboy.Sync.SyncManager.SynchronizationThread() in c:\Projects\Private\Tomboy\Tomboy\Synchronization\SyncManager.cs:line 434

Revision history for this message
jhfhlkjlj (fdsuufijjejejejej-deactivatedaccount) wrote :

I have attempted to delete all of my notes from server and computer, delete my ~/.local/share/tomboy and ~/.config/tomboy folders, and then sync an arbitrary, new note. It still fails.

Is there nothing I can do on my end?

description: updated
Revision history for this message
magowiz (magowiz) wrote :

Same problem here.

Revision history for this message
Giorgi Maghlakelidze (dracid) wrote :

Umm. Same problem here. :(

Tried everything: deleting all my notes + configs, reauthorizing, using WEB authorization... nothing works. . .

Revision history for this message
jhfhlkjlj (fdsuufijjejejejej-deactivatedaccount) wrote :

I messed around some more and got my notes to sync again.

By moving my Tomboy notes to the desktop (found in ~/.local/share/tomboy), deleting the config, deleting all the notes off of the server, restarting Tomboy, deleting the default notes, moving the notes back into the ~/.local/share/tomboy folder, then syncing, I was able to get U1 sync to work again. So far it's been acting like it never happened on both of my machines.

Revision history for this message
Giorgi Maghlakelidze (dracid) wrote :

@Chauncellor
Great! I'm going to try that!
Seems like it's the server-side issue... eh...?

Revision history for this message
Giorgi Maghlakelidze (dracid) wrote :

OK, I've got an update to this:

You DO NOT HAVE TO actually delete all the data!
Chauncellor was on the right track!

Just delete all the notes that were modified online. From U1 web-site. Afterwards - You will be able to synchronize.

Before, actually deleting the changed notes, it would be clever to make some text files on Ur PC. as a backup. ;)

Good luck and let me know how this works out, please! ;)

Revision history for this message
magowiz (magowiz) wrote :

What about me? I never edited a note online but I still have the same error message as you. What should I try?

Revision history for this message
Rajsite (rajsite) wrote :

I tried Giorgi's method and it worked for me.

First backed up all my notes it a separate text editor.
Deleted all my notes off the server (because I can't remember which ones I edited online).
Did a sync to ubuntuone from my computer (win7 tomboy) and phone (N900 conboy) and all worked perfectly. (Did not have to delete local repos or reauthorize, etc. just all worked :P)

A shame the web interface breaks it... liked being able to jot things down on any pc without installing an app

Thanks Giorgi and Chauncellor!

P.S. Magowiz, give it a shot anyway, could help, it does appear to be a server issue after all

Revision history for this message
magowiz (magowiz) wrote :

How can I delete mine notes off the server? I don't see any delete button on ubuntu one notes webpage....

Revision history for this message
Giorgi Maghlakelidze (dracid) wrote :

@Rajsite
I'm glad this worked for You! :)

@magowiz
When You open a note on the server, the delete icon appears in the same row as the note(in the list that is on the left-hand side)
Are You sure You haven't edited any notes online? Because there have been several other bugs/threads that have similar error, but are related to special characters inside notes and ton of other stuff...

What's Your error log? To see it, run tomboy --debug and try to sync... Good luck!

Revision history for this message
magowiz (magowiz) wrote :

This time I followed this FAQ to get all my notes deleted from server :
https://wiki.ubuntu.com/UbuntuOne/FAQ/HowCanIDeleteAllMyTomboyNotesFromTheServer

I ran both scripts and now I still cannot sync but with a different error (see attachment)

Revision history for this message
magowiz (magowiz) wrote :
Revision history for this message
magowiz (magowiz) wrote :

the right thing to do anyway is on comment 10

Revision history for this message
Giorgi Maghlakelidze (dracid) wrote :

@magowiz
Yeah, because it's deleting ALL the Tomboy data. :)
I think that's a different bug. Tomboy seems to have a constellation of similar bugs...

In Your log it says "The remote server returned an error: (404) NOT FOUND."
I guess You needed to re-register Tomboy so sync with U1...

Did #10 fix it for You?

Revision history for this message
magowiz (magowiz) wrote :

Yes #10 fixed for me too, now I have full sync working again.
Anyway just to have a full walk trough :
- I deleted all my notes from web like described in https://wiki.ubuntu.com/UbuntuOne/FAQ/HowCanIDeleteAllMyTomboyNotesFromTheServer running both scripts
- I cleared tomboy sync data
- I synced again

Revision history for this message
Thomas Majewski (thomasjmajewski) wrote :

I too was able to get sync working after removing all the notes from the ./local/share/tomboy folder.
Since everything was looking good I went to U1, and created a note. The first thing strange was
that U1 created 2 notes identical notes rather than one. I deleted one of them. Then I tried to synch
tomboy with U1. It failed to sync. I went back to U1, deleted the recently created note and can now
sync again. Bottom Line: Notes created on my U1 account break tomboy and cannot create notes
on the server anymore; a facility that worked prior to this problem.

Revision history for this message
Michael Chapman (michaelc-soc) wrote :

I was also able ale to sync again after deleting all my notes from the server. Thanks to all those who posted here.

Roman Yepishev (rye)
Changed in ubuntuone-servers:
importance: Undecided → Critical
assignee: nobody → Martin Albisetti (beuno)
Revision history for this message
Steve Magoun (smagoun) wrote :

This happened to me. The web UI is creating invalid timestamps, for example:
"last-change-date": "2011-0213t22:48:24"
(note the missing hyphen between month and day)

Compare this to a timestamp from Tomboy:
"last-change-date": "2011-01-05T12:04:55.6062730-05:00"

Paul Hummer (rockstar)
Changed in ubuntuone-servers:
assignee: Martin Albisetti (beuno) → Paul Hummer (rockstar)
Martin Albisetti (beuno)
Changed in ubuntuone-servers:
status: Confirmed → In Progress
Revision history for this message
Paul Hummer (rockstar) wrote :

Alright folks, fix is playing in PQM.

Revision history for this message
trent-- (sylvainfaivre) wrote :

Thanks for the fix, does this mean the notes that were edited with Ubuntu One recently will have their timestamps automatically fixed, or do the users have to do something to get them to sync ?

I just tried editing all my notes in the web UI and saving them, but the sync didn't work. I guess the change is not commited to the servers yet, I will try again later.

Paul Hummer (rockstar)
Changed in ubuntuone-servers:
status: In Progress → Fix Committed
Revision history for this message
Roman Yepishev (rye) wrote :

The change has been pushed to the servers new notes will have correct timestamps.

Revision history for this message
Roman Yepishev (rye) wrote :

Correction: new and re-edited notes will have correct timestamps. I am working on the script that will show what notes are affected and provide the links to their web interface location.

Revision history for this message
Roman Yepishev (rye) wrote :

Here's the script: http://people.canonical.com/~roman.yepishev/us/tomboy-sync-validator.py
It will validate the dates and XML in the notes that are stored online. Re-saving the offending notes now will restore the sync.

Martin Albisetti (beuno)
Changed in ubuntuone-servers:
status: Fix Committed → Fix Released
Revision history for this message
Attila Bial (attila-bial) wrote :

@Roman Yepishev: Can you please provide some more details about how to use your script? Simple running it quits with error.
Thanks.

Revision history for this message
Christoffer Holmstedt (christoffer-holmstedt) wrote :

I'm experiencing the error aswell with the script. Will attach a log.

Revision history for this message
Roman Yepishev (rye) wrote :

Hello Attila, Christoffer and also everyone who is running Ubuntu 10.04, I have updated the script at http://people.canonical.com/~roman.yepishev/us/tomboy-sync-validator.py (rev73) to work with Ubuntu One installations on Ubuntu 10.04 too.

If you have additional issues with the script please let me know at #ubuntuone FreeNode IRC (my nick name is rye) e.g. using the webchat interface at http://webchat.freenode.net/?channels=ubuntuone

Revision history for this message
Attila Bial (attila-bial) wrote :

Hello Roman, it works fine now. Thanks a lot!

Revision history for this message
Thomas Majewski (thomasjmajewski) wrote :

Hello Roman / all, Thanks for working this. Tested creating notes on U1 and they sync fine now both from and to the server.

Revision history for this message
Florent Wachtel (florent-wachtel) wrote : Re: [Bug 709378] Re: Tomboy fails to sync after editing note via web: "String was not recognized as a valid DateTime."

Thanks to all. Now, sync work fine for me in both direction.
Good job!

Revision history for this message
Hansen (moteprime) wrote :

Also had this error on two computers.
Ran the script, identified the offending note and deleted it.
Sync now works again.

tags: added: desktop+ support
tags: added: web-mobile
removed: desktop+
Revision history for this message
forteller (forteller) wrote :

I see that nothing has happened here in a year, and it says that a fix has been released. But I still suffer from this bug. I'm on Ubuntu 11.10, with all the latest updates. Running the latest tomboy-sync-validator.py linked to above did not help.

Here's what tomboy --debug says:

[DEBUG 02:47:46.311] SyncThread using SyncServiceAddin: Tomboy Web
[DEBUG 02:47:46.362] Building web request for URL: https://one.ubuntu.com/notes/api/1.0/
[DEBUG 02:47:50.286] Building web request for URL: https://one.ubuntu.com/notes/api/1.0/user/
[DEBUG 02:47:51.130] 8
[DEBUG 02:47:51.131] Sync: GetNoteUpdatesSince rev -1
[DEBUG 02:47:51.133] Building web request for URL: https://one.ubuntu.com/notes/api/1.0/op/?include_notes=true
[ERROR 02:47:52.077] Synchronization failed with the following exception: String was not recognized as a valid DateTime.
  at System.DateTime.Parse (System.String s, IFormatProvider provider, DateTimeStyles styles) [0x00000] in <filename unknown>:0
  at System.DateTime.Parse (System.String s, IFormatProvider provider) [0x00000] in <filename unknown>:0
  at System.DateTime.Parse (System.String s) [0x00000] in <filename unknown>:0
  at Tomboy.WebSync.Api.NoteInfo.ParseJson (Hyena.Json.JsonObject jsonObj) [0x00000] in <filename unknown>:0
  at Tomboy.WebSync.Api.UserInfo.ParseJsonNoteArray (Hyena.Json.JsonArray jsonArray) [0x00000] in <filename unknown>:0
  at Tomboy.WebSync.Api.UserInfo.ParseJsonNotes (System.String jsonString, System.Nullable`1& latestSyncRevision) [0x00000] in <filename unknown>:0
  at Tomboy.WebSync.Api.UserInfo.GetNotes (Boolean includeContent, Int32 sinceRevision, System.Nullable`1& latestSyncRevision) [0x00000] in <filename unknown>:0
  at Tomboy.WebSync.WebSyncServer.GetNoteUpdatesSince (Int32 revision) [0x00000] in <filename unknown>:0
  at Tomboy.Sync.SyncManager.SynchronizationThread () [0x00000] in <filename unknown>:0

(Tomboy:15702): GLib-CRITICAL **: g_source_remove: assertion `tag > 0' failed

Revision history for this message
jhfhlkjlj (fdsuufijjejejejej-deactivatedaccount) wrote :

Hi, forteller.

Since this bug has been confirmed as fixed for multiple users it would be best if you could report a new bug against tomboy. However, since the web editing feature is soon to be discontinued it would possibly not be worth the effort.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.