Copying contacts from Google to CouchDB (Ubuntu One) gives a non-specific error

Bug #473616 reported by Ilmari Vacklin
112
This bug affects 26 people
Affects Status Importance Assigned to Milestone
evolution-couchdb (Ubuntu)
Fix Released
High
Rodrigo Moya

Bug Description

Update by levu:

It happens, that you can't copy contact into the u1 address book because of a 'conflict' (see #14 for more information)

Original bug report:

Binary package hint: evolution

I have a working Google account synchronisation for my contacts in Evolution. If I try to copy a contact via right-click -> copy contact to, and select Ubuntu One, I get an "Error adding contact" dialog, with the text "Other error" inside the dialog, and an OK button. This was rather unsettling when I got a hundred of these windows, trying to copy all the contacts in one go. :)

ProblemType: Bug
Architecture: i386
Date: Wed Nov 4 03:20:13 2009
DistroRelease: Ubuntu 9.10
ExecutablePath: /usr/bin/evolution
Package: evolution 2.28.1-0ubuntu1
ProcEnviron:
 LANG=fi_FI.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-14.48-generic
SourcePackage: evolution
Tags: ubuntu-unr
Uname: Linux 2.6.31-14-generic i686

Revision history for this message
Ilmari Vacklin (wolverian) wrote :
affects: evolution (Ubuntu) → evolution-couchdb (Ubuntu)
Revision history for this message
Rodrigo Moya (rodrigo-moya) wrote :

Could you please run the following on a terminal:

1st, quit evolution, then:

$ evolution --force-shutdown
$ /usr/lib/evolution/evolution-data-server-2.28

then, restart evolution (run it from the menu or another terminal) and try to copy all Google contacts again. Then, when you get the error dialog, please copy all the output you got on the terminal and paste it here

Changed in evolution-couchdb (Ubuntu):
assignee: nobody → Rodrigo Moya (rodrigo-moya)
status: New → Incomplete
Revision history for this message
Paul Roach (roachy) wrote :
Download full text (16.4 KiB)

This also affects me - although my contact data in evolution is from an Exchange 2003 Server. It seems to simply be an issue copying data from one Evolution address book to the CouchDB address book. Don't mean to hijack the bug report but saw inactivity and am experiencing the same bug. Output from the terminal is:

