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 635755 - Authenticate books in addressbook importers on open
Authenticate books in addressbook importers on open
Status: RESOLVED FIXED
Product: evolution-data-server
Classification: Platform
Component: Contacts
2.32.x (obsolete)
Other Linux
: Normal critical
: ---
Assigned To: evolution-addressbook-maintainers
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2010-11-25 08:50 UTC by Milan Crha
Modified: 2010-12-03 18:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
evo patch (6.27 KB, patch)
2010-12-03 18:01 UTC, Milan Crha
committed Details | Review

Description Milan Crha 2010-11-25 08:50:07 UTC
Moving this from a downstream bug report:
https://bugzilla.redhat.com/show_bug.cgi?id=656814

How to reproduce
-----
1. adding(importing) a .VCF contact to my contacts database which has no UID set

Sample contact:
BEGIN:VCARD
VERSION:3.0
FN:Diaspora
N:Diaspora;;;;
PROFILE:VCARD
ADR:;;731 Market Street,Floor 3;San Francisco;California;94101;USA
EMAIL;TYPE=WORK:no-reply@joindiaspora.com
ORG:Diaspora
URL:http://www.joindiaspora.com
END:VCARD

RFC 2426 doesn't say the UID is mandatory, thus it's evolution's bug.

Thread 1 (Thread 18790)

  • #0 g_variant_is_trusted
    at gvariant-core.c line 600
  • #1 g_variant_builder_add_value
    at gvariant.c line 2932
  • #2 g_variant_valist_new
    at gvariant.c line 3928
  • #3 g_variant_new_va
  • #4 g_variant_new
  • #5 e_gdbus_book_complete_add_contact
    at e-gdbus-egdbusbook.c line 2713
  • #6 e_data_book_respond_create
    at e-data-book.c line 488
  • #7 _e_book_backend_create_contact
    at e-book-backend-sync.c line 377
  • #8 e_book_backend_create_contact
    at e-book-backend.c line 380
  • #9 operation_thread
    at e-data-book.c line 115
  • #10 g_thread_pool_thread_proxy
    at gthreadpool.c line 319
  • #11 g_thread_create_proxy
    at gthread.c line 1897
  • #12 start_thread
    from /lib/libpthread-2.12.90.so
  • #13 clone
    from /lib/libc-2.12.90.so

Comment 1 Milan Crha 2010-11-29 19:49:32 UTC
I cannot reproduce this on my machine, thus I asked reported for more details, which are:

The .vcf file was included as a download link in an email. When I clicked the
link to download the file, a window popped up on my desktop asking if I want to
save it or import it into Evolution's Contacts. I chose import and received a
crash notification. Evolution was not running at the time.

After receiving the inquiery about the "uid", I downloaded the file to my
desktop to check out the question.

After you told me you couldn't reproduce it, I tried just dbl-clicking on the
file to see what kind of behavior I received (without Evolution running). I got
the same Evolution import windows as before and I got the same crash
notification as I did originally.

I then opened Evolution and imported the .vcf using Import from the menus. The
.vcf seemed to be imported properly.

Now that it's been imported once though, I seem to be able to import it as
often as I want by dbl-clicking it. As long as Evolution is not running. If
Evolution is up and running, dbl-clicking appears to do nothing. I currently
have 3 entries in Contacts for Diasporia.
Comment 2 Milan Crha 2010-12-03 16:52:17 UTC
Despite of me not being able to reproduce this, this particular crash, in GVariant code, may not happen again after change from bug #635825, thus I'm closing this in favour of that bug.

*** This bug has been marked as a duplicate of bug 635825 ***
Comment 3 Milan Crha 2010-12-03 17:12:17 UTC
err, that's bad, or actually good. I can reproduce this issue, when importing to the google addressbook. There are messages on the e-addressbook-factory console:

> libebookbackendgoogle-CRITICAL **: e_book_backend_google_create_contact:
> assertion `priv->service' failed
> 
> libebook-CRITICAL **: e_contact_get_const: assertion `E_IS_CONTACT (contact)'
> failed

The second makes sense, the 'contact' variable is NULL.

With changes from the above bug it doesn't crash, but still, something is going wrong here.

As a clarification from the downstream reporter:
- use google addressbook
- the email in question contained a link to the vCard, click on it, so it'll be downloaded and then will be opened an import wizard of evolution for it (or user will be asked to choose an application where to pen this vCard file)

I did all this from the mailer, no move to Contacts view, neither any operation done on the Google address book.
Comment 4 Milan Crha 2010-12-03 18:01:38 UTC
Created attachment 175799 [details] [review]
evo patch

for evolution;

As expected from the above comment, the addressbook importers were not opening books completely, thus for books requiring also authentication (where the Google book belongs), the backend wasn't connected to the server yet, and then it failed later on. One might not see this when opening the backend properly earlier, like when selecting the book in the Contacts view, in other words, this exhibits only when the e-addressbook-factory was not running before, or didn't open the Google backend yet.

This patch properly opens books in addressbook importers.
Comment 5 Milan Crha 2010-12-03 18:03:45 UTC
Created commit 3a6932b in evo master (2.91.4+)