Bug 274184 - Kpackagekit Couldn't resolve proxy 'HTTP_PROXY'
Summary: Kpackagekit Couldn't resolve proxy 'HTTP_PROXY'
Status: RESOLVED FIXED
Alias: None
Product: apper
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Daniel Nicoletti
URL:
Keywords: investigated, triaged
Depends on:
Blocks:
 
Reported: 2011-05-26 11:22 UTC by Thomas Goettlicher
Modified: 2018-09-19 14:27 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 0.8.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Goettlicher 2011-05-26 11:22:45 UTC
Version:           unspecified (using KDE 4.6.0) 
OS:                Linux

The original bug report was: https://bugzilla.novell.com/show_bug.cgi?id=678993

After a fresh install of OpenSuSE 11.4, Kpackagekit informs the availability of
10 patches. Upon clicking the system tray icon I am prompted to enter the root
password. After entering the root password I get information about problems
connection to software source. Pressing Details gives the following info:

Download (curl) error for
'http://download.opensuse.org/update/11.4/repodata/repomd.xml':
Error code: Connection failed
Error message: Couldn't resolve proxy 'HTTP_PROXY'

Internet connection is working fine and the computer has been restarted since
the installation of OpenSuSE 11.4.


Reproducible: Always

Steps to Reproduce:
1.Press the KpackageKit icon when updates are available.
2.Enter the root password.
3.Observe the given error message.
Actual Results:  
The described error message is given.

Expected Results:  
The listed patches are applied.

I have added the following repositories:
Packman (For Mplayer)
NVIDIA (For drivers)
Factory:Contrib (For Chromium)

Reproducible: Didn't try
Comment 1 Thomas Goettlicher 2011-05-26 11:24:26 UTC
There are a lot of discussions, debugging and proposed workarounds in the  comments of https://bugzilla.novell.com/show_bug.cgi?id=678993
Comment 2 Daniel Nicoletti 2011-05-27 12:33:07 UTC
Hi,
I've installed openSuse the other day as kubuntu natty
has some bug that makes my X hell of unstable,
so, I didn't saw this issue there but when I used KPK
there I found out wow why this is so slow!

It is slow because for a bunch of operations the zypp
backend does refresh your cache even if it refreshed a second
ago, and as the proxy is set only on some operations,
I imagine this might be the issue of the cause.

Also suse is the only system that asks for auth to set
proxies which might also mean something.

Is there a way to make my fresh installation give me
the same error so I can properly blame the right part
of zypp backend? :P
Comment 3 Sultanbek Tezadov 2011-08-23 06:01:59 UTC
I get the same symptoms except the error message is
Error message: Couldn't resolve proxy 'FTP_PROXY'

Everything proxy related is commented out in 
/etc/kde4/share/config/kioslaverc
/root/.kde4/share/config/kioslaverc
/home/sultan/.kde4/share/config/kioslaverc

I get the error message when I run kpk_update manually only
Comment 4 Sultanbek Tezadov 2011-08-23 06:12:41 UTC
I changed
~/.kde4/share/config/kioslaverc
by uncommenting 

#[Proxy Settings]
#ProxyType=1

and changing ProxyType to 0:

[Proxy Settings]
ProxyType=0

then restarted KDE session and it fixed the issue.
Comment 5 Daniel Nicoletti 2011-08-23 14:00:03 UTC
Well it uses kde proxy settings, but were you using proxies?
If so was the proxy working on konqueror for example?
as it might be an issue where your backend doesn't get right the proxy vars...
Comment 6 Sultanbek Tezadov 2011-08-23 15:12:52 UTC
I have direct Internet connection and never configured proxies on this system. KDE settings / Proxy servers is configured to not use proxies and it has always been configured that way.
Comment 7 Daniel Nicoletti 2011-08-23 17:26:20 UTC
hmm I'll do some tests today, the biggest problem here is that openSuse is the only distro that asks admin password to change the proxy settings, PackageKit
shouldn't ask the proxy password but it seems it does, but I'm unsure what else if needed for this to work right when no proxy is set..
Comment 8 Dawit Alemayehu 2011-10-28 17:11:06 UTC
@daniel 

does kpackagekit use KProtocolManager to read the KDE proxy settings ? If so, then the issue is likely resolved by the recent changes I made to KProtocolManager::proxyForUrl  and KProtocolManager::proxiesForUrl functions. Before this change, which is in the upcoming 4.7.3 release, calling those two functions did not take the proxy exception information into consideration. Now it does and so this problem should automatically resolve itself.

However, if kpackagekit directly reads the KIO proxy configuration file, then it must take the proxy exception list ('NoProxyFor') and flag ('ReverseException') into consideration. I highly recommend against reading the configuration file directly since it can change at any given time in the future.
Comment 9 Daniel Nicoletti 2013-01-09 15:07:58 UTC
Apper 0.8.0 certanly has this issue fixed as it has now a watcher for this proxy file that asks for a reparse of the config when needed.
Comment 10 Andrew Crouthamel 2018-09-19 14:27:40 UTC
This bug has had its resolution changed, but accidentally has been left in NEEDSINFO status. I am thus closing this bug and setting the status as RESOLVED to reflect the resolution change.