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 735311 - Adapt to new Google HTTP restriction
Adapt to new Google HTTP restriction
Status: RESOLVED FIXED
Product: evolution-data-server
Classification: Platform
Component: Calendar
3.12.x (obsolete)
Other Linux
: Normal major
: ---
Assigned To: evolution-calendar-maintainers
Evolution QA team
: 734298 734387 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2014-08-24 07:08 UTC by Ankur Sinha (FranciscoD)
Modified: 2015-10-05 07:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Bugfix patch, backported to evolution-data-server-3.10.4 (5.27 KB, patch)
2014-08-27 17:17 UTC, Frank Dana
none Details | Review

Description Ankur Sinha (FranciscoD) 2014-08-24 07:08:36 UTC
I've set up my google account using GOA. Mail etc. works just right but the default calendar that's supposed to be set up doesn't. I keep getting this error:

Unable to connect to 'Calendar': Cannot open calendar: Authentication required

I've removed the gmail account and readded it but I still get the same error.

[asinha@localhost  ~]$ rpm -qa \*evoluti\*
evolution-data-server-debuginfo-3.12.5-2.fc21.x86_64
evolution-data-server-3.12.5-2.fc21.x86_64
evolution-ews-3.12.5-2.fc21.x86_64
evolution-help-3.12.5-2.fc21.noarch
evolution-3.12.5-2.fc21.x86_64
[asinha@localhost  ~]$ rpm -qa \*gnome-online\*
gnome-online-miners-3.13.3-2.fc21.x86_64
gnome-online-accounts-3.13.90-1.fc21.x86_64
[asinha@localhost  ~]$

If I add the calendar manually in evolution, it works just fine. Probably something to do with GOA.

Thanks,
Warm regards,
Ankur
Comment 1 Matthew Barnes 2014-08-25 12:34:59 UTC
Google has apparently recently changed the behavior of its CalDAV v2 interface, which uses OAuth authentication exclusively.

IIUC, the normal operation of SoupSession is to issue the first HTTP message unauthorized and see if the server issues a "401 Unauthorized" response (since not all HTTP services require authorization).

On a "401 Unauthorized" response, SoupSession emits an "authenticate" signal, which the application is supposed to handle.  Once credentials are in hand, SoupSession resends the same HTTP message and subsequent messages with an Authenticate header while the socket connection holds.

Google seems to have broken this logic flow by imposing some limit to the number of unauthorized HTTP requests to its OAuth-based interfaces.  Once that limit is exceeded, the Google server issues a "403 Forbidden" response instead of "401 Unauthorized".  This breaks error handling in the E-D-S CalDAV backend.

I think the right solution is to proactively include the Authenticate header from the very first HTTP message when using OAuth.  I just need to figure out how to convince libsoup to do that.
Comment 2 Matthew Barnes 2014-08-25 12:37:44 UTC
*** Bug 734387 has been marked as a duplicate of this bug. ***
Comment 4 Brent 2014-08-25 15:37:17 UTC
Is this going to be backported to the version that is installed with RHEL/CentOS 7, 3.8.5?  Thanks!
Comment 5 Ankur Sinha (FranciscoD) 2014-08-25 15:40:00 UTC
(In reply to comment #3)
> Fixed in master and 3-12 branches:
> 
> https://git.gnome.org/browse/evolution-data-server/commit/?id=00a465670ef3d8adbaf011b3e697ba5befb00623
> 
> https://git.gnome.org/browse/evolution-data-server/commit/?h=evolution-data-server-3-12&id=5e9d80092b19f9bd2c02712ab0a50fa70b052c74

Matthew, can I please request an update for F21? The gnome test days are coming up. It'll be good to have as many fixes in the composes as possible :)

Thanks for the quick fix, as always,
Warm regards,
Ankur
Comment 6 Milan Crha 2014-08-27 07:35:40 UTC
(In reply to comment #5)
> (In reply to comment #3)
> > Fixed in master and 3-12 branches:
> > 
> > https://git.gnome.org/browse/evolution-data-server/commit/?id=00a465670ef3d8adbaf011b3e697ba5befb00623
> > 
> > https://git.gnome.org/browse/evolution-data-server/commit/?h=evolution-data-server-3-12&id=5e9d80092b19f9bd2c02712ab0a50fa70b052c74
> 
> Matthew, can I please request an update for F21? The gnome test days are coming
> up. It'll be good to have as many fixes in the composes as possible :)

I'm currently building evolution-data-server-3.12.5-3.fc21 at http://koji.fedoraproject.org/koji/taskinfo?taskID=7462127 . I also build an update for rawhide (the change missed 3.13.5 Monday release).
Comment 7 Frank Dana 2014-08-27 17:17:22 UTC
Created attachment 284624 [details] [review]
Bugfix patch, backported to evolution-data-server-3.10.4

Gnome bug 734298 was recently opened on a similar issue with Online Accounts in Fedora 20 (evolution-data-server 3.10.4). Over at the originating Ask Fedora thread ( https://ask.fedoraproject.org/en/question/51272/online-accounts-gmail-password-unexpectedly-fails/ ) FranciscoD_ pointed out this bug.

It would appear that 734298 is, in reality, a duplicate of this bug. Backporting Matthew's evolution-data-server 3.13.5 fix from comment 3 to the 3.10.4 codebase and building an updated evolution-data-server rpm completely cleared up the bug 734298 issues (in my testing, at least) and restored Gnome Calendar functionality to Shell/Evolution on Fedora 20.

For the sake of convenience I'm attaching the patch I added to build my evolution-data-server-3.10.4-4.rpm(s). It's nothing more than the verbatim patch for this bug, adjusted to the 3.10.4 sources. (Matthew's master/3-12 patch applied cleanly onto 3.10.4, after I added a little bit of extra fuzz factor.)
Comment 8 Debarshi Ray 2014-09-15 12:17:17 UTC
*** Bug 734298 has been marked as a duplicate of this bug. ***
Comment 9 Julien Olivier 2015-10-03 10:21:41 UTC
The bug is still present in Evolution 3.12.11, at least on Ubuntu.
Comment 10 André Klapper 2015-10-04 12:53:35 UTC
Julien: Ask your distribution to backport https://bugzilla.gnome.org/show_bug.cgi?id=735311#c3 ?
Comment 11 Milan Crha 2015-10-05 05:57:10 UTC
(In reply to André Klapper from comment #10)
> Julien: Ask your distribution to backport
> https://bugzilla.gnome.org/show_bug.cgi?id=735311#c3 ?

It's part of 3.12.6. Do you get exactly the same behavior as in comment #0, or any other/similar? I ask, because this works fine for me. You can be affected by bug #728496, bug #749135 or some other GOA-related bugs to which I do not have links handy.
Comment 12 Julien Olivier 2015-10-05 07:47:04 UTC
Hi Milan, my bug is more like #728496 actually, which is also more recent and might not yet have been fixed in Ubuntu. Thanks.