evolution-data-server-Message: Starting server
e-data-server-Message: adding type `ECalBackendGoogleTodosFactory'
e-data-server-Message: adding type `ECalBackendGoogleEventsFactory'
e-data-server-Message: adding type `EBookBackendGoogleFactory'
e-data-server-Message: adding type `ECalBackendHttpTodosFactory'
e-data-server-Message: adding type `ECalBackendHttpEventsFactory'
e-data-server-Message: adding type `ECalBackendHttpMemosFactory'
e-data-server-Message: adding type `ECalBackendCalDAVEventsFactory'
e-data-server-Message: adding type `ECalBackendCalDAVTodosFactory'
e-data-server-Message: adding type `ECalBackendCalDAVMemosFactory'
e-data-server-Message: adding type `EBookBackendGroupwiseFactory'
e-data-server-Message: adding type `EBookBackendLDAPFactory'
e-data-server-Message: adding type `ECalBackendFileTodosFactory'
e-data-server-Message: adding type `ECalBackendFileEventsFactory'
e-data-server-Message: adding type `ECalBackendFileJournalFactory'
e-data-server-Message: adding type `EBookBackendCouchDBFactory'
e-data-server-Message: adding type `ECalBackendWeatherEventsFactory'
e-data-server-Message: adding type `EBookBackendVCFFactory'
e-data-server-Message: adding type `ECalBackendGroupwiseTodosFactory'
e-data-server-Message: adding type `ECalBackendGroupwiseEventsFactory'
e-data-server-Message: adding type `ECalBackendGroupwiseJournalFactory'
e-data-server-Message: adding type `ECalBackendContactsEventsFactory'
e-data-server-Message: adding type `EBookBackendFileFactory'
e-data-server-Message: adding type `EBookBackendWebdavFactory'
in server_log_handler
evolution-data-server-Message: Server up and running
impl_GNOME_Evolution_Addressbook_BookFactory_getBook
 + file:///home/roachy/.evolution/addressbook/local/system
 => 0x9d2e8f0
impl_GNOME_Evolution_Addressbook_Book_open (0x9d2e8f0)

(process:18445): libedata-book-WARNING **: impl_GNOME_Evolution_Addressbook_Book_getBookView ((contains "x-evolution-any-field" ""))

e_data_book_respond_get_book_view
book_view file uref
impl_GNOME_Evolution_Addressbook_BookFactory_getBook
 + couchdb://127.0.0.1
 => 0x9d4d4c0
impl_GNOME_Evolution_Addressbook_Book_open (0x9d4d4c0)
in server_log_handler

** (process:18445): WARNING **: g_set_application_name not set.

liboauth: data to sign='GET&http%3A%2F%2F127.0.0.1%3A33677%2Fcontacts%2F&oauth_callback%3DNone%26oauth_consumer_key%3DLkbynOeTPM%26oauth_nonce%3Dj_f4cBp0vBsC4R83FJyoGkzcWh_2k%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1259323177%26oauth_token%3DmpkFsSCRBr%26oauth_verifier%3DNone%26oauth_version%3D1.0'

liboauth: key='sJqPztCnzK&NXrcirdjtp'

in server_log_handler
** (process:18445): DEBUG: Parsing oauth_callback=None&oauth_consumer_key=LkbynOeTPM&oauth_nonce=j_f4cBp0vBsC4R83FJyoGkzcWh_2k&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1259323177&oauth_token=mpkFsSCRBr&oauth_verifier=None&oauth_version=1.0&oauth...

Revision history for this message
Rodrigo Moya (rodrigo-moya) wrote :

hmm, what version of libcouchdb-glib and evolution-couchdb are you running? If they are older than the ones available at https://edge.launchpad.net/~ubuntuone/+archive/beta , could you please try installing those and see if you see the error? I fixed something similar in evo-couchdb 0.3.3 or 0.3.4, so I think it should be fixed by those packages

Revision history for this message
Alessandro Trento (alessandro-trento) wrote : Re: [Bug 473616] Re: Copying contacts from Google to CouchDB (Ubuntu One) gives a non-specific error

I don't know how to see my current version of libcouchdb-glib and
evolution-couchdb I'm running...

and, as you see I'm not very good in english!

I have re-installed ubuntu 9.10, but I have the same problem!

If I edit contact on web (from one.ubuntu.com) they appear also in
Evolution (couchDB)... but if I try to copy from my personal address
book into couchDB Evolution said "Error"...

Il giorno ven, 27/11/2009 alle 12.34 +0000, Rodrigo Moya ha scritto:
> hmm, what version of libcouchdb-glib and evolution-couchdb are you
> running? If they are older than the ones available at
> https://edge.launchpad.net/~ubuntuone/+archive/beta , could you please
> try installing those and see if you see the error? I fixed something
> similar in evo-couchdb 0.3.3 or 0.3.4, so I think it should be fixed by
> those packages

Revision history for this message
Rodrigo Moya (rodrigo-moya) wrote :

You look at what version is installed with:

$ dpkg -l libcouchdb-glib-1.0-1

and

$ dpkg -l evolution-couchdb

Reinstalling 9.10 won't fix the problem, since you need to use the latest packages for those 2, so please, if the version numbers are lower than the ones in https://edge.launchpad.net/~ubuntuone/+archive/beta, install the packages from that PPA. To install them, just do:

$ sudo vim /etc/apt/sources.list

and add, at the end of the file, these 2 lines:

deb http://ppa.launchpad.net/ubuntuone/beta/ubuntu karmic main
deb-src http://ppa.launchpad.net/ubuntuone/beta/ubuntu karmic main

then, on a terminal:

$ sudo apt-get update
$ sudo apt-get upgrade

once the upgrade has finished, log out and log in again, to make sure you run the latest version of the packages

Revision history for this message
Alessandro Trento (alessandro-trento) wrote :

Il giorno ven, 27/11/2009 alle 17.43 +0000, Rodrigo Moya ha scritto:
> You look at what version is installed with:
>
> $ dpkg -l libcouchdb-glib-1.0-1

                Desiderato=Unknown/Install/Remove/Purge/Hold
                |
                Stato=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
                |/ Err?=(nessuno)/Reinst-required (Stato,Err:
                maiuscolo=grave)
                ||/ Nome Versione Descrizione
                +++-==============-==============-============================================
                ii libcouchdb-gli 0.5.2-0ubuntu1 GLib-based API for
                CouchDB

> and
>
> $ dpkg -l evolution-couchdb

                Desiderato=Unknown/Install/Remove/Purge/Hold
                |
                Stato=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
                |/ Err?=(nessuno)/Reinst-required (Stato,Err:
                maiuscolo=grave)
                ||/ Nome Versione Descrizione
                +++-==============-==============-============================================
                ii evolution-couc 0.3.2-0ubuntu2 Evolution support for
                CouchDB databases

> Reinstalling 9.10 won't fix the problem, since you need to use the
> latest packages for those 2, so please, if the version numbers are lower
> than the ones in https://edge.launchpad.net/~ubuntuone/+archive/beta,
> install the packages from that PPA. To install them, just do:
>
> $ sudo vim /etc/apt/sources.list

> and add, at the end of the file, these 2 lines:
>
> deb http://ppa.launchpad.net/ubuntuone/beta/ubuntu karmic main
> deb-src http://ppa.launchpad.net/ubuntuone/beta/ubuntu karmic main

 DONE

> then, on a terminal:
>
> $ sudo apt-get update

                DONE, but: W: Errore GPG: http://ppa.launchpad.net
                karmic Release: Le seguenti firme non sono state
                verificate perché la chiave pubblica non è disponibile:
                NO_PUBKEY 4DA51AF64BD0ECAE

> $ sudo apt-get upgrade
>
 DONE
>
> once the upgrade has finished, log out and log in again, to make sure
> you run the latest version of the packages
>

I have restarted system and tried again "$ sudo apt-get update", but it
appears again " W: Errore GPG: http://ppa.launchpad.net karmic Release:
Le seguenti firme non sono state verificate perché la chiave pubblica
non è disponibile: NO_PUBKEY 4DA51AF64BD0ECAE "

Revision history for this message
Rodrigo Moya (rodrigo-moya) wrote :

Ignore the GPGkey error, and run 'sudo apt-get upgrade', please

Revision history for this message
Davide Alberelli (dadexix86) wrote :

This bug affects also me. Whenever I try to copy contacts from local to ubuntu one it returns me "Other Error".

I'm on Lucid 10.04 and haveThese versions of that previous packages:
davide@davide-desktop:~$ apt-cache show libcouchdb-glib-1.0-2 | grep Ver
Version: 0.6.3-0ubuntu1
davide@davide-desktop:~$ apt-cache show evolution-couchdb | grep Ver
Version: 0.4.5-0ubuntu1

Revision history for this message
levu (levu) wrote :
Download full text (3.7 KiB)

There are some inconsistences in libebook on the one hand and desktopcouch on the other hand. libebook returns sometimes NULL on e_contact_get_const, and desktopcouch failes on NULL passed as second argument to desktopcouch_document_contact_set_* (you can it in the logs).
This patch fixes this issue.
I don't know if that's the only problem: (My logs of evolution-data-server-2.28 are at the end)
This patch should fix the 3 CRITICALs but i don't know where the warning
'Could not PUT document: Conflict' comes from since i dont know much about the evolution/couchdb/desktopcouch source.

I hope this patch helps and fix the bug

Florian

$ /usr/lib/evolution/evolution-data-server-2.28
evolution-data-server-Message: Starting server
e-data-server-Message: adding type `EBookBackendGoogleFactory'
e-data-server-Message: adding type `EBookBackendVCFFactory'
e-data-server-Message: adding type `ECalBackendFileTodosFactory'
e-data-server-Message: adding type `ECalBackendFileEventsFactory'
e-data-server-Message: adding type `ECalBackendFileJournalFactory'
e-data-server-Message: adding type `EBookBackendLDAPFactory'
e-data-server-Message: adding type `ECalBackendCalDAVEventsFactory'
e-data-server-Message: adding type `ECalBackendCalDAVTodosFactory'
e-data-server-Message: adding type `ECalBackendCalDAVMemosFactory'
e-data-server-Message: adding type `EBookBackendWebdavFactory'
e-data-server-Message: adding type `EBookBackendFileFactory'
e-data-server-Message: adding type `ECalBackendContactsEventsFactory'
e-data-server-Message: adding type `EBookBackendCouchDBFactory'
e-data-server-Message: adding type `ECalBackendHttpTodosFactory'
e-data-server-Message: adding type `ECalBackendHttpEventsFactory'
e-data-server-Message: adding type `ECalBackendHttpMemosFactory'
e-data-server-Message: adding type `ECalBackendGroupwiseTodosFactory'
e-data-server-Message: adding type `ECalBackendGroupwiseEventsFactory'
e-data-server-Message: adding type `ECalBackendGroupwiseJournalFactory'
e-data-server-Message: adding type `ECalBackendGoogleTodosFactory'
e-data-server-Message: adding type `ECalBackendGoogleEventsFactory'
e-data-server-Message: adding type `EBookBackendGroupwiseFactory'
e-data-server-Message: adding type `ECalBackendWeatherEventsFactory'
in server_log_handler
evolution-data-server-Message: Server up and running
impl_GNOME_Evolution_Addressbook_BookFactory_getBook
 + file:///home/florian/.evolution/addressbook/local/system
 => 0x9698e60
