Tomboy throw error when saving synchronisation setting (webdav)

Bug #207208 reported by emanuel indermühle
8
Affects Status Importance Assigned to Milestone
tomboy
Fix Released
High
tomboy (Ubuntu)
Fix Released
Low
Ubuntu Desktop Bugs

Bug Description

Binary package hint: tomboy

Im using Ubuntu hardy 8.04 (development branch) (installed alpha 5, upgraded until beta).
The problem concerns tomboy 0.10.0-1

When trying to synchronize with a webdav directory (after the workaround for bug #133656)
i tried to save the settings made in the tomboy "options" Dialog within the synchronization tab.
by clicking the button "save"

Then the following error is thrown:
"Connection error :(

Saving configuration to the GNOME keyring failed with the
following message: Unknown error"

while in the log file the following lines are printed:

26.03.2008 17:23:38 [DEBUG]: Mounting sync path with this command: /usr/local/bin/wdfs /home/emanuel/.tomboy/sync-wdfs -a http://dav.inthemill.ch/emanuel/tomboy/ -u emanuel -p ###### -o fsname=tomboywdfs
26.03.2008 17:23:38 [WARN]: Saving configuration to the GNOME keyring failed with the following message: Unknown error
26.03.2008 17:28:38 [DEBUG]: Successfully unmounted wdfs

Then the next thing happening is that nautilus opens a new window, showing
a new drive that is mounted here "/home/emanuel/.tomboy/sync-wdfs"

There are the following problems:
- This error should not come, instead the password should be stored in the keyring
- The password for the webdav connection should not be printed in the logfile
- The mounting of the webdav directory should be silent, there is no need of showing
 this mount point in every nautilus window.

p.s. Since my Ubuntu is in german, some error messages or naming may not be correctly

Revision history for this message
Stacium (stacium) wrote :

I can confirm this bug with Hardy 8.04 (installed RC release, currently up to date)

The problem of storing the password in the logfile seems to be solved, but the keyring error still exists.

gnome-keyring 2.22.2-0ubuntu
tomboy 0.10.1-1
libc6 2.7-10ubuntu3

$ uname -a
Linux desktop 2.6.24-16-generic #1 SMP Thu Apr 10 13:23:42 UTC 2008 i686 GNU/Linux

Revision history for this message
Alexey Nedilko (alexey.nedilko) wrote :
Download full text (3.8 KiB)

I can confirm this bug on Ubuntu 8.04.
The configuration is the following:

uname -a: Linux axe-desktop 2.6.24-18-generic #1 SMP Wed May 28 19:28:38 UTC 2008 x86_64 GNU/Linux

GNOME version: 2.22.2 (built on 03.06.2008 by Ubuntu)

Tomboy version: 0.10.2

mono --version:
Mono JIT compiler version 1.2.6 (tarball)
Copyright (C) 2002-2007 Novell, Inc and Contributors. www.mono-project.com
 TLS: __thread
 GC: Included Boehm (with typed GC)
 SIGSEGV: altstack
 Notifications: epoll
 Architecture: amd64
 Disabled: none

When setting the parameters for WebDAV synchronisation login, I get "Getting configuration from the GNOME keyring failed with the following message: Unknown error" message in .tomboy.log, and saving the settings fails with the message "Saving configuration to the GNOME keyring failed with the following message: Unknown error".

I downloaded the source code of Tomboy 0.10.2 and tried to find out, what was the reason for this error. It appeared that GNOME keyring returned the result code "9" for Find operation, and Tomboy code did not know how to interpret this value, thus throwing "Unknown error" exception.

I've looked into GNOME documentation for GNOME keyring API (http://library.gnome.org/devel/gnome-keyring/stable/gnome-keyring-gnome-keyring-result.html#GnomeKeyringResult) and saw that result codes are described by the following enum:
typedef enum {
 GNOME_KEYRING_RESULT_OK,
 GNOME_KEYRING_RESULT_DENIED,
 GNOME_KEYRING_RESULT_NO_KEYRING_DAEMON,
 GNOME_KEYRING_RESULT_ALREADY_UNLOCKED,
 GNOME_KEYRING_RESULT_NO_SUCH_KEYRING,
 GNOME_KEYRING_RESULT_BAD_ARGUMENTS,
 GNOME_KEYRING_RESULT_IO_ERROR,
 GNOME_KEYRING_RESULT_CANCELLED,
 GNOME_KEYRING_RESULT_KEYRING_ALREADY_EXISTS,
 GNOME_KEYRING_RESULT_NO_MATCH
} GnomeKeyringResult;

Comparing this declaration to the similar one in Tomboy code (Gnome.Keyring.ResultCode enum, defined in Tomboy/Gnome.Keyring/ResultCode.cs):
 public enum ResultCode {
  Ok,
  Denied,
  NoKeyringDaemon,
  AlreadyUnlocked,
  NoSuchKeyring,
  BadArguments,
  IOError,
  Cancelled,
  AlreadyExists
 }
one can see that the value NO_MATCH (ordinal 9) isn't present in Tomboy's ResultCode enumeration.

So the scenario that reproduces the bug is the following:
When showing the dialog page with WebDAV sychronization parameters, Tomboy tries to find the WebDAV credentials in GNOME keyring. If they aren't present there (and that's also the case when the WebDAV sychronization is set up for the first time), GNOME keyring returns NO_MATCH value, meaning "No such item is present in the keyring". Tomboy is unable to interpret the result code, since it's not present in Gnome.Keyring.ResultCode enum, and throws KeyringException with "Unknown error" message. When saving the credentials to the keyring, it calls the Find() operation again in order to determine, whether it should create a new keyring item or update the existing one. So the Find() operation throws again, and "Saving.... failed.." dialog box is shown.

