UbuntuOne tomboy notes sync failure

Bug #479417 reported by jondecker76 on 2009-11-09
This bug affects 48 people
Affects Status Importance Assigned to Milestone
Ubuntu One Servers
Rodrigo Moya

Bug Description

Upon trying to synchronize Tomboy notes, I get a "Failed to synchronize" message which pops up. Upon clicking the "Details" dropdown, it only displays a blank text area.

I have attached a debug log from trying to syncrhronize after running tomboy with the --debug option

jondecker76 (jondecker76-gmail) wrote :
Joshua Hoover (joshuahoover) wrote :

Hi Jon,

I'm sorry to hear Tomboy sync with Ubuntu One isn't working properly for you. It looks like it's getting tripped up on a character in one of your notes. I'm assigning this to the developer most likely able to fix this issue. If he has questions for you, he'll follow up here.

Thank you,


Changed in ubuntuone-servers:
status: New → Triaged
tags: added: desktop+ tomboy
Changed in ubuntuone-servers:
importance: Undecided → Medium
assignee: nobody → Rodrigo Moya (rodrigo-moya)
Rodrigo Moya (rodrigo-moya) wrote :

Sandy, any idea what the error might be?

visibility: private → public

Looks like Tomboy is having trouble parsing the server response, which contains a bunch of note updates. At first glance, possible problem characters could be & or %.

So there are a few possibilities:

a) Tomboy encoded and sent a note in such a way that it could not be decoded later when received by another Tomboy instance
b) U1's JSON response is somehow different from what Tomboy originally sent
c) Tomboy is making a simple decoding error when recreating note XML from the server response
d) The note was created or modified using U1's web editor, which saved invalid content

Jon, have you ever edited notes online at https://one.ubuntu.com/notes ?

Although what's particularly strange is that the way this works...when Tomboy receives a JSON response, this is what it does with each note:

1) Create a new NoteData object (the same object used to store actual Tomboy note data)
2) Set the title, content, modification dates, tags, etc on the NoteData object based on what was returned in the note JSON object.
3) Use Tomboy's NoteArchiver class to generate proper note XML using the .NET XmlWriter class (the same thing we do to save to *.note files)
4) Create a NoteUpdate object (only used by the generic sync code), passing in the generated XML, which it then parses all over again (this is done because the sync code operates on complete note XML)

The exception occurs during step 4, while using the .NET XmlTextReader to read a string of XML that was generated using the .NET XmlWriter. I would not expect any issues here. Furthermore, this XML should be identical to what would be written to a .note file, and therefore is exactly the sort of XML expected by the NoteUpdate object.

Anyway, it's still possible that the XmlWriter allows you to create XML that can't be read by the XmlTextReader if you pass in some junk (which could have come from U1). So to me it's still not clear where the bug is here.

Jon, if you're interested in building Tomboy yourself and testing some patches, let me know and we can try some things out.

The best thing would be if Jon's note database could be cloned to an immutable test account, and Rodrigo and I could directly test syncing from that account.

motang (mohan-ram) wrote :

I get the same thing, Failed to Synchronize, but the details are empty so I can't really say what's going on.

So I launched tomboy in the terminal and when choose Synchronize this is what gets printed out:

tomboy --debug > ~/tomboy-debug.log

(tomboy:4691): Gnome-WARNING **: Accessibility: failed to find module 'libgail-gnome' which is needed to make this application accessible

(tomboy:4691): Gnome-WARNING **: Accessibility: failed to find module 'libatk-bridge' which is needed to make this application accessible

