flashplugin-installer do not honore proxy settings

Bug #1098233 reported by marcobra (Marco Braida) on 2013-01-10
This bug affects 14 people
Affects Status Importance Assigned to Milestone
Adobe Flash Plugin Tools
update notifier
flashplugin-nonfree (Ubuntu)

Bug Description

Description: Ubuntu 12.10
Release: 12.10
Codename: quantal

  Tabella versione: 0
        500 http://archive.ubuntu.com/ubuntu/ quantal-updates/multiverse i386 Packages
        500 http://archive.ubuntu.com/ubuntu/ quantal-security/multiverse i386 Packages
 *** 0
        100 /var/lib/dpkg/status 0
        500 http://archive.ubuntu.com/ubuntu/ quantal/multiverse i386 Packages

flashplugin-installer do not honore proxy settings so cannot download the proxy so my update are frozen on

Elaborazione dei trigger per update-notifier-common...
flashplugin-installer: downloading http://archive.canonical.com/pool/partner/a/adobe-flashplugin/adobe-flashplugin_11.2.202.261.orig.tar.gz

already reported:

Very old issue still not solved... :-(

#---------------- Workaround for user with same issue ----------------

As a workaround... while the apt-get update process is frozen on the row below

Elaborazione dei trigger per update-notifier-common...
flashplugin-installer: downloading http://archive.canonical.com/pool/partner/a/adobe-flashplugin/adobe-flashplugin_11.2.202.261.orig.tar.gz

Opening another terminal...
wget http://archive.canonical.com/pool/partner/a/adobe-flashplugin/adobe-flashplugin_11.2.202.261.orig.tar.gz
sudo /usr/lib/flashplugin-installer/install_plugin $(pwd)/adobe-flashplugin_11.2.202.261.orig.tar.gz
rm adobe-flashplugin_11.2.202.261.orig.tar.gz

then to release the frozen update process, type:

sudo killall dpkg

or reboot the pc, then type:

sudo dpkg --configure -a

to check and put in a good state the apt env...

# --------------------------------------------------------------


ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: flashplugin-installer
Uname: Linux 3.7.1-030701-generic i686
ApportVersion: 2.6.1-0ubuntu9
Architecture: i386
Date: Thu Jan 10 15:39:05 2013
MarkForUpload: True
SourcePackage: flashplugin-nonfree
UpgradeStatus: Upgraded to quantal on 2012-07-02 (192 days ago)

description: updated
description: updated
description: updated
description: updated
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in flashplugin-nonfree (Ubuntu):
status: New → Confirmed

This bug also create same big lock upgrading from ubuntu 12.10 to ubuntu 13.04

description: updated
jotape99 (jotape99) wrote :

Also affects 13.04

Waseem Elliot (waseem-x) wrote :

Aso affects 12.04

Jan Groenewald (jan-aims) wrote :
Download full text (3.6 KiB)

I think the problem is un update-notifier

This bit of code checks the environment
0 jan@muizenberg:/var/autofs/misc/home/jan$grep -C3 nv /usr/lib/update-notifier/package-data-downloader
 Failed downloads are reported to the user via the
 update-notifier interface."""

 # Get our proxy settings from the environment
 proxies = {}
  for proto in ('http','https','ftp'):
    proxies[proto] = os.environ[proto+"_proxy"]
   except KeyError:

0 jan@muizenberg:/var/autofs/misc/home/jan$dpkg -S /usr/lib/update-notifier/package-data-downloader
update-notifier-common: /usr/lib/update-notifier/package-data-downloader

Both these /etc/environment and /etc/apt/apt.conf are ignored:

0 jan@muizenberg:/var/autofs/misc/home/jan$cat /etc/environment PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
0 jan@muizenberg:/var/autofs/misc/home/jan$cat /etc/apt/apt.conf
Acquire::http::proxy "http://proxy.aims.ac.za:3128/";
Acquire::https::proxy "https://proxy.aims.ac.za:3128/";
Acquire::ftp::proxy "ftp://proxy.aims.ac.za:3128/";
0 jan@muizenberg:/var/autofs/misc/home/jan$

However when I run

env | grep prox

from either root's crontab -e or from /etc/crontab as root, I do see the appropriate proxies set. I thought this was where os.environ would get the value, but it does not. You can stick a print statement in /usr/lib/update-notifier/package-data-downloader to see that omission.

Some history

Some of those workarounds seem way too long. For us it works to go from the command line (not from cron) , where your http_proxy is set:

apt-get --reinstall install flashplugin-installer

In real life, many of my users flash stops working each time there is an update to flashplugin-installer, because they are not familiar with the command line. In addition, their entire apt system stays broken with this error popping up every subsequent time they install/update anything else graphically.

So, while it is marked as WONTFIX here:
seems to be due to this:

That still leaves many users in a bad position. Despite the comment 4 linked above explaining why apt.conf should not be read. However, it goes on to say:

"So you can specify a system proxy by setting the http_proxy variable in /etc/environment. Depending on how you're gaining root privileges for apt, you may still run into problems due to bug #982684, which will hopefully be fixed soon."

That other bug #982684 is fixed released April 2013, but I don't really see how it affects the cronjob /etc/cron.daily/update-notifier, though I'm not sure the cronjob uses sudo or pkexec.

In any case, on Ubuntu 12.04.2, the proxy still isn't rea...


Jan Groenewald (jan-aims) wrote :

Actually, this piece of code seems to work fine
 # Get our proxy settings from the environment
 proxies = {}
  for proto in ('http','https','ftp'):
    proxies[proto] = os.environ[proto+"_proxy"]
   except KeyError:
  print proxies # my code

  if proxies:
   urllib._urlopener = urllib.FancyURLopener(proxies)
 except Exception:

and then the urllib.urlretrieve should work, and it does when run manually, but somehow not from the cron job. I can't see why.

Jan Groenewald (jan-aims) wrote :

Ok, when I put

print proxies

the line before "if proxies:" and I run /etc/cron.daily/update-notifier manually, the proxies are printed out correctly. When I leave it to run via cron/run-parts, I get this however:


Is this due to run-parts or the cron environment?

Josep Pujadas-Jubany (jpujades) wrote :

/usr/lib/update-notifier/package-data-downloader from update-notifier uses python urllib

It seems to be problems when using proxies. In addition, urllib doesn't supports https protocol.


Using a http proxy, adobe-flashplugin updates will work but not allways:

urllib.urlretrieve("http://archive.canonical.com/pool/partner/a/adobe-flashplugin/adobe-flashplugin_11.2.202.425.orig.tar.gz", "adobe-flashplugin.tar.gz")

Using a https proxy, pepflashpluguin updates will never work:

urllib.urlretrieve("https://dl-ssl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_39.0.2171.95-1_i386.deb", "google-chrome.deb")

So, scripts must be something like:

export http_proxy=
export https_proxy=
apt-get install -y flashplugin-installer
apt-get install -y pepflashplugin-installer
echo "" >> /etc/chromium-browser/default
echo ". /usr/lib/pepflashplugin-installer/pepflashplayer.sh" >> /etc/chromium-browser/default
echo "" >> /etc/chromium-browser/default
unset http_proxy
unset https_proxy
apt-get --reinstall install -y flashplugin-installer
apt-get --reinstall install -y pepflashplugin-installer

Of course, if yo do this, your corporative firewall/proxy must allow direct connections to archive.canonical.com (http) and dl-ssl.google.com (https).

In my opinion, update-notifier (and other applications using urllib) should avoid python urllib

There are many bugs related (in fact, they are duplicated):


To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers