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 749974 - Use OAuth2 for Google sources
Use OAuth2 for Google sources
Status: RESOLVED FIXED
Product: evolution-data-server
Classification: Platform
Component: Contacts
3.10.x (obsolete)
Other Linux
: Normal major
: ---
Assigned To: evolution-addressbook-maintainers
Evolution QA team
: 751979 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2015-05-27 15:32 UTC by Miguel
Modified: 2016-09-22 13:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed eds patch (118.14 KB, patch)
2015-09-11 15:28 UTC, Milan Crha
committed Details | Review
proposed evo patch (20.14 KB, patch)
2015-09-11 15:30 UTC, Milan Crha
committed Details | Review

Description Miguel 2015-05-27 15:32:30 UTC
Since today (2015-05-27) I've been getting this message when trying to open my contacts:

Unable to open 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: Unable to connect to 'Google address book': The requested resource was not found: https://developers.google.com/accounts/docs/AuthForInstalledApps

Running standard Evolution ( 3.10.4) on Ubuntu 14.04.2 LTS
Comment 1 Miguel 2015-05-27 15:47:10 UTC
Related downstream issue: https://bugs.launchpad.net/ubuntu/+source/evolution/+bug/1459235
Comment 2 Ambrogio De Lorenzo 2015-05-27 18:43:30 UTC
Same for me.
Every gmail account can't be used as Contact source.

Evolution 3.10.4 from Fedora 20
Comment 3 Alejandro Espinosa 2015-05-28 11:06:19 UTC
Same for me.
In the error message details in evolution you can see that it tries to redirect to https://developers.google.com/accounts/docs/AuthForInstalledApps where you can read:

"ClientLogin has been officially deprecated since April 20, 2012 and is now no longer available. Requests to ClientLogin will fail with a HTTP 404 response. We encourage you to migrate to OAuth 2.0 as soon as possible."
Comment 4 Milan Crha 2015-05-28 12:02:02 UTC
Thanks for a bug report.

