GNOME Bugzilla – Bug 648045
Unable to open address book due to bad URI migration
Last modified: 2012-03-15 08:51:33 UTC
Created attachment 186162 [details] Python Script to Repair Gconf URI after 2.32 Upgrade After upgrading from Evolution 2.30 to 2.32 non-system addressbooks are not updated with their new URI locations in gconf data. I believe this issue (or a similar one) may have been previously resolved for the default system addressbook called "Personal" in instance per this bug report: https://bugzilla.gnome.org/show_bug.cgi?id=634897 I have two additional addressbooks named "Autocompleted" and "Palm Contacts" that do not migrate properly, leaving uri="file=.evolution/..." references in the gconf data as shown below. I had this occur during an upgrade from Ubuntu 10.10 (2.30) to 11.04 (2.32) and have been able to repeat it using restored backup data on on fresh virtualbox 10.10 install using backported 2.32 evolution packages. Additional details, and the downstream bug report appear here: https://bugs.launchpad.net/ubuntu/+source/evolution/+bug/761037 My gconf follows: imac@imac-VirtualBox:~$ gconftool-2 --get /apps/evolution/addressbook/sources [<?xml version="1.0"?> <group uid="1227068757.7280.2@repo" name="Google" base_uri="google://" readonly="no"><source uid="1271183030.12287.4@n8-laptop.ianbmacdonald.com" name="XxXxXxX@gmail.com" uri="google://XxXxXxX@gmail.com" relative_uri="XxXxXxX@gmail.com"><properties><property name="completion" value="true"/><property name="auth" value="plain/password"/><property name="username" value="XxXxXxX@gmail.com"/><property name="remember_password" value="true"/><property name="use-in-contacts-calendar" value="1"/><property name="default" value="true"/></properties></source></group> ,<?xml version="1.0"?> <group uid="1227068757.7280.3@repo" name="WebDAV" base_uri="webdav://" readonly="no"/> ,<?xml version="1.0"?> <group uid="1227068758.7280.4@repo" name="On This Computer" base_uri="local:" readonly="no"><source uid="1247672993.12578.0@n8-laptop.ianbmacdonald.com" name="Autocompleted" uri="file:///home/imac/.evolution/addressbook/local/1247672993.12578.0@n8-laptop.ianbmacdonald.com" relative_uri="1247672993.12578.0@n8-laptop.ianbmacdonald.com"><properties><property name="remember_password" value="false"/><property name="use-in-contacts-calendar" value="0"/></properties></source><source uid="1248182182.8574.0@n8-laptop.ianbmacdonald.com" name="Personal" relative_uri="system"><properties><property name="remember_password" value="false"/><property name="use-in-contacts-calendar" value="0"/></properties></source><source uid="1255615812.30055.1@n8-laptop.ianbmacdonald.com" name="Palm Contacts" uri="file:///home/imac/.evolution/addressbook/local/1255615812.30055.1@n8-laptop.ianbmacdonald.com" relative_uri="1255615812.30055.1@n8-laptop.ianbmacdonald.com"><properties><property name="pilot-sync" value="true"/><property name="remember_password" value="false"/><property name="use-in-contacts-calendar" value="0"/></properties></source></group> ,<?xml version="1.0"?> <group uid="1227068758.7280.6@repo" name="On LDAP Servers" base_uri="ldap://" readonly="no"/> ,<?xml version="1.0"?> <group uid="1256843691.10525.0@n8-laptop.ianbmacdonald.com" name="CouchDB" base_uri="couchdb://" readonly="no"><source uid="1256843691.10525.1@n8-laptop.ianbmacdonald.com" name="Ubuntu One" relative_uri="127.0.0.1"><properties><property name="couchdb_instance" value="user"/></properties></source></group> ] imac@imac-VirtualBox:~$ A workaround is to simply run the fix-addressbook.py script provided here: http://www.gentoo.org/proj/en/desktop/gnome/howtos/gnome-2.32-upgrade.xml A modified version (to point to Ubuntu python interpreter) is attached.
I note that this script does not run in 10.10 due to some python/gconf module mismatch. The simple fix is to just use gconf editor and remove the uri= entries from the "On This Computer" value in the /apps/evolution/addressbook/sources key. You can see how the script did this in my downstream bug description where I compare before and after. It seems the relative_uri allows evolution to find the migrated addressbook in .local
I assume that this is a duplicate of bug 634897 which should be fixed, do you agree?
It seems that the scope of the previous patch may have only been to the addressbook identified by the relative_uri="system". My system addressbook did migrate correctly. It was the two other local addressbooks that did not migrate cleanly. Definitely seems related IMHO.
Thanks for a bug report. Could you try to retest with 3.0.x, please? I recall some bug fixes related to similar issues being done for 3.0.x, and I believe this is fixed, but I cannot find the exact bug right now.
NEEDINFO as per last comment.
I can confirm this in a migration to 2.3.2 from 2.28.3 on my Ubuntu 10.04 system. The files in the old .evolution tree were converted/moved to the new .local/share/evolution tree but only the first local Address Book worked. To sum up, only the first "On This Computer" address book sources entry was converted correctly with the relative URI, the remaining Address Books still had the file path to the old .evolution file path left in their definitions. Manually removing the old "uri="file:....." entries using the gconf-editor on the /apps/evolution/addressbook/sources key fixed the problem and then allowed the data in those extra Address Books to appear. This was also reported in: https://bugs.launchpad.net/ubuntu/+source/evolution/+bug/761037
(In reply to comment #6) > I can confirm this in a migration to 2.3.2 from 2.28.3 Did you mean 2.32.x? or 2.30.2? Anyway, 2.32 is not supported anymore in upstream. 3.2 is still supported.
Ok, did a test migration from 2.28.3 (Ubuntu 20.04) to 3.2.3 (Ubuntu 12.04) and 3 separate "On This Computer" Address Books did migrate correctly. One thing that did not migrate correctly was the Couch DB Address Book "Ubuntu One", which comes up on the 3.2.3 with: "This address book cannot be opened. This either means that an incorrect URI was entered, or the server is unreachable. Detailed error message: Invalid source" This address book cannot be deleted and comes up with that error message whenever it is accessed. This was on a system where "Ubuntu One" was not configured. Following is the dump of the setup: gconftool-2 --get /apps/evolution/addressbook/sources [<?xml version="1.0"?> <group uid="1331758653.3768.0@dc-desktop" name="CouchDB" base_uri="couchdb://" readonly="no"><source uid="1331758653.3768.1@dc-desktop" name="Ubuntu One" relative_uri="127.0.0.1"><properties><property name="couchdb_instance" value="user"/></properties></source></group> ,<?xml version="1.0"?> <group uid="1331758653.3768.5@dc-desktop" name="WebDAV" base_uri="webdav://" readonly="no"/> ,<?xml version="1.0"?> <group uid="1331758653.3768.7@dc-desktop" name="Google" base_uri="google://" readonly="no"/> ,<?xml version="1.0"?> <group uid="1331758653.3768.22@dc-desktop" name="On This Computer" base_uri="local:" readonly="no"><source uid="1331758654.3768.25@dc-desktop" name="Personal" relative_uri="system"><properties><property name="completion" value="true"/><property name="default" value="true"/></properties></source><source uid="1331758727.3768.27@dc-desktop" name="Second book" relative_uri="1331758727.3768.27@dc-desktop"><properties><property name="completion" value="true"/><property name="couchdb_instance" value="user"/></properties></source><source uid="1331758753.3768.28@dc-desktop" name="Third book" relative_uri="1331758753.3768.28@dc-desktop"><properties><property name="completion" value="true"/><property name="couchdb_instance" value="user"/></properties></source></group> ,<?xml version="1.0"?> <group uid="1331758653.3768.23@dc-desktop" name="On LDAP Servers" base_uri="ldap://" readonly="no"/> ]
(In reply to comment #8) > Ok, did a test migration from 2.28.3 (Ubuntu 20.04) to 3.2.3 (Ubuntu 12.04) and > 3 separate "On This Computer" Address Books did migrate correctly. Yay. :) > One thing that did not migrate correctly was the Couch DB Address Book "Ubuntu > One", which comes up on the 3.2.3 with: evolution-couchdb issues are handled in launchpad.net.
Great news on the working migration. I couldn't find any old 2.28 backups to restore and test with. I believe couchdb is no longer supported; I recall the purge as "no longer supported" in the upgrade process for the main libs, etc. A bit of searching reveals some lost love. A python implementation is in the works that may fork a new direction for arbitrary data structures. EOL: https://lists.ubuntu.com/archives/ubuntu-desktop/2011-November/003474.html Removal from main: https://bugs.launchpad.net/ubuntu/+source/couchdb/+bug/844995 FYI, I just right-clicked my CouchDB Addressbook (I had one..not used) and deleted it. At least this fix clears the path to Move CouchDB into a new local addressbook before upgrade, providing a workaround for those who backup.
(In reply to comment #9) > (In reply to comment #8) > > Ok, did a test migration from 2.28.3 (Ubuntu 20.04) to 3.2.3 (Ubuntu 12.04) and > > 3 separate "On This Computer" Address Books did migrate correctly. > > Yay. :) > > > One thing that did not migrate correctly was the Couch DB Address Book "Ubuntu > > One", which comes up on the 3.2.3 with: > > evolution-couchdb issues are handled in launchpad.net. I thought that it might be like that, at least the important data seems to be migrated ok now. It looks like this bug has been solved in the current Evolution releases.
If anyone want the Launchpad bug: https://bugs.launchpad.net/ubuntu/+source/evolution/+bug/955673
(In reply to comment #8) > Detailed error message: Invalid source" This can be shown when you are missing 3rd party backends for the source, which is the case four your couchdb:// addressbook here. Having installed evolution-couchdb package should fix the issue (it requires restart of e-addressbook-factory process, to notify the new backend). (In reply to comment #11) > It looks like this bug has been solved in the current Evolution releases. Good, thanks for the testing and reporting here. I'm closing this bug as such.
(In reply to comment #13) > (In reply to comment #8) > > Detailed error message: Invalid source" > > This can be shown when you are missing 3rd party backends for the source, which > is the case four your couchdb:// addressbook here. Having installed > evolution-couchdb package should fix the issue (it requires restart of > e-addressbook-factory process, to notify the new backend). You are correct, this fixes that issue. In Ubuntu 12.04 Evolution is no longer the default mail client (Thunderbird is) and a user must manually install it to keep using it. The CouchDB components are not dependencies of Evolution so an ordinary user has to now be aware of this and also install those bits to avoid this issue. Many (many) users from the current Ubuntu LTS will probably want to stary with Evolution, so this could cause a lot of issues. I will be passing this info onto the Launchpad bug (dontcha just love it when people change these things?)