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 701990 - Contacts app problem when adding 'notes' to a user
Contacts app problem when adding 'notes' to a user
Status: RESOLVED OBSOLETE
Product: gnome-contacts
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GNOME Contacts maintainer(s)
GNOME Contacts maintainer(s)
: 748418 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-06-11 09:02 UTC by Ewan.LEBIDEAU-CANEVET
Modified: 2018-01-24 15:08 UTC
See Also:
GNOME target: ---
GNOME version: 3.11/3.12


Attachments
gnome-contacts debugging (14.31 KB, text/plain)
2013-06-12 10:00 UTC, Ewan.LEBIDEAU-CANEVET
  Details
phone-numbers error (159.11 KB, image/png)
2014-02-14 14:52 UTC, Erick Perez Castellanos
  Details
contact-editor: Don’t create empty NoteFieldDetails (1.39 KB, patch)
2014-02-16 14:21 UTC, Philip Withnall
committed Details | Review

Description Ewan.LEBIDEAU-CANEVET 2013-06-11 09:02:13 UTC
User can notice that if he added a note to a contact and then deletes it, after some time Contacts app will display error.

Steps :

1. Boot System
2. Open Contacts APP
3. Create a new contact
4. Select Edit
5. Click new detail - select notes
6. Add a new note write something and click done
7. Edit again and delete the note
8. After some time (~1 minute) observe the error

Expected outcome

No error

Actual outcome

