GNOME Bugzilla – Bug 701990
Contacts app problem when adding 'notes' to a user
Last modified: 2018-01-24 15:08:26 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
(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 ?
Created attachment 246600 [details] gnome-contacts debugging
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"
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).
This bug is still present in gnome-contacts 3.10 r1, tested on Fedora 20.
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.
Created attachment 269126 [details] phone-numbers error
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.
(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.
Review of attachment 269303 [details] [review]: Works for me.
I'll fix the rest of the warnings myself. Thxs
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(-)
(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
*** Bug 748418 has been marked as a duplicate of this bug. ***
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?
(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).
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.
-- 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.