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 687877 - Trying to search gal with the "Any field contains" option fails
Trying to search gal with the "Any field contains" option fails
Status: RESOLVED FIXED
Product: evolution-ews
Classification: Other
Component: Contacts (Global Address List)
3.7.x
Other Linux
: Normal normal
: ---
Assigned To: Evolution EWS maintainer(s)
Evolution EWS maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2012-11-07 19:33 UTC by David Ronis
Modified: 2012-11-14 22:39 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description David Ronis 2012-11-07 19:33:04 UTC
I'm running this morning's git/master of evolution and all related programs.
The gal search works as expected for "Name contains" or "Email begins with" options; however, trying to search with "Any field contains"  leads to the following error message:
 
Unable to perform search.
This query did not complete successfully. GDBus.Error:org.gtk.GDBus.UnmappedGError.Quark._e_2dbook_2dbackend_2dsqlitedb_2derror_2dquark.Code0: no such column: x
Comment 1 Milan Crha 2012-11-08 10:05:24 UTC
Thanks for a bug report. I can reproduce it too. It seems to be a regression from bug #686678, though such search works on local books. I'll investigate further.
Comment 2 Milan Crha 2012-11-08 11:37:49 UTC
Might be some issue in the sqlite db summary stored in ews. This had been copied into eds and ews should use that one, also because there were done improvements in the eds on the summary, but it did not yet. I made ews use the eds' version of sqlite db summary and I can search with "any fields" now.

Created commit 82c1301 in ews master (3.7.2+)
Comment 3 David Ronis 2012-11-08 18:44:16 UTC
Hi Milan, Thanks

I updated all of evo and related  parts to the git/master and reinstalled.

EWS works for mail, but does nothing when I try the gal.   My suspicion is that something is broken with authentication in that I got a popup asking for the ews account password when I 1st started up.  I tried restarting evo and the factories but that didn't help.   I also tried just restarting evo.   I don't get a password prompt, but only the e-mail address begins with lookup works.
Comment 4 Milan Crha 2012-11-09 08:01:11 UTC
It sounds like the account lost the setup for "cache book for offline", because that's what makes the "email address begins" work, but not the other search types.
Comment 5 David Ronis 2012-11-09 16:06:18 UTC
Hi Milan,

The cache offline address book setting in Preferences->Accounts->EWS Account->Edit->Receiving Options is set.   I tried various things:  

1.  Toggled the setting on and off.
2.  Deleting  .cache/evolution/addressbook and restarting evolution.

Nothing worked.

I'm reopening this.
Comment 6 Milan Crha 2012-11-09 17:33:25 UTC
If I recall correctly the ews backend doesn't listen for changes in the properties properly, a restart of factory is needed. But of course, it can be something else. Could you the addressbook factory on the console, and capture it's output, please? There should be some prints when accessing the GAL, there are some for me.
Comment 7 David Ronis 2012-11-12 23:13:42 UTC
I did as you said in comment 6.   Here's the output:

opt/gnome/libexec/evolution-addressbook-factory 
Registering EBookBackendFileFactory ('local')
Registering EBookBackendVCFFactory ('vcf')
Registering EBookBackendLDAPFactory ('ldap')
Registering EBookBackendGoogleFactory ('google')
Registering EBookBackendWebdavFactory ('webdav')
Registering EBookBackendEwsFactory ('ews')
Server is up and running...
Bus name 'org.gnome.evolution.dataserver.AddressBook4' acquired.

(evolution-addressbook-factory:23399): libedata-book-CRITICAL **: e_book_backend_sqlitedb_new: assertion `emailid != NULL' failed


That's it.  During this time I tried name contains, any field contains, and e-mail starts with searches.  Only the last one worked.
Comment 8 Milan Crha 2012-11-13 09:36:00 UTC
I bet this is the issue:
> (evolution-addressbook-factory:23399): libedata-book-CRITICAL **:
> e_book_backend_sqlitedb_new: assertion `emailid != NULL' failed
could you grep your
   ~/.config/evolution/sources
for "Global Address List" (quotes for clarity only), which should give your your ews account .source. It should have section [Ews Backend] and it should have an Email key. That yours is most likely empty. How did you create your ews account, in Evolution or in Gnome Online Accounts? You can also see if you have OabOffline set to true and OalSelected is for you in that section. If you cannot find the .source file base don the "Global Address List", then search for "Ews Backend" - the section name.
Comment 9 David Ronis 2012-11-13 19:55:22 UTC
There is an ews backend section; here are its contents:

FilterInbox=false
CheckAll=true
Email=
FilterJunk=false
FilterJunkInbox=false
GalUid=1352053603.4426.2@montroll.chem.mcgill.ca
Hosturl=https://exchange.mcgill.ca/ews/exchange.asmx
Oaburl=https://exchange.mcgill.ca/OAB/b57351b8-8acb-4605-ab00-07cc7608752c/oab.xml
OabOffline=true
OalSelected=949d8753-a7d6-4411-925f-c1a8349cce66:Global Address List
Timeout=120

The acount was created using evolution, not GOA.
Comment 10 David Ronis 2012-11-13 22:01:37 UTC
I updated to the git/master and recompiled.   The gal still doesn't work properly.   I thought that I could delete the ews account and start over.  When I pressed "Fetch URL" in the setup evo crashed.  Here's the backtrace:

Program terminated with signal 11, Segmentation fault.

Thread 5 (Thread 0x8ecffb70 (LWP 22154))

  • #0 poll
    from /lib/libc.so.6
  • #1 g_poll
    at gpoll.c line 132
  • #2 g_main_context_poll
    at gmain.c line 3584
  • #3 g_main_context_iterate
    at gmain.c line 3285
  • #4 g_main_loop_run
    at gmain.c line 3484
  • #5 e_async_closure_wait
    at e-data-server-util.c line 1341
  • #6 e_ews_autodiscover_ws_url_sync
    at e-ews-connection.c line 2053
  • #7 mail_config_ews_autodiscover_try_password_sync
    at e-mail-config-ews-autodiscover.c line 254
  • #8 e_source_authenticator_try_password_sync
    at e-source-authenticator.c line 418
  • #9 source_registry_authenticate_authenticate_cb
    at e-source-registry.c line 1563
  • #10 ffi_call_SYSV
    at src/x86/sysv.S line 64
  • #11 ffi_call
    at src/x86/ffi.c line 303
  • #12 g_cclosure_marshal_generic
    at gclosure.c line 1454
  • #13 g_closure_invoke
    at gclosure.c line 777
  • #14 signal_emit_unlocked_R
    at gsignal.c line 3567
  • #15 g_signal_emitv
    at gsignal.c line 3056
  • #16 e_dbus_authenticator_proxy_g_signal
    at e-dbus-authenticator.c line 1049
  • #17 ffi_call_SYSV
    at src/x86/sysv.S line 64
  • #18 ffi_call
    at src/x86/ffi.c line 303
  • #19 g_cclosure_marshal_generic
    at gclosure.c line 1454
  • #20 g_type_class_meta_marshal
    at gclosure.c line 970
  • #21 g_closure_invoke
    at gclosure.c line 777
  • #22 signal_emit_unlocked_R
    at gsignal.c line 3605
  • #23 g_signal_emit_valist
    at gsignal.c line 3315
  • #24 g_signal_emit
    at gsignal.c line 3371
  • #25 on_signal_received
    at gdbusproxy.c line 927
  • #26 emit_signal_instance_in_idle_cb
    at gdbusconnection.c line 3715
  • #27 g_idle_dispatch
    at gmain.c line 4806
  • #28 g_main_dispatch
    at gmain.c line 2715
  • #29 g_main_context_dispatch
    at gmain.c line 3219
  • #30 g_main_context_iterate
    at gmain.c line 3290
  • #31 g_main_loop_run
    at gmain.c line 3484
  • #32 e_source_registry_authenticate_sync
    at e-source-registry.c line 1766
  • #33 source_registry_authenticate_thread
    at e-source-registry.c line 1440
  • #34 run_in_thread
    at gsimpleasyncresult.c line 871
  • #35 io_job_thread
    at gioscheduler.c line 89
  • #36 g_task_thread_pool_thread
    at gtask.c line 1225
  • #37 g_thread_pool_thread_proxy
    at gthreadpool.c line 309
  • #38 g_thread_proxy
    at gthread.c line 797
  • #39 start_thread
    from /lib/libpthread.so.0
  • #40 clone
    from /lib/libc.so.6

Comment 11 Milan Crha 2012-11-14 17:11:34 UTC
The crash is caused in libsoup, I opened bug #688330 for it, and attached a proposed patch there.

(In reply to comment #9)
> FilterInbox=false
> CheckAll=true
> Email=

  ^^^^^
This is it, the Email should be filled. The other values look fine, thus I guess the only problem is with the email missing. I believe the account reconfiguration will fix the issue, because my newly created EWS account has the email filled as expected. Usually, maybe I do something "wrong", that it works for me, but not for you.
Comment 12 David Ronis 2012-11-14 22:39:35 UTC
OK I applied the patch for libsoup and rebuilt.   Starting and exiting my gnome session, and editing the ews account preferences populates the Email= field.   Evolution now updates the ews cache and all the searches work as expected.   Thanks.