Error message present
Comment 1 Erick Perez Castellanos 2013-06-11 12:11:46 UTC
(In reply to comment #0)
> User can notice that if he added a note to a contact and then deletes it, after
> some time Contacts app will display error.
> 
> Steps :
> 
> 1. Boot System
> 2. Open Contacts APP
> 3. Create a new contact
> 4. Select Edit
> 5. Click new detail - select notes
> 6. Add a new note write something and click done
> 7. Edit again and delete the note
> 8. After some time (~1 minute) observe the error
> 
> Expected outcome
> 
> No error
> 
> Actual outcome
> 
> Error message present

Could you attache the error. Also, could you run gnome-contacts like this:
"G_MESSAGES_DEBUG=all gnome-contacts" and attache the output of that ?
Comment 2 Ewan.LEBIDEAU-CANEVET 2013-06-12 10:00:32 UTC
Created attachment 246600 [details]
gnome-contacts debugging
Comment 3 Ewan.LEBIDEAU-CANEVET 2013-06-12 10:04:14 UTC
I've added the log when starting gnome-contacts and selecting notes by editing profile (nothing appears in the log when the message appears).

The message appearing is : "Unknown error setting property 'notes': Changing the 'notes' property failed due to reaching the timeout"
Comment 4 Chris Cummins 2013-06-24 15:15:05 UTC
This stderr warning is printed when the notes field is first added, which may be relevant:

folks-WARNING **: note-details.vala:77: Empty note passed to NoteFieldDetails.

And this warning message is printed when the application is first launched:

folks-WARNING **: backend-store.vala:409: Error preparing Backend 'ofono': GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.ofono was not provided by any .service files

This is on a Fedora 19 machine (gnome-contacts 3.8.2).
Comment 5 Kévin THIERRY 2013-10-16 12:49:17 UTC
This bug is still present in gnome-contacts 3.10 r1, tested on Fedora 20.
Comment 6 Erick Perez Castellanos 2014-02-14 14:44:43 UTC
it also happens with phone-numbers. I could not trigger it with emails. The error is the same timeout error changing the property. Another fact is that the property is changed, at least with the eds backend which is the one I'm testing, and it shows the error.

I set a new, empty addressbook with evolution, an tested this.
I can follow it to this method backends/eds/lib/edsf-persona-store.vala#1221 in folks (_commit_modified_property), but I failed to understand properly what are you doing there. Sounds like it's the notification for the changed property not reaching your method there, or some corner case in the body of _commit... but again I failed to properly understand the logic in there.
Comment 7 Erick Perez Castellanos 2014-02-14 14:52:17 UTC
Created attachment 269126 [details]
phone-numbers error
Comment 8 Philip Withnall 2014-02-16 14:21:02 UTC
Created attachment 269303 [details] [review]
contact-editor: Don’t create empty NoteFieldDetails

It’s explicitly banned by the folks API documentation and results in
warnings from folks.
Comment 9 Philip Withnall 2014-02-16 16:57:43 UTC
(In reply to comment #6)
> I set a new, empty addressbook with evolution, an tested this.
> I can follow it to this method backends/eds/lib/edsf-persona-store.vala#1221 in
> folks (_commit_modified_property), but I failed to understand properly what are
> you doing there. Sounds like it's the notification for the changed property not
> reaching your method there, or some corner case in the body of _commit... but
> again I failed to properly understand the logic in there.

Edsf.PersonaStore._commit_modified_property() is a wrapper around the E.BookClient.modify_contact() method which only returns once folks has emitted a property change notification for the updated property.

In this case, it sends the changes to EDS, then waits until:
 • it receives a contacts-changed signal from EDS;
 • the changes are made on the Edsf.Persona’s properties; and
 • Edsf.Persona.notify::notes is emitted (by Edsf.Persona._update_notes()).

So either:
 1. folks isn’t receiving a contacts-changed signal for the changes; or
 2. folks is incorrectly deciding that the updated vCard ‘note’ attribute isn’t different from the old one.

The next methods to debug would be:
 • Edsf.Persona._update_notes()
 • Edsf.PersonaStore._set_notes()
 • Edsf.PersonaStore._set_contact_notes()
all of which should be called for this to complete successfully.

The patch I attached might go some way to fixing this problem for notes (it certainly means that gnome-contacts is no longer violating folks’ API specification), but probably won’t fix it entirely. Especially not for phone numbers.
Comment 10 Erick Perez Castellanos 2014-02-24 15:36:36 UTC
Review of attachment 269303 [details] [review]:

Works for me.
Comment 11 Erick Perez Castellanos 2014-02-24 15:39:16 UTC
I'll fix the rest of the warnings myself. Thxs
Comment 12 Philip Withnall 2014-02-24 16:12:10 UTC
Comment on attachment 269303 [details] [review]
contact-editor: Don’t create empty NoteFieldDetails

commit 64f9b61cca4757546abcab12195bd2b40c654ea6
Author: Philip Withnall <philip@tecnocode.co.uk>
Date:   Sun Feb 16 14:20:08 2014 +0000

    contact-editor: Don’t create empty NoteFieldDetails
    
    It’s explicitly banned by the folks API documentation and results in
    warnings from folks.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=701990

 src/contacts-contact-editor.vala | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
Comment 13 Erick Perez Castellanos 2014-03-01 18:09:16 UTC
(In reply to comment #8)
> Created an attachment (id=269303) [details] [review]
> contact-editor: Don’t create empty NoteFieldDetails
> 
> It’s explicitly banned by the folks API documentation and results in
> warnings from folks.

This code isn't triggered when the user doesn't write on the textview. The warning is triggered when creating the field. I have to rewrite the ting completely in order to avoid that situation
Comment 14 Erick Perez Castellanos 2015-04-27 22:29:10 UTC
*** Bug 748418 has been marked as a duplicate of this bug. ***
Comment 15 Philip Withnall 2015-04-27 22:32:29 UTC
Erick, what’s the status of this bug? Do you still think there’s a problem in folks, or is it just waiting on the gnome-contacts refactoring from comment #13?
Comment 16 Erick Perez Castellanos 2015-04-30 04:14:26 UTC
(In reply to Philip Withnall from comment #15)
> Erick, what’s the status of this bug? Do you still think there’s a problem
> in folks, or is it just waiting on the gnome-contacts refactoring from
> comment #13?

I'll have to check if it still happens to me, but the report on bug 748418 is this same error.
I'll have to check if by removing the warning the error goes away (And also check that it happens to me).
Comment 17 Niels De Graef 2017-08-12 11:33:28 UTC
There's a WIP branch that rewrites the ContactEditor on the gnome-contacts repo called 'wip/nielsdg/contact-editor-rewrite' that should solve this issue.
Comment 18 GNOME Infrastructure Team 2018-01-24 15:08:26 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnome-contacts/issues/33.