Having found out this, I've prepared the patch that fixes the bug. The patch consists of two changes:
1) The value NoMatch (ordinal value 9) is added to Gnome.Keyring.ResultCode enumeration.
2) ...

Read more...

Revision history for this message
Alexey Nedilko (alexey.nedilko) wrote :
Revision history for this message
Stacium (stacium) wrote :

Patch confirmed. Thanks!

I guess this bug can be closed as soon as the fix is applied in the upstream version of Tomboy (http://bugzilla.gnome.org/show_bug.cgi?id=499841#c18)

Changed in tomboy:
assignee: nobody → desktop-bugs
importance: Undecided → Low
status: New → Triaged
Changed in tomboy:
status: Unknown → Confirmed
Changed in tomboy:
status: Confirmed → Fix Released
Changed in tomboy:
status: Triaged → Fix Committed
Revision history for this message
Nixblicker (el-lunatico) wrote :

Hi there,

thank you for fixing this annoying error, circumvented this bug by manually mounting webdav via fuse before.( But never ever forget to mount before syncing, you'll face a lot of trouble...)

Could someone oof you help me out to actually apply this bugfix to my Tomboy setup. Do i have to recompile the whole package or what do i have to do with this kind .diff files?

Sorry for that probably noobish question but i'm not much of a programmer.

Thank you very much
Cheers, Nix

Revision history for this message
Alexey Nedilko (alexey.nedilko) wrote :

Hi Nixblicker,

This bugfix is present in Tomboy 0.12. You should just install this (or later) version.

Revision history for this message
Nixblicker (el-lunatico) wrote :

Thank you for your advice, Alexey.

But - as i have a probably somehow extraordinary setup (Hardy on a G4 Powerbook (PPC architecture - 2.6.24-23-powerpc)) that won't be that easy to do as the newest announced version of Tomboy for this special port repo is 0.10.2-0ubuntu1.
Please correct me if i'm wrong but i suppose i have to wait until a nice developer had ported the newer version to my type of arch., right?
Are there any alternatives to correct this bug in my actual version and how could i archieve them?

Thanks in advance
Cheers, Nix

Changed in tomboy (Ubuntu):
status: Fix Committed → Fix Released
Changed in tomboy:
importance: Unknown → High
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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