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 582780 - Evolution - Google Calendar does not honor proxy settings
Evolution - Google Calendar does not honor proxy settings
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Calendar
2.28.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: evolution-calendar-maintainers
Evolution QA team
evolution[google]
: 594638 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-05-15 15:18 UTC by Cory Maccarrone
Modified: 2010-03-01 13:49 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26


Attachments
proposed evo patch (1.46 KB, patch)
2009-09-10 11:43 UTC, Milan Crha
none Details | Review
proposed evolution patch (1.49 KB, patch)
2009-09-10 14:56 UTC, Alexander Klepikov
committed Details | Review

Description Cory Maccarrone 2009-05-15 15:18:47 UTC
Please describe the problem:
The google calendar portion of Evolution does not respect Evolution's network proxy settings.  Instead, it attempts to perform communication over the local network, regardless of what the system and Evolution proxy settings are set to.

Steps to reproduce:
1. Set up computer on a network behind a proxy
2. Start Evolution and configure it for the proxy
3. Select New->Calendar
4. Select "Google" as the type, fill in the name and username
5. (Click Use SSL, or leave it unchecked, both ways produce the behavior)
6. Click "Retrieve list"
7. Fill in password when prompted


Actual results:
After entering the password, the following error appears:

    Cannot read data from Google server.
    Cannot resolve hostname

Additionally, the following console output is produced:

    (evolution:8506): e-data-server-ui-WARNING **: Keyring key is unusable: no user or host name

A wireshark capture of the network traffic performed during this action shows:

48 7.022322 132.224.148.132 192.65.102.200 DNS Standard query A www.google.com
49 7.023570 192.65.102.200 132.224.148.132 DNS Standard query response, No such name


Expected results:
I would expect the http or https proxy to be queried for the calendar information instead of attempting direct communications.  The list of calendars should then be populated.

Does this happen every time?
This happens 100% of the time.

Other information:
If you click the "OK" button to create the calendar, Evolution prompts for a password.  When entered, the same Wireshark output is displayed:

7 3.626634 132.224.148.132 192.65.102.200 DNS Standard query A www.google.com
8 3.628374 192.65.102.200 132.224.148.132 DNS Standard query response, No such name

Console output at the time is:

    e-data-server-ui-Message: Unable to find password(s) in keyring (Keyring reports: No matching results)
    e-data-server-ui-Message: Key file does not have group 'Passwords-google'