impl_GNOME_Evolution_Addressbook_Book_open (0x9698e60)
impl_GNOME_Evolution_Addressbook_BookFactory_getBook
 + file:///home/florian/.evolution/addressbook/local/system
 => 0x96c8d20
impl_GNOME_Evolution_Addressbook_Book_open (0x96c8d20)

(process:21236): libedata-book-WARNING **: impl_GNOME_Evolution_Addressbook_Book_getBookView ((contains "x-evolution-any-field" ""))

e_data_book_respond_get_book_view
book_view file uref

(process:21236): libedata-book-WARNING **: impl_GNOME_Evolution_Addressbook_Book_getBookView ((contains "x-evolution-any-field" ""))

e_data_book_respond_get_book_view
book_view file uref
impl_GNOME_Evolution_Addressbook_BookFactory_getBook
 + couchdb://127.0.0.1
 => 0x96bfc30
impl_GNOME_Evolution_Addressbook_...

Read more...

Changed in evolution-couchdb (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Martin Albisetti (beuno) wrote :

bumping to high because it now has a patch :)

Changed in evolution-couchdb (Ubuntu):
status: Confirmed → Triaged
importance: Undecided → High
Revision history for this message
John Lenton (chipaca) wrote :

@levu, in order for us to accept the patch into evolution-couchdb we need you to sign the contributor agreement. It's fairly straightforward, http://www.canonical.com/contributors
Thanks!