(tomboy:4691): GLib-CRITICAL **: g_source_remove: assertion `tag > 0' failed

motang (mohan-ram) wrote :

Oh I failed to mention this was all working fine about a week and half to two weeks ago.

motang, when you run the command the interesting output all goes to the tomboy-debug.log file you are creating. :-) So you should attach that to this bug.

motang (mohan-ram) wrote :

@Sandy Oh sorry about that. Ok I have attached the file.

montang, your problem is not related to this bug. You should file a new one. Perhaps the U1 server guys will have an idea of what's going on there.

motang (mohan-ram) wrote :

Ok thank you.

Rodrigo, montang's bug may be a duplicate of bug #465258 (it is private so I can't tell for sure), but the original bug reporter's trace was totally unrelated to authentication issues. So I do not think the original bug reported here is a duplicate.

Rodrigo Moya (rodrigo-moya) wrote :

Sandy, you are right. Last logs were indeed the same as bug #465258, but not the 1st one

Cornelius Hald (hald) wrote :

I only comment here, because I think it could be related to bug #490969 which I just filed and maybe Sandy is interested too. At least the exception looks very similar.

TimH1 (tim-h1) wrote :

I had the same problem. Fixed by deleting an "&" in the name of a note.

Nicola Jelmorini (jelmorini) wrote :

I have the same synchronization problem here.
When I try to synchronize my notes in a terminal I receive these messages:

cripton@cripton-laptop:~$ tomboy
(/usr/lib/tomboy/Tomboy.exe:3618): GLib-WARNING **: g_set_prgname() called multiple times
(/usr/lib/tomboy/Tomboy.exe:3618): GLib-WARNING **: g_set_prgname() called multiple times
[INFO]: Initializing Mono.Addins

[ERROR]: Synchronization failed with the following exception: Unexpected character '<' at [1:1]
  at Hyena.Json.Tokenizer.UnexpectedCharacter (Char ch) [0x00000]
  at Hyena.Json.Tokenizer.InnerScan () [0x00000]
  at Hyena.Json.Tokenizer.Scan () [0x00000]
  at Hyena.Json.Deserializer.CheckScan (TokenType expected, Boolean eofok) [0x00000]
  at Hyena.Json.Deserializer.Deserialize () [0x00000]
  at Tomboy.WebSync.Api.UserInfo.ParseJsonNotes (System.String jsonString, System.Nullable`1& latestSyncRevision) [0x00000]
  at Tomboy.WebSync.Api.UserInfo.UpdateNotes (IList`1 noteUpdates, Int32 expectedNewRevision) [0x00000]
  at Tomboy.WebSync.WebSyncServer.CommitSyncTransaction () [0x00000]
  at Tomboy.Sync.SyncManager.SynchronizationThread () [0x00000]

(/usr/lib/tomboy/Tomboy.exe:3618): GLib-CRITICAL **: g_source_remove: assertion `tag > 0' failed

The "Unexpected character" message is significant for the problem I think. My notes contain bullet lists, links with spaces (%20), and so on. I don't know if one of these characters is the problem.

krackersk (krackersk) wrote :

I have a problem with syncronization also. I have tried to syncronise about 5 times, It says "Syncronisation failed" but error details box says "Uploaded new note to server" for each note but when I go on ubuntu one there is nothing there. and in the tomboy --debug I get the error above. I deleted a note and, the last couple of times I tried it though the first note gets added but then the rest don't. I have added the --debug output for the last time I tried. Happy to help in anyway to try and get this fixed.

When I start tomboy via the command line I get:

tomboy --debug > ~/tomboyDebug.log

(/usr/lib/tomboy/Tomboy.exe:12439): GLib-WARNING **: g_set_prgname() called multiple times

(/usr/lib/tomboy/Tomboy.exe:12439): GLib-WARNING **: g_set_prgname() called multiple times

(/usr/lib/tomboy/Tomboy.exe:12439): GLib-CRITICAL **: g_source_remove: assertion `tag > 0' failed

Bert Claes (bertmlclaes) wrote :

I had the same kind of problems.

I created a folder in my Ubuntu One directory,
and used this directory in the preferences - synchronization menu as a "local synchronization map"
.. just until the problems are solved with special characters
(if don't use the webinterface much).

Cornelius Hald (hald) wrote :

Currently it looks like the synchronization has a major problem. I had problems with failed syncs, U1 always returned a internal server error. I thought it might have have to do something with my notes or templates, so I did the following:

- Created a new U1 account
- Removed all local Tomboy data including all notes, manifest, etc.
- Authenticated with the new U1 account
- Synced

So far so good. Now I've added a new local note, containing just two words, no special chars etc. and synced again. Still good. The note was successfully synced.

If I add now another word to the existing note, the next sync fails. Again with an internal server error.

The post data looks fine to me:
[DEBUG]: Post data: {"note-changes":[{"guid":"f1d92a2e-72ba-44c0-98c5-da0ec4565f67","title":"test1","note-content":"content and more","note-content-version":0.1,"last-change-date":"2010-01-10T14:50:27.6695450+01:00","last-metadata-change-date":"2010-01-10T14:50:27.6695450+01:00","create-date":"2010-01-10T14:47:31.8740650+01:00","open-on-startup":false,"pinned":false,"tags":[]}],"latest-sync-revision":2}

Rodrigo Moya (rodrigo-moya) wrote :

There is a problem indeed in the notes sync code in our server, which is what is returning the internal server error. We' re working on it, so should be fixed soon.

Cornelius Hald (hald) wrote :

I know, it has not been said to be fixed, but the behaviour changed, so here is a small update:
The internal server error is gone now. Instead the update is simply ignored by the server and latest-sync-revision is not increased.

Rodrigo Moya (rodrigo-moya) wrote :

I thought this bug was fix released, so sorry for not answering before. Both problems should be fixed now, so are they still happening for conboy? If so, do you have any way to get debugging output from the HTTP conversation between the ubuntu one server and conboy for me to look at?

Changed in ubuntuone-servers:
status: Triaged → Incomplete
Cornelius Hald (hald) wrote :

The problem I described had nothing to do with Conboy. It was sync between Tomboy and U1. Since about a week it is working again. Thanks!

Rodrigo Moya (rodrigo-moya) wrote :

Ah, ok, sorry :) Closing this then

Changed in ubuntuone-servers:
status: Incomplete → Fix Released
Daniel Morris (d-j-n-morris) wrote :

I think this may be a new version of the same bug.

Updated to Lucid and now no syncing

GdkPixbuf-WARNING **: GdkPixbufLoader finalized without calling gdk_pixbuf_loader_close() - this is not allowed. You must explicitly end the data stream to the loader before dropping the last reference.

is the debug output

harrykar (harrykar) wrote :

same behavior as described by "Daniel Morris wrote on 2010-05-02"

Same behavior as described by "Daniel Morris and harrykar." Synchronizing between Tomboy Notes and Ubuntu One worked fine before I upgraded to Lucid. I cleared the synchronization settings in Tomboy Preferences, re-created the settings and re-synched the notes, and it works again ... for now.

luca (l-savio) wrote :

[ERROR]: Synchronization failed with the following exception: Unexpected character '<' at [1:1]

today i have this issue on two maverick clean installs: another Lucid one works perfectly. Even clearing sync settings and reconfiguring does not work. Few days ago all was ok.

noquierouser (noquierouser) wrote :

Same problem here.

Tomboy for Windows syncing with Ubuntu One account. I have edited notes in Web and have notes with special chars.

Is there any fix yet?

Steve Redshaw (steveredshaw) wrote :

My Sychronisation failure happened on each of the computers I use after I had copied the contents of this blog and added it to one of my notes;


I cannot see any special characters in it which might upset TomBoy. I synchronise with a DropBox folder which is of course present on each of my computers.

To work around this, I deleted the updated note, renamed the original TomBoy Notes folder in my DropBox folder, created a new empty folder called TomBoy Notes and synchronised TomBoy, everything is now fine - thereby proving, I think, that somehow something in the note I deleted was the cause of the Synchronisation failure

Denis Kranjčec (kranjcec) wrote :

Still have the same problem (Tomboy 1.6.0 on windows):
13.9.2011. 14:43:01 [ERROR]: Synchronization failed with the following exception: Unexpected character '<' at [2:0]
   at Hyena.Json.Tokenizer.UnexpectedCharacter(Char ch) in c:\Users\grep\Development\tomboy\Tomboy\Addins\WebSyncService\Hyena.Json\Tokenizer.cs:line 84
   at Hyena.Json.Tokenizer.InnerScan() in c:\Users\grep\Development\tomboy\Tomboy\Addins\WebSyncService\Hyena.Json\Tokenizer.cs:line 320
   at Hyena.Json.Tokenizer.Scan() in c:\Users\grep\Development\tomboy\Tomboy\Addins\WebSyncService\Hyena.Json\Tokenizer.cs:line 265
   at Hyena.Json.Deserializer.CheckScan(TokenType expected, Boolean eofok) in c:\Users\grep\Development\tomboy\Tomboy\Addins\WebSyncService\Hyena.Json\Deserializer.cs:line 141
   at Hyena.Json.Deserializer.Deserialize() in c:\Users\grep\Development\tomboy\Tomboy\Addins\WebSyncService\Hyena.Json\Deserializer.cs:line 63
   at Tomboy.WebSync.Api.UserInfo.ParseJson(String jsonString) in c:\Users\grep\Development\tomboy\Tomboy\Addins\WebSyncService\Api\UserInfo.cs:line 49
   at Tomboy.WebSync.Api.UserInfo.GetUser(String userUri, IWebConnection connection) in c:\Users\grep\Development\tomboy\Tomboy\Addins\WebSyncService\Api\UserInfo.cs:line 39
   at Tomboy.WebSync.WebSyncServer.BeginSyncTransaction() in c:\Users\grep\Development\tomboy\Tomboy\Addins\WebSyncService\WebSyncServer.cs:line 56
   at Tomboy.Sync.SyncManager.SynchronizationThread() in c:\Users\grep\Development\tomboy\Tomboy\Synchronization\SyncManager.cs:line 408

I have the same problem and I do not belive this bug cannot be fixed, since Tomboy is an nice app widelly used. The sync fail, as you can see in the attachaments below. I uninstallled many times, deleting all the config files and trying again, with no results.
The Ubuntu 11.10 machine is the only one that have this problem, Tomboy works fine in 10.04 and Fedora 15.

For what it's worth, I am having the same problem described here. I am using Mint12 on a desktop at work, and on a laptop at home.

"Failed to Synchronize" .....and Details are blank.

As a side note: The Mint12 desktop and work and my TomDroid app on my Android phone are synching just fine. Synching to https://one.ubuntu.com/notes

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

Other bug subscribers