Ubuntu

Can't synchronize Tomboy Notes with Ubuntu One

Reported by Jan Schürmann on 2010-05-05
252
This bug affects 69 people
Affects Status Importance Assigned to Milestone
Ubuntu One Servers
High
Ubuntu One Foundations+ team
tomboy (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: tomboy

[INFO 20:33:26.411] Initializing Mono.Addins
[ERROR 20:33:30.631] Caught exception. Message: The remote server returned an error: (404) NOT FOUND.
[ERROR 20:33:30.633] Stack trace for previous exception: at System.Net.HttpWebRequest.CheckFinalStatus (System.Net.WebAsyncResult result) [0x00000]
  at System.Net.HttpWebRequest.SetResponseData (System.Net.WebConnectionData data) [0x00000]
[ERROR 20:33:30.635] Rest of stack trace for above exception: at System.Environment.get_StackTrace()
   at Tomboy.WebSync.Api.OAuth.MakeWebRequest(RequestMethod method, System.String url, System.Collections.Generic.List`1 parameters, System.String postData)
   at Tomboy.WebSync.Api.OAuth.WebRequest(RequestMethod method, System.String url, System.String postData)
   at Tomboy.WebSync.Api.OAuth.Get(System.String uri, IDictionary`2 queryParameters)
   at Tomboy.WebSync.Api.UserInfo.GetUser(System.String userUri, IWebConnection connection)
   at Tomboy.WebSync.WebSyncServer.BeginSyncTransaction()
   at Tomboy.Sync.SyncManager.SynchronizationThread()
[ERROR 20:33:30.635] Synchronization failed with the following exception: The remote server returned an error: (404) NOT FOUND.
  at System.Net.HttpWebRequest.CheckFinalStatus (System.Net.WebAsyncResult result) [0x00000]
  at System.Net.HttpWebRequest.SetResponseData (System.Net.WebConnectionData data) [0x00000]

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

WORKAROUND:
Please download the script from http://people.canonical.com/~roman.yepishev/ubuntuone-scripts/tomboy-recovery.py and run it. The script will request new tokens and automatically update Tomboy configuration.

i have to reregister tomboy with ubuntuone server.
it asks to register computer name "None" and then the sync works.
but my computer is already registerd with it's "real" name.

i think there is some inconsistency in registering the machines...?!

tekstr1der (tekstr1der) wrote :

I am seeing the exact same stream of messages in the terminal. I can no longer sync my notes. Based on the previous comment, I assume the workaround is to now re-register my system with the ubuntuone server?

tekstr1der (tekstr1der) wrote :

getting a different error (500) today:

:~$ tomboy
[INFO 08:09:54.286] Initializing Mono.Addins
[ERROR 08:09:59.183] Caught exception. Message: The remote server returned an error: (500) INTERNAL SERVER ERROR.
[ERROR 08:09:59.185] Stack trace for previous exception: at System.Net.HttpWebRequest.CheckFinalStatus (System.Net.WebAsyncResult result) [0x00000]
  at System.Net.HttpWebRequest.SetResponseData (System.Net.WebConnectionData data) [0x00000]
[ERROR 08:09:59.187] Rest of stack trace for above exception: at System.Environment.get_StackTrace()
   at Tomboy.WebSync.Api.OAuth.MakeWebRequest(RequestMethod method, System.String url, System.Collections.Generic.List`1 parameters, System.String postData)
   at Tomboy.WebSync.Api.OAuth.WebRequest(RequestMethod method, System.String url, System.String postData)
   at Tomboy.WebSync.Api.OAuth.Get(System.String uri, IDictionary`2 queryParameters)
   at Tomboy.WebSync.Api.UserInfo.GetUser(System.String userUri, IWebConnection connection)
   at Tomboy.WebSync.WebSyncServer.BeginSyncTransaction()
   at Tomboy.Sync.SyncManager.SynchronizationThread()
[ERROR 08:09:59.188] Synchronization failed with the following exception: The remote server returned an error: (500) INTERNAL SERVER ERROR.
  at System.Net.HttpWebRequest.CheckFinalStatus (System.Net.WebAsyncResult result) [0x00000]
  at System.Net.HttpWebRequest.SetResponseData (System.Net.WebConnectionData data) [0x00000]

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

Roman Yepishev (rye) wrote :

Hello,

It looks like the authorization tokens became missing for tomboy.
Could you please check whether this is the case:

1. Please open https;//one.ubuntu.com/account/machines/ in your browser.
2. Open gconf-editor and navigate to /apps/tomboy/sync/tomboyweb/oauth_token
3. Please check whether at least one of the token in parentheses on /account/machines/ tab matches the value of oauth_token key in gconf-editor.

In either case please reply to this bug report. Please do not post screenshots of gconf-editor as oauth_token_secret should not be disclosed to anyone else.

Roman Yepishev (rye) on 2010-05-07
Changed in tomboy (Ubuntu):
assignee: nobody → Roman Yepishev (rye)
status: New → Incomplete
tekstr1der (tekstr1der) wrote :

Thanks for getting on this. Yes, the auth_token value matches the computer account specific to Tomboy.

tekstr1der (tekstr1der) wrote :

Also, just successfully synced without changing anything. I believe it was server-side issues which were the root cause. This bug should be marked invalid...

Roman Yepishev (rye) wrote :

@tekstr1der, in your case the problem might have been the failure to update the views.
Since the original poster was specifically specifying the error "The remote server returned an error: (404) NOT FOUND."

i will leave this report as incomplete until somebody having the same problem writes about the results with of gconf checks.

Roman Yepishev (rye) wrote :

Those who are affected by this bug can fetch new OAuth credentials without clearing sync state.

Please download the script from http://people.canonical.com/~roman.yepishev/ubuntuone-scripts/tomboy-recovery.py and run it.
This script will request new access token, open the browser for you to authorize the application (you might want to set the name of machine to "Tomboy @ host name") and then it will update Tomboy gconf settings with new credentials.

rtg@buzz:~/Projects/ubuntuone/ubuntuone-scripts$ python tomboy-reauthorize.py
Key: rCM4v5vk9Ch75aVtXk4q
Secret: gqd7K9mMzn7K5lgP2nKfVg5WFdjG9lM54QQ5wXMf1dZWcBH0vfLq7tBVTjMDqSsx6MFDb7LntZtM6q1Z

It is OK if this command will output the exception of such kind:
 exceptions.Exception: Invalid request token: 75TXSxk2S93cVMhxbRRs
This is bug 509556 and it does not prevent authorization from completing.

Roman Yepishev (rye) on 2010-05-08
description: updated
Roman Yepishev (rye) on 2010-05-08
summary: - Tomboy 1.2.1 can't synchronize Notes to ubuntuone Server not found (404)
+ Can't synchronize Tomboy Notes: Server returned 404 NOT FOUND

The script tomboy-recovery.py did not work for me.

I had to delete the OAuth credentials in gconf /apps/tomboy/sync/tomboyweb/ and re-authenticate. Now sync is working just fine again.

Thanks,

Frank

@alien8 did you previously try the Clear button in the Sync preferences? It does the same thing as deleting those credentials, but should be safer.

alien8 (fb-alien8) wrote :

Hi Sandy,

Yep. I'd like to confirm that the "Clear" button works. Sorry, I didn't noticed it or I was afraid it might clear notes.

Thanks,

Frank

AbuDawud (abudawud0) wrote :

Attaching reproduction steps from duplicate bug 681109 as I do not see them here:

Author: Jacob Geigle

Reproducability:
1. tomboy -debug &> tomboy.dbg
2. select "Synchronize notes" from tray icon menu
3. select exit from tray icon menu

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: tomboy 1.4.0-0ubuntu2
ProcVersionSignature: Ubuntu 2.6.35-22.35-generic 2.6.35.4
Uname: Linux 2.6.35-22-generic x86_64
NonfreeKernelModules: nvidia
Architecture: amd64
Date: Wed Nov 24 11:35:36 2010
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release amd64 (20100429)
ProcEnviron:
 LANG=en_US.utf8
 SHELL=/bin/bash
SourcePackage: tomboy

Jacob Geigle (techie-xtlive) wrote :

Attach: complete configuration for tomboy

~/.local/share/tomboy -> tomboy.local
~/.gconf/apps/tomboy -> tomboy.gconf
~/.config/tomboy -> tomby.config

The workarounds suggested in bug #575937 were tried. The problem was not solved. Additionally, all relevant config directories were deleted and tomboy allowed to recreate them on its next run.

Workarounds:

jacob@thor:~/Downloads$ python tomboy-reauthorize.py
Traceback (most recent call last):
  File "tomboy-reauthorize.py", line 6, in <module>
    from ubuntuone.oauthdesktop.auth import AuthorisationClient
ImportError: No module named oauthdesktop.auth

jacob@thor:~/Downloads$ python tomboy-recovery.py
Starting with path: /home/jacob/.local/share/tomboy
Making sure that desktop-couch is starting properly...
Done. CouchDB is running on port 35741

Jacob Geigle (techie-xtlive) wrote :

I was able to solve this by doing the following:
System->Preferences->Passwords and Encryption Keys
Delete the ubuntuone key
re-setup tomboy to sync with ubuntuone

works

side note: add an option to "reauthorize" with ubuntuone in sync prefs?

Sanchola (sanchola) wrote :

I have this problem on machine 2/3. Machine 1 syncs without any problems. I have not tested machine 3. I have attached the output from tomboy --debug.

Will try solution from #14 and #13 and report back.

Sanchola (sanchola) wrote :

Ok, I cleared the keys using the clear button and now have a working Tomboy synchronization. tomboy-recovery.py also did not work for me. All it returned was:

$ python tomboy-recovery.py
Starting with path: /home/user/.local/share/tomboy
Making sure that desktop-couch is starting properly...
Done. CouchDB is running on port 49675

Rodney Dawes (dobey) wrote :

Can someone please look at this? It's already got 5 dupes and we seem to be getting more people having the problem in #ubuntuone on IRC.

Changed in ubuntuone-servers:
assignee: nobody → Ubuntu One Foundations+ team (ubuntuone-foundations+)
importance: Undecided → High
status: New → Confirmed
zenith (lasse-bigum) wrote :

I am affected by this as well, whenever I try to sync, I just get:
Could not synchronize note. Check the details below and try again.

The "Details" windows is empty, though.

When starting Tomboy with -debug, I get the attached logtraces, but the gist of it seems to be:

[ERROR 15:46:21.956] 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

Martin Pool (mbp) wrote :

One interesting thing: in the settings panel it had "Tomboy Web" selected with a server of https://one.ubuntu.com/notes/ even though there's a separate Service for Ubuntu One. Could it be that points to a different url?

Clicking Clear then choosing Ubuntu One got things going again. However now I have conflicts on all the notes I edited in the last week or two :-(

@zenith the "DateTime" bug is another one. #709378.

https://bugs.launchpad.net/ubuntuone-servers/+bug/709378

Thomas N (konstigt) wrote :

I have also had this bug for a couple of weeks. Biggest problem is I didn't know it! Tomboy hasn't complained except when I did a manual sync (which I usually don't do). There should be a popup with a warning if sync fails. I use the dropbox desktop client, it does all that quite well, maybe some ideas could be borrowed from it.

drivebull (drivebull) wrote :

I JUST RESOLVED MY CASE.

I was affected by the problem as well, whenever I tried to sync, I just got:

"Could not synchronize note. Check the details below and try again."
...but the "Details" windows was empty.

I think the problem started after I added some new notes via the Ubuntu One web interface; some date strings probably got messed on the server side so the sync couldn't be performed anymore.

After some hours passed trying many different ways, my solution was this:

1) For ALL of your synchronized computers, back up the local folder, located in ~/.local/share/tomboy/ (for lucid and maverick).

2) If you know that you have some notes that are on the Ubuntu One server but not on your computer(s), because you entered them via the Ubuntu One web interface and got not synchronized, copy them somehow, e.g. via copy+paste into a notepad or gedit.

3) Go to your Ubuntu One account and delete at least the most recent notes that you entered via the Web interface; you can delete all the notes if you want.