(In reply to Alejandro Espinosa from comment #3)
> "ClientLogin has been officially deprecated since April 20, 2012 and is now
> no longer available. Requests to ClientLogin will fail with a HTTP 404
> response. We encourage you to migrate to OAuth 2.0 as soon as possible."

So they finally did it.

This affects only Google address books (and eventually calendars) directly configured in the Evolution. Use GNOME Online Accounts (GOA) to add a Google account (where you can enable only Contacts and Calendars), which will use OAuth2 and thus will work properly.

Evolution currently (even the git master development version) doesn't support OAuth authentications directly, only through GOA.
Comment 5 Ambrogio De Lorenzo 2015-05-28 12:43:05 UTC
Hi Milan,
there is a guide fopr how to configure Evolution with GOA?
And what if one is using KDE?
Many thanks
Comment 6 Milan Crha 2015-05-28 14:08:01 UTC
(In reply to Ambrogio De Lorenzo from comment #5)
> there is a guide fopr how to configure Evolution with GOA?

I'm not aware of any guide. Simply run gnome-control-center, there pick Online Accounts, there "Add an Online Account", choose Google, then follow the page. Once successfully done, you get set of switchis which parts of the online account you want to use, like Mail, Calendar, Contacts, Files, ... Disable any you are not interested in.

> And what if one is using KDE?

You might probably install gnome-control-center first then.
Comment 7 bugzilla.gnome.org@jeffkoch.com 2015-05-28 21:47:14 UTC
(In reply to Milan Crha from comment #4)
> Thanks for a bug report.
> 
> (In reply to Alejandro Espinosa from comment #3)
> > "ClientLogin has been officially deprecated since April 20, 2012 and is now
> > no longer available. Requests to ClientLogin will fail with a HTTP 404
> > response. We encourage you to migrate to OAuth 2.0 as soon as possible."
> 
> So they finally did it.

Yes, the bottom of the page reads, "Last updated May 27, 2015."
Comment 8 Andrea Vai 2015-05-29 06:12:13 UTC
Sorry for asking, don't want to be pretentious but is there any future plan to support OAuth 2.0 directly in evo without the need of GOA? And, are there any disadvantages in using GOA?

Thanks
Andrea
Comment 9 Milan Crha 2015-05-29 06:44:16 UTC
(In reply to Andrea Vai from comment #8)
> Sorry for asking, don't want to be pretentious but is there any future plan
> to support OAuth 2.0 directly in evo without the need of GOA?

I would reject the bug report, if there would be no plan.

> And, are there any disadvantages in using GOA?

I'm not aware of any. Of course, evolution is still evolving, thus there are fixes in the connection between it and GOA, but I consider it as a normal state.
Comment 10 Miguel 2015-05-29 09:12:50 UTC
I confirm that the workaround proposed in Comment 4 works on my conditions (see initial post).
Comment 11 Matthew Cline 2015-05-29 18:09:41 UTC
I've never used Google contacts or calendar from/within Evolution yet am still encountering this bug.  I tried the GOA setup via gnome-control-panel (as per Comment 4), both with "use Google contacts" being "on" and "off", yet this didn't allow me to access my locally stored contact info.  Both times I did "evolution --force-shutdown" to make sure Evolution was entirely off before changing any setup, and then restarted Evolution from scratch when I was done.
Comment 12 Milan Crha 2015-06-01 07:34:43 UTC
(In reply to Matthew Cline from comment #11)
> I've never used Google contacts or calendar from/within Evolution yet am
> still encountering this bug.  I tried the GOA setup via gnome-control-panel
> (as per Comment 4), both with "use Google contacts" being "on" and "off",
> yet this didn't allow me to access my locally stored contact info.  Both
> times I did "evolution --force-shutdown" to make sure Evolution was entirely
> off before changing any setup, and then restarted Evolution from scratch
> when I was done.

What is your evolution version, please?
Comment 13 Matthew Cline 2015-06-02 01:14:04 UTC
Evolution version 3.16.2.1, running under KDE 4.14.8 on Fedora 22.
Comment 14 Milan Crha 2015-06-02 04:58:06 UTC
(In reply to Matthew Cline from comment #13)
> Evolution version 3.16.2.1, running under KDE 4.14.8 on Fedora 22.

That's supposed to work, especially when you used the gnome-control-center->Online Accounts. It works for me and for others, like comment #10, too. When I add an account in GOA, evolution shows new sources on the left of the Contacts view, under the name of the GOA account, which usually is a GMail address, like user@gmail.com, so it looks like this in the UI:
   On This Computer
      Personal
   user@gmail.com
      Contacts
If you ever happened to have configured Google contacts directly in the Evolution, then there is also
   Google
      Some-user-chosen-book-name
This user-created Google address book is kept untouched, it will not work when you enable/disable GOA accounts in the control center. The GOA configured address book is completely independent from any other already defined address books.

So, if you select the user@gmail.com->Contacts, do you receive any error message? Maybe something wil be printed on the console only, thus better to run evolution from a terminal for this testing.
Comment 15 Matthew Cline 2015-06-02 10:40:05 UTC
It looks like my address book is actually working properly, and I just misunderstood things.  Specifically, my local address book is currently empty, which made me think it wasn't working; it's working, but my address book data had been wiped out somehow, no doubt due to my upgrade from Fedora 21 to Fedora 22.  I tried to restore it from a pre-upgrade backup, but the backup had no contacts.db file under the ~/.config/evolution/addressbook directory.
Comment 16 Matthew Cline 2015-06-03 21:49:46 UTC
Another correction: I'm still receiving the "requested resource was not found" message with regards to contacts even though I can access my local address book entries and in online accounts I have gmail's contacts and calendar turned to "off".  My default account does use POP to get mail from gmail.com, but neither "Default" nor my gmail address shows up when I switch to the contacts view.
Comment 17 Marek 2015-06-24 13:07:05 UTC
How do I install gnome-control-center?

$ sudo yum install gnome-control-center
Yum command has been deprecated, redirecting to '/usr/bin/dnf install gnome-control-center'.
See 'man dnf' and 'man yum2dnf' for more information.
To transfer transaction metadata from yum to DNF, run:
'dnf install python-dnf-plugins-extras-migrate && dnf-2 migrate'

Last metadata expiration check performed 0:09:29 ago on Wed Jun 24 13:56:01 2015.
No package gnome-control-center available.
Error: no package matched: gnome-control-center
$

Also is there a way to disable the annoying blue bar?

I have same problem on Fedora 22 (fresh install) with latest Evolution.
Comment 18 Marek 2015-06-24 13:19:51 UTC
ok, managed to install gnome-control-center - it was renamed to control-center for whatever reason.

Tried to run it - it redirects me to the oauth page... I don't want to enter my password there, I'd prefer to use app-password for Gnome. This is a very bad design to ask user for their oauth credentials just for an address book and calendar... will wait for Evolution to sort it out internally I guess :(
Comment 19 Milan Crha 2015-06-25 08:46:43 UTC
(In reply to Marek from comment #18)
> Tried to run it - it redirects me to the oauth page... I don't want to enter
> my password there, I'd prefer to use app-password for Gnome. This is a very
> bad design to ask user for their oauth credentials just for an address book
> and calendar... will wait for Evolution to sort it out internally I guess :(

Evolution will do it in the same way. As the bug summary says, "Use OAuth2 for Google" means that you'll give a password to it, then an OAuth2 key is generated by the server, which is later used by Evolution. The password you login into the Google page isn't stored anywhere. Application-specific passwords is history, that's all what the ClientLogin disable on the Google server side means. In other words, tell Google you want it done differently.
Comment 20 Alejandro Espinosa 2015-06-26 10:10:52 UTC
(In reply to Milan Crha from comment #4)
> This affects only Google address books (and eventually calendars) directly
> configured in the Evolution. Use GNOME Online Accounts (GOA) to add a Google
> account (where you can enable only Contacts and Calendars), which will use
> OAuth2 and thus will work properly.

I added my Google account to GOA and mow it works inside Evolution.
¡Thanks a lot!
Comment 21 Milan Crha 2015-07-09 14:16:37 UTC
*** Bug 751979 has been marked as a duplicate of this bug. ***
Comment 22 Milan Crha 2015-07-13 20:21:56 UTC
Bug #751979 comment #6 references a change in the Evolution, where I hid "Add Contacts source" for GMail configured accounts (at the end of the new account wizard), thus the Contacts are not added and the user is not confused by the error message about the Contacts not being able to open. That code should be removed once this bug is done.
Comment 23 h0wdyd3wdy 2015-08-03 06:18:06 UTC
With Fedora 22 64 bit, I'm still having this issue with Evolution 3.16.4.

The requested resource was not found: https://developers.google.com/accounts/docs/AuthForInstalledApps

If I add the account through GOA, it has issues with credentials.

What is the solution?
Comment 24 Milan Crha 2015-08-03 06:33:14 UTC
(In reply to h0wdyd3wdy from comment #23)
> If I add the account through GOA, it has issues with credentials.

What issues with credentials, please?

> What is the solution?

Current solution is to use GOA.
Comment 25 Milan Crha 2015-09-11 15:28:53 UTC
Created attachment 311157 [details] [review]
proposed eds patch

for evolution-data-server;

This adds --enable-google-auth configure option, which, when enabled (by default it is enabled), compiles a new 'Google' authentication method, which uses
OAuth 2 for Google sources. This also requires webkitgtk3 and json-glib as new optional dependencies for evolution-data-server.
Comment 26 Milan Crha 2015-09-11 15:30:00 UTC
Created attachment 311158 [details] [review]
proposed evo patch

for evolution;

The evolution part, using the new 'Google' authentication whenever possible.
Comment 27 Milan Crha 2015-09-21 13:38:31 UTC
Created commit 3ed3588 in eds master (3.19.1+)
Created commit ea0f25c in evo master (3.19.1+)
Comment 28 Milan Crha 2015-09-21 13:39:15 UTC
Evolution commit link:
https://git.gnome.org/browse/evolution/commit/?id=ea0f25c
Comment 29 Pacho Ramos 2016-06-21 08:41:48 UTC
Wouldn't be possible to rely on gnome-online-accounts from eds instead of reimplementing it here? Well, I would like to avoid needing another webkit-gtk package only for this (the old 2.4.x versions that are also vulnerable and also long to compile)

Thanks :)
Comment 30 Milan Crha 2016-06-22 09:09:33 UTC
(In reply to Pacho Ramos from comment #29)
> Wouldn't be possible to rely on gnome-online-accounts from eds instead of
> reimplementing it here?

Yes, of course, do not build with the google-auth and it'll fully rely on the GOA. That's no problem, the choice is up to the packager. Only count with it that the users can get different experience when the eds is built without the goolge-auth when they'll create accounts directly in the evolution. This requirement is only for such accounts (directly configured in the evolution), not for GOA accounts.
Comment 31 Pacho Ramos 2016-06-22 19:44:39 UTC
OK, thanks for the information :)
Comment 32 Andrea Vai 2016-06-23 06:16:16 UTC
Personally, as an evo user, I would prefer the native evo implementation rather than relying on GOA
Comment 33 Khurshid Alam 2016-09-21 17:07:43 UTC
@Milan Crha

Is there any intention to cherry-pick this for 3.18 as well? Ubuntu 16.04 LTS uses evolution-data-server 3.18. Thanks.
Comment 34 Milan Crha 2016-09-22 06:47:35 UTC
Definitely not for the upstream. The change is not trivial, adds dependencies and currently deals with some issues too (bug #771547).
Comment 35 Khurshid Alam 2016-09-22 13:23:22 UTC
Ok. Understood.