Revision history for this message
levu (levu) wrote :

@John: I hope i have done everything needed, so that you can include the patch :)

tags: added: patch
Revision history for this message
Rodrigo Moya (rodrigo-moya) wrote :

We don't need (C) assignment for evolution-couchdb, since it's in GNOME GIT. About the patch, it no longer applies to GIT master, and the warnings are harmless, so if you pass a NULL to couchdb_document_contact_set_* (what was desktopcouch_document_contact_set_*), you see that warning but the value is not set.

from comment #10 though, the error is clear: Conflict. This means that there is a contact with the same ID in the U1 addressbook. I guess it was removed, and so stays in the database marked as deleted, but when updating documents in CouchDB, you need to provide the revision you are using for updating, and if not, it returns a Conflict error. This is a hard bug to solve, since we could just check for the conflict error, and get the old document and try again with the correct revision. But that would mean removing changes that have come from other means (replication, for instance).

So, to confirm this is the bug, can you save as vcard (from the right-click menu in evolution addressbook) the conflicting contact?

Revision history for this message
levu (levu) wrote :

I moved all contacts via drag'n'drop to a local address book and wanted to move them back, but none of these contacts could be moved back. So from this experience and from what you told, Rodrigo, i guess, the problem is, that the contacts are not really deleted, if i move them from the u1addressbook to an other one. I'll have a look at the code, maybe i find the problem.