The Evolution GUI responds to this by repeatedly asking for a password.  When a direct internet connection is available (without a proxy), the calendar works as expected.
Comment 1 Cory Maccarrone 2009-05-15 15:23:33 UTC
This bug has also been filed as Bug 37623 against Ubuntu (https://bugs.launchpad.net/bugs/376523 - Google calendar fails when behind proxy)

Comment 2 Milan Crha 2009-06-18 16:18:41 UTC
I checked changes between gnome-2-26 and actual master in evolution-data-server on relevant sources and there is nothing related to this, but for me the 2.26 version doesn't work, but the master version works well. It seems to me that this is question on a libsoup, as I link to two different version, the master compiles to the newer version.

Could you try to update your libsoup and try again (after evolution --force-shutdown) and report back, please? Thanks in advance.
Comment 3 Akhil Laddha 2009-09-10 03:42:35 UTC
*** Bug 594638 has been marked as a duplicate of this bug. ***
Comment 4 Alexander Klepikov 2009-09-10 07:30:18 UTC
I have similar problem with version 2.27.92 on Debian Sid. I updated libsoup to 2.27.92 and I have partial success. Now Google Calendar can fetch calendar data via proxy. But if I want to use other than default calendar, I press button "Retrieve list" on Calendar Settings. And Evolution still ignores proxy server settings. I see it with tcpdump.

# tcpdump -ni eth0 net 74.125.0.0/16

10:26:57.409512 IP 172.17.2.81.44573 > 74.125.39.147.443: Flags [S], seq 3267047894, win 5840, options [mss 1460,sackOK,TS val 468220552 ecr 0,nop,wscale 7], length 0
10:27:21.409519 IP 172.17.2.81.44573 > 74.125.39.147.443: Flags [S], seq 3267047894, win 5840, options [mss 1460,sackOK,TS val 468226552 ecr 0,nop,wscale 7], length 0
Comment 5 Milan Crha 2009-09-10 11:43:11 UTC
Created attachment 142902 [details] [review]
proposed evo patch

for evolution;

Ouch, that place I forgot. Are you able to test with this patch, please? note only the plugin itself should be rebuild, no need to build whole evolution.
Comment 6 Alexander Klepikov 2009-09-10 14:56:41 UTC
Created attachment 142915 [details] [review]
proposed evolution patch
Comment 7 Alexander Klepikov 2009-09-10 14:57:50 UTC
There's only one thing missing:

e_proxy_setup_proxy (proxy);

With this small adjustment it works perfect! Thank you!
Comment 8 Milan Crha 2009-09-10 17:59:47 UTC
Ouch, thanks for the update, I forgot of that.
Comment 9 Milan Crha 2009-09-10 18:33:21 UTC
Created commit cd230e5 in evo master (2.29.1+)
Created commit 2956f9d in evo gnome-2-28 (2.27.93+)
Comment 10 Justin Sabelko 2009-12-15 21:54:05 UTC
I'm still having issues with this bug on Ubuntu 9.10, but only when I set Evolution to use the system defaults for the proxy. When I configure the proxy manually within Evolution, I don't have any issues and it works just fine. It's a little annoying to have to switch the proxy settings in two places when I switch between work and home.
Comment 11 Milan Crha 2009-12-16 10:58:56 UTC
What is the Evolution version in that ubuntu 9.10? Is it 2.28.x? I believe you are using exactly same settings there, maybe some GConf keys got moved, could you look what is in these keys, please:
/system/http_proxy/use_http_proxy
/system/http_proxy/host
/system/http_proxy/port
/system/proxy/secure_host
/system/proxy/secure_port
it should use them when determining your proxy usage.
Comment 12 Justin Sabelko 2009-12-21 23:15:04 UTC
I'm using Evolution 2.28.1.

All those keys look right...  Unfortunately I won't be back at work to check the proxy stuff until early next year.  Do I need to exit evolution and restart it when I switch between proxy and no proxy?  Or can it pick it up on the fly?  And since there's a calendar part that's always running even when the regular application is closed, does that affect it?

Thanks!
Comment 13 Milan Crha 2009-12-22 10:06:37 UTC
It is supposed to notify the change on the fly, though if it'll really reconnect or not is the question. If connection to the calendar failed, then it most likely will reconnect, but let's ensure it with closing evolution and running "evolution --force-shutdown" from a console.
Comment 14 Justin Sabelko 2010-01-11 16:49:45 UTC
I'm finally back at work to check the proxy stuff.  I tried "evolution --force-shutdown" and that didn't work.  I even tried rebooting for good measure and that didn't work either.
Comment 15 Milan Crha 2010-01-12 09:56:01 UTC
OK, the --force-shutdown is sufficient. Maybe something doesn't work for system proxy setting in Evolution. When you try to file the same proxy information in evolution, under Manual Proxy, will it work the next start or not?
Comment 16 Justin Sabelko 2010-01-12 15:30:40 UTC
Yup, it works when I put in the information under Manual Proxy, and it'll pick up those changes on the fly (and keeps them on restart).
Comment 17 Milan Crha 2010-01-12 16:14:02 UTC
OK, thanks for the update. Then it seems there is some issue when reading system proxy settings.
Comment 18 Benedict Stein 2010-01-12 16:20:00 UTC
Hi, tested this at school today as I'm having trouble with Evo proxy too,
the 2.28.1 installed in ubuntu karmic (9.10) wasn't able to connect after setting manual proxy.

This is kinda strange as Justin reported it is working for him - right ?
Comment 19 Justin Sabelko 2010-01-19 16:52:06 UTC
So what are the next steps for this?  Is there anything I can do to help move this towards getting fixed somehow?
Comment 20 Milan Crha 2010-01-19 17:39:00 UTC
Ah, right, let's reopen this. Am I right that you both have both http and https proxies set?
Comment 21 Justin Sabelko 2010-01-19 17:44:03 UTC
In my system proxy settings, I have it pointed to a configuration script that looks like this:

function FindProxyForURL(url, host)
{
// Use proxy for bad.ccci.org to test
if(host == "bad.ccci.org")
return "PROXY proxy.ccci.org:8080";
// Use proxy for https://app.bronto.com
if(url.substring(0, 18) == "https://app.bronto")
return "PROXY proxy.ccci.org:8080";
// Do not use proxy for SSL (https) web sites
if(url.substring(0, 6) == "https:")
return "DIRECT";
// Do not use proxy for ftp (ftp://) web sites
if(url.substring(0, 4) == "ftp:")
return "DIRECT";
// Do not use proxy if hostname is incomplete
// Example: mylakehart
if(isPlainHostName(host))
return "DIRECT";
// Do not use proxy if host is localhost
if(host == "127.0.0.1")
return "DIRECT";
// Do not use proxy if host is in 10.0.0.0/8
if(isInNet(host, "10.0.0.0", "255.0.0.0"))
return "DIRECT";
// Do not use proxy if host is in 172.16.0.0/16
if(isInNet(host, "172.16.0.0", "255.255.0.0"))
return "DIRECT";
// Do not use proxy if host is in 172.19.0.0/16 (CSU via VPN)
if(isInNet(host, "172.19.0.0", "255.255.0.0"))
return "DIRECT";
// Else use proxy 
return "PROXY proxy.ccci.org:8080";
}
Comment 22 Milan Crha 2010-01-20 09:49:00 UTC
(In reply to comment #21)
> In my system proxy settings, I have it pointed to a configuration script

Aha, so you have "Autoconfiguration script" chosen, and there filled a URL for a script, right? Evolution doesn't support this kind of thing, which might explain it. I'll try with "static" system proxy config to make sure it works (or not).
Comment 23 Milan Crha 2010-01-20 12:23:27 UTC
OK, so I did some tests, and it seems to get the proxy settings correctly from a system proxy. It also recognizes changes on the fly. The only issue is that Evolution understands "Direct internet connection" and "Manual proxy configuration" options from the choices in the system Network proxy Preferences. 

To take the proxy settings in action one should either refresh a calendar, or restart evolution and evolution-data-server (with the second one might be more sure that it read and used the changes, but from what I understood in Soup, the new proxy is used the next time it's trying to send a message, thus the refresh should work as well).

When I select "Automatic proxy configuration", then it behaves like the "Manual" is set. I do not have any Autoconfiguration URL, so if it also modifies items in the Manual proxy section there, then Evolution will pick them properly. But scripts like Justin have Evolution doesn't understand. (There should be filled a new bug report for autoconfig support.)

Benedict, what is your system proxy configuration option?
Comment 24 Justin Sabelko 2010-01-20 15:19:33 UTC
I tried setting up the Manual Proxy Configuration in the Gnome settings, but that didn't work for me either.  It's still not getting the Google calendars I have set up.  As for your question from awhile back, it's only an HTTP proxy (as you can see in the script).  HTTPS isn't set up and should go through just fine (which I tested by going to an https website when my proxy settings were off).
Comment 25 Benedict Stein 2010-01-20 16:32:47 UTC
Hi milan,

i didn't have the tiem to test it at school once again, I still need to check whether setting manual proxy and fully restarting evo server will solve this for me.

IIRC, we're using http proxy at school which is also used for HTTPs

-> what else do you want if you say "what's" your proxy config?

-usually i use the gnome dialog to manually set a proxy IP for all services (10.11068.21:3128)
- and we need the user and pwsd for it, which is entered within the config
Comment 26 Milan Crha 2010-01-21 10:17:04 UTC
Benedict, thanks, this is what I was looking for. You've pretty same setup as the one I was testing on.

As far as I can tell your Google calendar should use CalDAV to connect there, with URL: https://<username>@www.google.com/calendar/dav/<username>/events
I was testing it here with direct caldav, but that shouldn't make any difference.

We may try one thing:
a) close evolution and run on console: evolution --force-shutdown
b) open another console and run there:
   $ CALDAV_DEBUG=all /usr/libexec/evolution-data-server-2.28
   Maybe your path to the process is different, it depends on your distro.
c) run evolution on another console and try to enable the Google calendar