4) Now Tomboy should sync; of course, all the notes that you deleted from the server are deleted from your computer now.

5) For ALL of your computer, SHUT DOWN Tomboy and copy the files from the Tomboy Backup folder into ~/.local/share/tomboy- , then restart Tomboy and synchronize.

6) Create again the notes that you saved on step 2.

I'm so happy my systems are in sync again, I hope this writing will help you as well.

Guido Torelli

PeterPall (peterpall) wrote :

Had to recover my tomboy again from this bug - which I triggered by making my couchdb reauthenticate at the ubuntu one server by the standard method from freedesktop.org. Hoped it would repair contact sync. But at least found a way to recover tomboy that is relatively easy:

- Start gconf-editor
- unset the key /apps/tomboy/sync/sync_selected_service_admin
- unset all keys in /apps/tomboy/sync/ubuntuone
- Restart tomboy
- Set up syncing with ubuntu one again from tomboy.

Rigved Rakshit (rigved) wrote :

I just used the clear button in the Sync Preferences. It reset my configuration settings and everything is working now. I think that I may have deleted the ubuntuone original key. Then, when I had set up ubuntuone, I forgot to set up tomboy separately.

Tom Durrant (thdurrant) wrote :

I have been effected by this bug for a long time. In the end, I resorted to using dropbox, which works reasonably well (with no web access or course). Recently, dropbox access has been blocked at work, prompting me to look at this again.

I tried most of the things mentioned above, to no avail. Then I read some other bug reports with complaints about conflicts in templates (templates do not show up in note lists, so cannot be deleted manually.

So, I deleted these manually with the following procedure

quit tomboy

Romove all notes from web server. I found the easiest way to do this was to sync an empty tomboy instance to the web.

Move old tomboy notes to backup:
mv ~/.local/share/tomboy ~/.local/share/tomboy.bak

Restart tomboy, which will create a new library.
Delete all notes (start here etc)
Set up sync to ubuntu one web account and sync.
Check online at ubuntu one to see that all notes are gone.
quit tomboy

Then, clean out all old template notes from backup library

cd ~/.local/share/tomboy.bak

locate old template notes, those that have been renamed in previous sync attempts.

grep "Template (old)" *

remove the offending notes (rm ...)

Move library back to where tomboy expects it

rm -fr ~/.local/share/tomboy
cp ~/.local/share/tomboy.bak ~/.local/share/tomboy

restart tomboy, and sync to ubuntu one.

This seems to have fixed my system now, and I have 419 notes synced to the web.

Hope this helps

Davim (davim) wrote :

The workaround script worked for me.

Dudytz (dudytz) on 2011-12-13
summary: - Can't synchronize Tomboy Notes: Server returned 404 NOT FOUND
+ Can't synchronize Tomboy Notes with Ubuntu One
Haw Loeung (hloeung) wrote :

$ python tomboy-recovery.py
Starting with path: /home/hloeung/.local/share/tomboy
Making sure that desktop-couch is starting properly...
Done. CouchDB is running on port 53889
Traceback (most recent call last):
  File "tomboy-recovery.py", line 212, in <module>
    main(path)
  File "tomboy-recovery.py", line 62, in main
    process_note( note_uuid )
  File "tomboy-recovery.py", line 76, in process_note
    tomboy_note = TomboyNote(note_uuid, create=False)
  File "tomboy-recovery.py", line 174, in __init__
    self.fetch(path)
  File "tomboy-recovery.py", line 186, in fetch
    doc = xml.dom.minidom.parse(path)
  File "/usr/lib/python2.7/xml/dom/minidom.py", line 1914, in parse
    return expatbuilder.parse(file)
  File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 924, in parse
    result = builder.parseFile(fp)
  File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 211, in parseFile
    parser.Parse("", True)
xml.parsers.expat.ExpatError: no element found: line 1, column 0

Haw Loeung (hloeung) wrote :

Rigved Rakshit (r.phate) 's suggestion worked for me. Clearing and re-authing worked.

Paul Hummer (rockstar) on 2012-02-29
Changed in ubuntuone-servers:
status: Confirmed → Fix Released

I managed to fix this following this instruction:
------------------------------
I opened the Tomboy Preferences, and on the first tab (Editing), clicked "New Note Template". I then renamed the Template title to "Title" instead of "New Note Template". Then closed this template note, and synchronization worked.
------------------------------
Which I got from Ask Ubuntu:
http://askubuntu.com/questions/71733/tomboy-notes-failed-to-synchronize

Roman Yepishev (rye) wrote :

Notes sync is no longer supported. Marking as Won't Fix.

Changed in tomboy (Ubuntu):
assignee: Roman Yepishev (rye) → nobody
Roman Yepishev (rye) wrote :

On the other hand the server side was indeed fixed at some point so Fix Released for u1 servers and Incomplete status for tomboy looks ok.

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

Other bug subscribers

Related questions