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 722579 - Contacts are displayed for Google accounts where contact management is disabled in GOA
Contacts are displayed for Google accounts where contact management is disabl...
Status: RESOLVED FIXED
Product: folks
Classification: Platform
Component: e-d-s backend
0.9.x
Other Linux
: Normal major
: 0.10.x
Assigned To: folks-maint
folks-maint
Depends on:
Blocks: 722150
 
 
Reported: 2014-01-20 01:23 UTC by Michael Catanzaro
Modified: 2014-04-06 09:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
eds: Only use enabled ESources from EDS (2.28 KB, patch)
2014-02-16 16:39 UTC, Philip Withnall
committed Details | Review

Description Michael Catanzaro 2014-01-20 01:23:49 UTC
I added some Google accounts in System Settings, and toggled Contacts on all of them to Off.  Then I opened Contacts. I was offered a choice of accounts to use as my primary addressbook, including the Google accounts that were supposed to be disabled. I chose Local Address Book. Now, Contacts insists on displaying everyone I've ever emailed as a contact, even though Contacts integration is supposed to be disabled for those accounts.
Comment 1 Erick Perez Castellanos 2014-02-12 20:40:12 UTC
Right now, I'm moving this to folks since I'm getting the enabled_backends property for showing it.
Might be that this isn't folks either but something in the rest of the stack. But I'm moving it for now.

Here's where I'm iterarting over the sources in Contacts: https://git.gnome.org/browse/gnome-contacts/tree/src/contacts-app.vala#n582
Comment 2 Philip Withnall 2014-02-15 17:37:23 UTC
(In reply to comment #0)
> I added some Google accounts in System Settings, and toggled Contacts on all of
> them to Off.  Then I opened Contacts. I was offered a choice of accounts to use
> as my primary addressbook, including the Google accounts that were supposed to
> be disabled. I chose Local Address Book. Now, Contacts insists on displaying
> everyone I've ever emailed as a contact, even though Contacts integration is
> supposed to be disabled for those accounts.

After you disabled it, did your Google account still show up in Evolution’s address book? Folks uses the Google Contacts backend from evolution-data-server, so the bug is either the Google Contacts source not being correctly removed from EDS, or folks not correctly listening to notification that it has been removed.
Comment 3 Michael Catanzaro 2014-02-15 17:42:25 UTC
(In reply to comment #2) 
> After you disabled it, did your Google account still show up in Evolution’s
> address book?

Toggling the Contacts setting in the Online Accounts immediately causes the contact book to appear or disappear from Evolution.
Comment 4 Philip Withnall 2014-02-16 14:10:48 UTC
(In reply to comment #3)
> (In reply to comment #2) 
> > After you disabled it, did your Google account still show up in Evolution’s
> > address book?
> 
> Toggling the Contacts setting in the Online Accounts immediately causes the
> contact book to appear or disappear from Evolution.

OK. With the Contacts setting initially set to ‘on’ can you please run GNOME Contacts with the following command:
    FOLKS_DEBUG=all G_MESSAGES_DEBUG=all gnome-contacts &> contacts.log
and disable your Google Contacts account while it’s running.

Then please e-mail me (bugzilla@tecnocode.co.uk) the log or attach it here. It may contain personal data, which you can redact first if you wish — all I need are the lines related to ‘Removing address book’ (if they exist).

That will determine whether folks is correctly removing the Google Contacts PersonaStore.

(Sorry I can’t do this testing myself: this machine isn’t yet set up for folks development, and it’s going to take a number of hours to get everything set up.)

(In reply to comment #1)
> Right now, I'm moving this to folks since I'm getting the enabled_backends
> property for showing it.

Erick: The enabled_backends property is irrelevant: this is a PersonaStore, not the whole EDS backend. From looking at the code in contacts-accounts-list.vala, it looks like the PersonaStore.removed signal is never connected to, which could be the cause of the bug.
Comment 5 Michael Catanzaro 2014-02-16 15:47:37 UTC
Sure, email sent
Comment 6 Philip Withnall 2014-02-16 16:39:03 UTC
Created attachment 269314 [details] [review]
eds: Only use enabled ESources from EDS

Don’t ignore the enabled/disabled state of the ESource. When EDS sources
(such as the Google Contacts address book) are toggled in GOA, they’re
disabled, not removed. Folks needs to respect that.
Comment 7 Philip Withnall 2014-02-16 16:43:03 UTC
(In reply to comment #5)
> Sure, email sent

Great, thanks. I’ve attached a patch which I *think* should fix it, given the information in the log you provided. Since my development environment is still not in a suitable state for testing, I haven’t been able to test it.

Michael, would you be able to compile folks master with the patch applied and test it? No problem if you’re not set up for that; I can test the patch later once I’ve got my machine sorted out.

For posterity, the log ends with the single (and only relevant) line:
> (gnome-contacts:11212): eds-DEBUG: eds-backend.vala:293: Address book source list changed.
which shows that the EDS change notifications are getting through to folks, but that folks is not detecting the ESource for the Google Contacts address book being removed. Looking back at the EDS API, the only way I can see that could happen is if the source is disabled, rather than removed. That’s something which folks doesn’t handle.
Comment 8 Michael Catanzaro 2014-02-16 21:30:55 UTC
(In reply to comment #7) 
> Michael, would you be able to compile folks master with the patch applied and
> test it? No problem if you’re not set up for that; I can test the patch later
> once I’ve got my machine sorted out.

I didn't try too hard, since UI freeze is nigh.

1) Running 'jhbuild build folks' and then 'jhbuild run gnome-contacts' (which I didn't really expect to work) fails with:

(gnome-contacts:31378): folks-WARNING **: Failed to find primary PersonaStore with type ID 'eds' and ID 'system-address-book'.
Individuals will not be linked properly and creating new links between Personas will not work.
The configured primary PersonaStore's backend may not be installed. If you are unsure, check with your distribution.

2) Running ./autogen.sh on Fedora 20 fails at:

./configure: line 12510: syntax error near unexpected token `telepathy-glib'
./configure: line 12510: `    VALA_CHECK_PACKAGES(telepathy-glib'

which looks like maybe configure.ac needs to check for whichever package provides VALA_CHECK_PACKAGES (I haven't yet).
Comment 9 Philip Withnall 2014-04-06 09:21:12 UTC
I finally got some time to test this, and the patch fixes the problem for me, so I've pushed it to master. Sorry about the wait.

Attachment 269314 [details] pushed as 1236e1c - eds: Only use enabled ESources from EDS