There should be couple new lines on the evolution-data-server console indicating communication between evolution and google server through https (lines with '>' and '<' as prefix letters). If not, then something is wrong (maybe your google calendar is not using CalDAV). There should be also written a reason what failed.
Comment 27 Justin Sabelko 2010-01-21 16:02:45 UTC
I actually got it to work by setting the https proxy (although it shouldn't really be required for my setup).  So I guess it does actually work for me, if I set it up a certain way.  It'd be nice if it worked with the configuration script and without needing the https proxy, but I'm content with it the way it is.

Now if only I can get it to work with recurring events... (but that's another issue...)

Thanks for your help!
Comment 28 Benedict Stein 2010-02-06 22:23:19 UTC
just found something unbelieveable,

as I said earlier no part of evo recognizes my proxy settings, even after force shutdown.

But I wondered why I couldn't grab my google adresse book, and guess what I now discovered that I forgot to revert my use proxy settings done earlier.
Using a proxy which doesn't exist in my network at home I was able to sync Mails + Calendars for weeks now. BUt not contacts.

Restoring the evo settings to direct connection withouht evo--force-shutdown
I was able again to access the adressbook,

=> For me it looks like the proxy works but that some parts ignore this config.

Possibly I'll be able to test this in 2 weeks on a 2.29.1 as well.

PS: More Hopefully would be that the bug could be solved ;-)
Comment 29 Milan Crha 2010-02-08 12:55:51 UTC
OK, so it turned out that we can finally re-close this bug report, because it is actually working, with a little restriction that evolution doesn't support proxy configuration scripts, which is pretty out of scope of this bug report? I hope I read the above information correctly, thus I'm closing it.

(In reply to comment #28)
> Possibly I'll be able to test this in 2 weeks on a 2.29.1 as well.

There was released a 2.29.90 today, I think you meant this one, because the 2.29.1 is pretty old and with respect of proxy setting pretty same as 2.28.2.
Comment 30 Benedict Stein 2010-02-08 15:02:36 UTC
Milan, sry messed up some things, my empathy version is 2.29.6
Evolution's is 2.28.2 (daily Ubuntu build)