apport-collect reports "HTTP Error 401: Unauthorized" even though permission has been given

Bug #368509 reported by Hendy Irawan on 2009-04-28
28
This bug affects 5 people
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: apport

While trying to follow instructions given in:
http://mdzlog.alcor.net/2009/03/31/please-dont-report-ubuntu-bugs-directly-to-launchpad/#comment-591

Unfortunately, apport-collect doesn’t work in my case:

$ apport-collect -p network-manager 368457
Logging into Launchpad…
The authorization page (https://edge.launchpad.net/+authorize-token?oauth_token=***************) should be opening in your browser. After you have authorized this program to access Launchpad on your behalf you should come back here and press to finish the authentication process.

Error connecting to Launchpad: HTTP Error 401: Unauthorized
You have to allow “Change anything” privileges.

I’ve repeated this process a few times and did click on the “Change anything” button but still doesn’t work. :-(

ProblemType: Bug
Architecture: i386
DistroRelease: Ubuntu 9.04
Package: apport 1.0-0ubuntu5
PackageArchitecture: all
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: apport
Uname: Linux 2.6.28-11-generic i686

Hendy Irawan (ceefour) wrote :
Andriy Loginov (avloginov) wrote :

The same story:
apport-collect -p network-manager 371711
Logging into Launchpad...
Downloading bug...
Traceback (most recent call last):
  File "/usr/bin/apport-collect", line 134, in <module>
    bug = lp.bugs[int(bug_number)]
  File "/usr/lib/python2.6/dist-packages/launchpadlib/resource.py", line 706, in __getitem__
    representation = simplejson.loads(self._root._browser.get(url))
  File "/usr/lib/python2.6/dist-packages/launchpadlib/_browser.py", line 222, in get
    response, content = self._request(url, extra_headers=headers)
  File "/usr/lib/python2.6/dist-packages/launchpadlib/_browser.py", line 212, in _request
    raise HTTPError(response, content)
launchpadlib.errors.HTTPError: HTTP Error 401: Unauthorized

The same thing here.

apport-collect -p alsa-base 373437
Logging into Launchpad...
Traceback (most recent call last):
  File "/usr/bin/apport-collect", line 131, in <module>
    lp = login()
  File "/usr/bin/apport-collect", line 48, in login
    launchpad = Launchpad(credentials, launchpad_instance, cache_dir)
  File "/usr/lib/python2.6/dist-packages/launchpadlib/launchpad.py", line 60, in __init__
    self._wadl = self._browser.get_wadl_application(self._root_uri)
  File "/usr/lib/python2.6/dist-packages/launchpadlib/_browser.py", line 230, in get_wadl_application
    url, media_type='application/vd.sun.wadl+xml')
  File "/usr/lib/python2.6/dist-packages/launchpadlib/_browser.py", line 212, in _request
    raise HTTPError(response, content)
launchpadlib.errors.HTTPError: HTTP Error 401: Unauthorized

Same here. But what worked for me was:
>Error connecting to Launchpad: HTTP Error 401: Unauthorized
>You have to allow “Change anything” privileges.

rm -fr ~/.cache/apport/

then run apport-collect command again enter an URL and hit the last button “Change anything” ! Press ENTER and wait...:-)

lubos

apport-collect -p pulseaudio 374017
Logging into Launchpad...
Traceback (most recent call last):
  File "/usr/bin/apport-collect", line 131, in <module>
    lp = login()
  File "/usr/bin/apport-collect", line 48, in login
    launchpad = Launchpad(credentials, launchpad_instance, cache_dir)
  File "/usr/lib/python2.6/dist-packages/launchpadlib/launchpad.py", line 60, in __init__
    self._wadl = self._browser.get_wadl_application(self._root_uri)
  File "/usr/lib/python2.6/dist-packages/launchpadlib/_browser.py", line 230, in get_wadl_application
    url, media_type='application/vd.sun.wadl+xml')
  File "/usr/lib/python2.6/dist-packages/launchpadlib/_browser.py", line 212, in _request
    raise HTTPError(response, content)
launchpadlib.errors.HTTPError: HTTP Error 401: Unauthorized

Thanks Ľuboš Rendek
Solved for me.

Architecture: i386
DistroRelease: Ubuntu 9.04
Package: apport 1.0-0ubuntu5.2
PackageArchitecture: all
ProcEnviron:
 SHELL=/bin/bash
 PATH=(custom, user)
 LANG=en_US.UTF-8
Uname: Linux 2.6.28-11-generic i686
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare

Hendy Irawan (ceefour) wrote :
Hendy Irawan (ceefour) wrote :

Solution provided by Ľuboš Rendek also worked for me. Thanks!

Apport should detect the (invalid) cache and purge it automatically, or provide a confirmation prompt.

Changed in apport (Ubuntu):
status: New → Confirmed
Erigami (erigami) wrote :

Lubos' solution doesn't work for me:

---
$ rm -fr ~/.cache/apport/
$ ls ~/.cache/
album-art compizconfig gedit rhythmbox ubuntuone
banshee-1 Empathy notify-osd.log tracker
$ apport-collect -p ubuntuone-client 397027
Logging into Launchpad...
The authorization page (https://edge.launchpad.net/+authorize-token?oauth_token=XF3mcrHSChLxwpC6fXCG) should be opening in your browser. After you have authorized this program to access Launchpad on your behalf you should come back here and press <Enter> to finish the authentication process.

Error connecting to Launchpad: HTTP Error 401: Unauthorized
You have to allow "Change anything" privileges.
---

Martin Pitt (pitti) wrote :

Erigami, bug 397027 is a duplicate, that might be the reason. Does it work for other bugs for you?

Martin Pitt (pitti) wrote :

For me, uploading apport-collect data to bug 397027 works, so it's not a general bug with duplicate bugs or apport-collect.

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

Other bug subscribers