I'll change the bug description and the meta information.

tags: removed: patch
Changed in evolution-couchdb (Ubuntu):
status: Triaged → Incomplete
description: updated
Revision history for this message
levu (levu) wrote :

I attached a sample vcard (i exported one of the'problem contacts' and edited the name and email address). I hope i can help you...

Revision history for this message
Rodrigo Moya (rodrigo-moya) wrote :

Right, this contact was copied from U1, so it has the revison on it:

X-COUCHDB-REVISION:2-f5f6eaa11a27d9152323b29a5fb1d2e8

so it is the problem I was talking about. I guess the best would be to check for the conflict error, and if there is a conflict, try getting the old document, and use the revision from it

Revision history for this message
Rodrigo Moya (rodrigo-moya) wrote :

The correct way would be to remove the X-COUCHDB-REVISION when copying to other addressbooks, but there is no way in the CouchDB backend to know when that happens

Revision history for this message
levu (levu) wrote :

Is it necessary to give the X-COUCHDB-REVISION field to evolution? maybe we should never give this information out and just use it internally, is that a solution? Or does evolution need the revision number?

Revision history for this message
jsribeiro (jsribeiro) wrote :

Has there been any Evolution on this?
I suffer the same on Maverick, and I did a fresh reinstall of the system (with hdd format). Can't delete records on U1, contact sync simply stalls ubuntuone-syncdaemon with the following log (./cache/ubuntuone/log/syncdaemon.log):

"
2010-10-30 16:09:59,305 - ubuntuone.SyncDaemon.Main - NOTE - ---- MARK (state: <State: 'QUEUE_MANAGER' (queues IDLE connection 'With User With Network')>; queues: metadata: 0; content: 0; hash: 0, fsm-cache: hit=7 miss=1) ----
2010-10-30 16:10:36,407 - ubuntuone.SyncDaemon.HQ - INFO - HashQueue: _hasher stopped
2010-10-30 16:10:36,408 - ubuntuone.SyncDaemon.DBus - INFO - Shuttingdown DBusInterface!
2010-10-30 16:10:36,415 - ubuntuone.SyncDaemon.StorageClient - INFO - Connection lost, reason: [Failure instance: Traceback (failure with no frames): <class 'twisted.internet.error.ConnectionDone'>: Connection was closed cleanly.
].
2010-10-30 16:10:36,416 - ubuntuone.SyncDaemon.ActionQueue - WARNING - Connection lost: Connection was closed cleanly.
"

Furthermore, the U1 web interface seems to be a bit confused. Refer to image attached. It shows two contacts and says I have zero! (the dashboard page shows two contacts correctly)

I'm attaching:
     .cache/ubuntuone/log/syncdaemon.log
     .cache/desktop-couch/desktop-couchdb.log.1
     .cache/desktop-couch/desktop-couchdb.stdout.1
     the screenshot of the web interface...

Question: How can we cleanup the database on the U1 servers? I mean drop database... I guess there should be provisions to delete one's U1 account...

Regs
Jorge Ribeiro

Revision history for this message
Rodrigo Moya (rodrigo-moya) wrote :

I've fixed this in the master branch of evolution-couchdb, so that the revisions are stored separately from the VCARD sent to Evolution, and so VCARDs can be moved around easily. Will be in the next unstable release tarball

Changed in evolution-couchdb (Ubuntu):
status: Incomplete → Fix Committed
Revision history for this message
Michael Terry (mterry) wrote :

This made it into 0.5.1, which is in natty. Closing.

Changed in evolution-couchdb (Ubuntu):
status: Fix Committed → Fix Released
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.