Bug 1348843 - PackageKit does not work with a proxy
Summary: PackageKit does not work with a proxy
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: PackageKit
Version: 26
Hardware: Unspecified
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Richard Hughes
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-06-22 08:16 UTC by Simon Arnaud
Modified: 2021-03-13 09:02 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-05-29 11:52:43 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Simon Arnaud 2016-06-22 08:16:21 UTC
In a corporate environment, with proxy only web access, I configure through the GUI the HTTP, HTTPS and FTP proxy.

When I use "Software", nothing happens. I can browse the catalog, but install does not work.

If I use "pkcon" from command-line, I get an error :
[…@… ~]$ LC_ALL=C pkcon -v update
10:04:32	PackageKit          Verbose debugging enabled (on console 1)
10:04:32	PackageKit          failed to set proxy: GDBus.Error:org.gtk.GDBus.UnmappedGError.Quark._pk_2dengine_2derror_2dquark.Code3: setting the proxy failed
Command failed: The proxy could not be set: GDBus.Error:org.gtk.GDBus.UnmappedGError.Quark._pk_2dengine_2derror_2dquark.Code3: setting the proxy failed

"dnf" works, and the environment is correctly set.

If I unset in the shell all proxy, pkcon tries to download, but fails, obviously.

Version-Release number of selected component (if applicable):
I'm using latest PackageKit on F24 :
1.1.1-3.fc24

How reproducible:
If any proxy is set. Even only ftp_proxy throws the error.

Comment 1 Simon Arnaud 2016-07-15 09:43:46 UTC
Same problem with PackageKit 1.1.2-1.fc24

Comment 2 Trevor Davenport 2016-09-28 17:57:03 UTC
The same error is produced from gnome-software:

(gnome-software:3039): PackageKit-WARNING **: failed to set proxy: GDBus.Error:org.gtk.GDBus.UnmappedGError.Quark._pk_2dengine_2derror_2dquark.Code3: setting the proxy failed: failed to get the session

(gnome-software:3039): GsPlugin-WARNING **: failed to set proxies: GDBus.Error:org.gtk.GDBus.UnmappedGError.Quark._pk_2dengine_2derror_2dquark.Code3: setting the proxy failed: failed to get the session

This is really unfortunate this hasn't been fixed since it makes gnome-software useless in environments that require a proxy for web access.  Luckily dnf works fine.

Comment 3 Trevor Davenport 2016-09-28 22:57:59 UTC
This does also cause gnome-software to not correctly report there are updates to install so if you rely on it for updates you are left in the dark.  I had thought it still worked under some conditions but I've been unable to get it to work.  It will try to refresh for a long time and then sometimes report the action was cancelled by the user (it wasn't...it apparently timed out) or it just goes back to reporting there are no updates(despite dnf clearly listing updates).

Comment 4 Simon Arnaud 2016-09-29 14:24:05 UTC
The problem is still there on F25 Alpha with latest updates.

Comment 5 Simon Arnaud 2016-11-22 13:09:49 UTC
Just updated to F25 final, still the same bug.

Comment 6 Cédric Bellegarde 2017-05-17 13:40:22 UTC
F26, same bug.

Comment 7 Fedora End Of Life 2017-07-25 21:11:34 UTC
This message is a reminder that Fedora 24 is nearing its end of life.
Approximately 2 (two) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 24. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '24'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 24 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 8 Fedora End Of Life 2017-08-08 14:56:38 UTC
Fedora 24 changed to end-of-life (EOL) status on 2017-08-08. Fedora 24 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 9 Simon Arnaud 2017-09-14 14:37:09 UTC
Still there in F26

~ % LC_ALL=C http_proxy=foo pkcon update
Command failed: The proxy could not be set: GDBus.Error:org.gtk.GDBus.UnmappedGError.Quark._pk_2dengine_2derror_2dquark.Code3: setting the proxy failed: failed to get the session

Comment 10 Trevor Davenport 2017-11-15 19:55:36 UTC
Still present on F27.

Comment 11 Cédric Bellegarde 2018-03-19 14:52:06 UTC
Still present on F28, Gnome Software just hangs.

Comment 12 Fedora End Of Life 2018-05-03 08:09:53 UTC
This message is a reminder that Fedora 26 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 26. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '26'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 26 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 13 Piotr Dobrogost 2018-05-09 12:48:22 UTC
Seems to be still present on F28 – "Software Updates" Plasma widget (plasma-pk-updates) which talks to PackageKit shows connection errors again and again.

Strangely running `pkcon update` from Konsole seems to work and returns "No packages require updating to newer versions."
However `journalctl | grep packagekit` shows many errors like this:

maj 09 10:14:12 host.local packagekitd[2520]: Skipping refresh of jdoss-wireguard: Failed to download gpg key for repo 'jdoss-wireguard': Curl error (28): Timeout was reached for https://copr-be.cloud.fedoraproject.org/results/jdoss/wireguard/pubkey.gpg [Resolving timed out after 30000 milliseconds]

Running the same – curl https://copr-be.cloud.fedoraproject.org/results/jdoss/wireguard/pubkey.gpg – from Konsole works fine.

Is there no way to configure http(s) proxy for PackageKit?

Please mark this issue as present in F28.

Comment 14 Kevin Kofler 2018-05-16 22:32:58 UTC
You need to set the ProxyHTTP= key in /etc/PackageKit/PackageKit.conf – this came up on #fedora-kde today and setting the key worked.

Comment 15 Fedora End Of Life 2018-05-29 11:52:43 UTC
Fedora 26 changed to end-of-life (EOL) status on 2018-05-29. Fedora 26
is no longer maintained, which means that it will not receive any
further security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 16 Martin Pitt 2021-03-13 09:02:34 UTC
(In reply to Kevin Kofler from comment #14)
> You need to set the ProxyHTTP= key in /etc/PackageKit/PackageKit.conf – this
> came up on #fedora-kde today and setting the key worked.

This is  *not* the case, nothing in PackageKit looks at this key:

# strings /usr/lib64/packagekit-backend/libpk_backend_* | grep Proxy
(nothing)

# strings /usr/libexec/packagekitd | grep Proxy
CannotSetProxy
SetProxy method called: %s, %s

/usr/share/dbus-1/interfaces/org.freedesktop.PackageKit.xml indeed offers a
SetProxy() method, but `rpm -ql PackageKit | xargs grep SetProxy` does not show
any binary for that -- i.e. it seems nothing implements that interface.

This was just being discussed here:
https://lists.fedorahosted.org/archives/list/cockpit-devel@lists.fedorahosted.org/thread/KEQA7JLSWDKXB2JX4TU3J3FABDKDOXXK/

What *does* work is to inject the standard http_proxy etc. env variables into PackageKit.service.

(Thanks to "PCFreak" for these investigations!)


Note You need to log in before you can comment on or make changes to this bug.