After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 734863 - Google contacts without email address block search/autocomplete
Google contacts without email address block search/autocomplete
Status: RESOLVED FIXED
Product: libgdata
Classification: Platform
Component: Google Contacts service
0.14.x
Other Linux
: Normal major
: ---
Assigned To: libgdata-maint
libgdata-maint
Depends on:
Blocks:
 
 
Reported: 2014-08-15 15:02 UTC by Bob Blanchard
Modified: 2014-08-18 23:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
contacts: Allow and ignore empty e-mail addresses (4.51 KB, patch)
2014-08-18 23:10 UTC, Philip Withnall
committed Details | Review

Description Bob Blanchard 2014-08-15 15:02:25 UTC
It seems that as soon as a contact without an email address is encountered, the entire search is aborted.  Out of my 100 contacts, only 15 load and this error is shown:

Unable to Perform Search

The backend for this address book was unable to parse this query. GDBus.Error:org.gtk.GDBus.UnmappedGError.Quark._e_2dclient_2derror_2dquark.Code16: A required property of a <entry/gd:email> element (@address) was not present.

Contacts without email addresses should be skipped for auto-complete, but should still be available to view.

Evolution 13.10.4  on ubuntu 14.04.1

-Bob
Comment 1 Matthew Barnes 2014-08-15 15:07:48 UTC
The error message is coming from libgdata.  Reassigning to have Philip take a look.  He also sometimes moonlights as the E-D-S Google maintainer.
Comment 2 Philip Withnall 2014-08-18 15:48:14 UTC
Yup, that’s a bug in libgdata.

Bob, could you please produce a debug log so that I can fix the problem?

killall evolution-addressbook-factory
G_MESSAGES_DEBUG=all LIBGDATA_DEBUG=3 /usr/libexec/evolution-addressbook-factory -w &> libgdata.log

Restart Evolution and reproduce the problem, then attach the produced libgdata.log here please. libgdata should redact particularly sensitive details (like passwords) from the log, but you might want to go through it and manually redact other details (like contact information) before attaching it here. Please redact contact information by replacing it with something obvious, rather than deleting it entirely.

Thanks.
Comment 3 Bob Blanchard 2014-08-18 18:55:48 UTC
(In reply to comment #2)
> Yup, that’s a bug in libgdata.
> 
> Bob, could you please produce a debug log so that I can fix the problem?
> 

Hi Philip,  I did create the log file, but it would take a while to edit the personal info out, so I dug around a bit and found the cause...

There are no gd:email elements with a missing 'address' attribute... but there are some gd:email elements with address="":    

<gd:email rel="http://schemas.google.com/g/2005#other" address=""/>

Most contacts without email addresses just don't have a gd:email element, but six of them I found this this empty address attribute.

In order to test whether this was the culprit, I put fake email addresses in for these 6 contacts.

Voila - fixed the problem!

Therefore - a contact without an email address does *not* imply that google will not return a gd:email element.. there could be a gd:email element with @address="".  The empty address attribute is what causes the crash.

Let me know if there is anything else you need.

Thanks!
Comment 4 Philip Withnall 2014-08-18 23:10:11 UTC
Created attachment 283847 [details] [review]
contacts: Allow and ignore empty e-mail addresses

Empty e-mail addresses (<gd:email address=''/>) are apparently allowed
by convention in the XML. Previously, we treated the empty address
attribute as an error. Instead, we should ignore the entire element,
treating it as non-existent.
Comment 5 Philip Withnall 2014-08-18 23:11:10 UTC
That was exactly the information I needed, thanks. I’ve pushed a fix to master, and it will be out in the 0.15.3 or 0.16.0 releases.
Attachment 283847 [details] pushed as f0797bb - contacts: Allow and ignore empty e-mail addresses