GNOME Bugzilla – Bug 589325
Evolution Contacts reports ambiguous error on Google Contacts authentication failure with bad password
Last modified: 2009-07-22 10:25:48 UTC
Please describe the problem: Evolution in addressbook/gui/component/addressbook.c in addressbook_authenticate (), will call e_passwords_get_password() to retrieve the password. In my case, I had a stale password saved in my GNOME keyring which it retrieved and attempted to authenticate with. Upon failure, an error dialogue pops up with: dialogue title: | UNABLE TO OPEN ADDRESS BOOK message: | Error loading address book. | | This address book cannot be opened. This either means that | an incorrect URI was entered, or the server is unreachable. | | Detailed error message: Other error However, if I update the password in GNOME keyring, I then authenticate fine. So, the error message is too ambiguous for the situation, and fails to report the actual source of the problem. Ideally, Evolution would prompt the user for the correct password. Here's a backtrace from the error dialogue, with #0,1,2 being the most relevant, followed by a backtrace of the authentication code before the callback. *** LEADING TO THE ERROR DIALOGUE *** Breakpoint 1, eab_load_error_dialog (parent=0x0, source=0x96eed50, status=E_BOOK_ERROR_OTHER_ERROR) at eab-gui-util.c:104 104 g_return_if_fail (source != NULL); (gdb) bt
+ Trace 216568
*** AUTHENTICATION IN E-D-S *** GNOME_Evolution_Addressbook_Book_authenticateUser uses orbit/bonobo magic and ends up calling the following in e-d-s which I couldn't effectively debug because gdb was failing to attach for some reason: * addressbook/libedata-book/e-data-book.c: impl_GNOME_Evolution_Addressbook_Book_authenticateUser, calls * addressbook/libedata-book/e-data-book.c: e_book_backend_authenticate_user, calls: (* E_BOOK_BACKEND_GET_CLASS (backend)->authenticate_user) (backend, book, opid, user, passwd, auth_method); ** I'm assuming the backend is the google one :) * addressbook/backends/google/e-book-backend-google.c: e_book_backend_google_authenticate_user, calls * addressbook/backends/google/google-book.c: google_book_connect_to_google, which fails with the bad error, * addressbook/backends/google/e-book-backend-google.c: e_book_backend_status_from_google_book_error, which *ALWAYS* returns GNOME_Evolution_Addressbook_OtherError So, yah, here e-d-s always returns OtherError which doesn't give the user any additional information. Are the Google errors currently too limited to be able to return something more useful? Steps to reproduce: 1. Store an invalid password for your Google Contacts in your keyring 2. Try to open your Google Contacts addressbook in Evolution Actual results: I receive an ambiguous error Expected results: I receive an error indicating the nature of the problem (bad password) AND am prompted to prompted to provide a valid one. Does this happen every time? Whenever I have a bad password set. Other information:
Created commit cb9fa63 in eds master (2.27.5+) Great investigation, thanks a lot. On ething which wasn't obvious, the google_book_error_from_soup_error was always setting the error code to GOOGLE_BOOK_ERROR_HTTP_ERROR, though it knew the correct code based on the soup error. I fixed that all in the above mentioned commit.
Yay! Thanks for looking into this so soon :)