auth failure isn't handled

Bug #517155 reported by Chad Miller
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Bug Hugger
Confirmed
High
Unassigned

Bug Description

bughugger doesn't understand when LP auth fails. At "Setting Up Launchpad Credentials.", progress bar "Requesting Authorization Token From Launchpad," if Launchpad gives an HTTP error code, bughugger waits forever, with no feedback to the user that they should hit "Cancel."

Then, when one hits "Cancel", the progress window remains, and the entire program hangs and the main window of bughugger is marked as dead by the windowing system.

cmiller@hypatia:~$ bughugger
running logon dialog for bughugger
making .local directory for bughugger
/home/cmiller/.local/share/bughugger/staging/credentials
directories now exist for bughugger
no cached credentials, retrieving from Launchpad
attempting to authenticate
contacting https://staging.launchpad.net/ to get auth url for credentials:
<launchpadlib.credentials.Credentials object at 0xa7ba22c>
Exception in thread Thread-3:
Traceback (most recent call last):
  File "/usr/lib/python2.6/threading.py", line 527, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.6/dist-packages/quidgets/widgets/asynch_task_progressbox.py", line 165, in run
    data = self.run_function(self.params)
  File "/usr/lib/python2.6/dist-packages/bughugger/LaunchpadLogonDialog.py", line 206, in get_auth_task
    link = self.__get_auth_url(self.credentials, self.use_production)
  File "/usr/lib/python2.6/dist-packages/bughugger/LaunchpadLogonDialog.py", line 200, in __get_auth_url
    auth_url = credentials.get_request_token(web_root=web_root2)
  File "/usr/lib/pymodules/python2.6/launchpadlib/credentials.py", line 101, in get_request_token
    raise HTTPError(response, content)
HTTPError: HTTP Error 503: Service Unavailable
Response headers:
---
connection: close
content-length: 1294
content-type: text/html
date: Thu, 04 Feb 2010 17:11:04 GMT
expires: Thu, 04 Feb 2010 17:11:04 GMT
server: squid/2.6.STABLE18
status: 503
vary: Accept-Encoding
via: 1.0 arsenic.canonical.com:3128 (squid/2.6.STABLE18), 1.1 staging.launchpad.net
x-cache: MISS from arsenic.canonical.com
x-cache-lookup: MISS from arsenic.canonical.com:3128
x-scheme: https
x-squid-error: ERR_CANNOT_FORWARD 115
---
Response body:
---
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>ERROR: The requested URL could not be retrieved</TITLE>
<STYLE type="text/css"><!--BODY{background-color:#ffffff;font-family:verdana,sans-serif}PRE{font-family:sans-serif}--></STYLE>
</HEAD><BODY>
<H1>ERROR</H1>
<H2>The requested URL could not be retrieved</H2>
<HR noshade size="1px">
<P>
While trying to retrieve the URL:
<A HREF="http://staging.launchpad.net/+request-token">http://staging.launchpad.net/+request-token</A>
<P>
The following error was encountered:
<UL>
<LI>
<STRONG>
Unable to forward this request at this time.
</STRONG>
</UL>

<P>
This request could not be forwarded to the origin server or to any
parent caches. The most likely cause for this error is that:
<UL>
<LI>The cache administrator does not allow this cache to make
    direct connections to origin servers, and
<LI>All configured parent caches are currently unreachable.
</UL>
<P>Your cache administrator is <A HREF="mailto:webmaster">webmaster</A>.

<BR clear="all">
<HR noshade size="1px">
<ADDRESS>
Generated Thu, 04 Feb 2010 17:11:04 GMT by arsenic.canonical.com (squid/2.6.STABLE18)
</ADDRESS>
</BODY></HTML>

---

Tags: lucid
Revision history for this message
Chad Miller (cmiller) wrote :

This is "0.61" from the ppa.

Changed in bughugger:
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Rick Spencer (rick-rickspencer3) wrote :

The root cause of this problem is that Bughugger uses old fashioned untrusted launchpad app techniques. rather than fixing the Launchpad Logon dialog, we should rather snipe a proper trusted app based dialog. I believe there may be one in a software center related project or such.

Revision history for this message
Roman Schmitt (romansb) wrote :

I am having the same issue with version "10.04 (bughugger)"

romansb@lappy:~$ bughugger
running logon dialog for bughugger
making .local directory for bughugger
cache directory at /home/romansb/.cache/bughugger
/home/romansb/.local/share/bughugger/production/credentials
credentials file exists. Using it
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python2.6/threading.py", line 532, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.6/dist-packages/quickly/widgets/asynch_task_progressbox.py", line 211, in run
    data = self.run_function(self.params)
  File "/usr/lib/python2.6/dist-packages/bughugger/LaunchpadLogonDialog.py", line 78, in mkdirs_task
    cached_lp = self.get_cached_launchpad()
  File "/usr/lib/python2.6/dist-packages/bughugger/LaunchpadLogonDialog.py", line 96, in get_cached_launchpad
    return self.launchpad_from_credentials()
  File "/usr/lib/python2.6/dist-packages/bughugger/LaunchpadLogonDialog.py", line 246, in launchpad_from_credentials
    launchpad = Launchpad(self.credentials, self.web_root(), self.cache_dir)
  File "/usr/lib/pymodules/python2.6/launchpadlib/launchpad.py", line 109, in __init__
    credentials, service_root, cache, timeout, proxy_info, version)
  File "/usr/lib/pymodules/python2.6/lazr/restfulclient/resource.py", line 400, in __init__
    self._wadl = self._browser.get_wadl_application(self._root_uri)
  File "/usr/lib/pymodules/python2.6/lazr/restfulclient/_browser.py", line 293, in get_wadl_application
    url, media_type=wadl_type, extra_headers={'Accept': accept})
  File "/usr/lib/pymodules/python2.6/lazr/restfulclient/_browser.py", line 269, in _request
    raise HTTPError(response, content)
HTTPError: HTTP Error 401: Unauthorized
Response headers:
---
content-length: 37
content-type: text/plain
date: Thu, 05 Aug 2010 22:40:05 GMT
server: zope.server.http (HTTP)
status: 401
vary: Accept-Encoding
via: 1.1 wildcard.edge.launchpad.net
x-lazr-oopsid: OOPS-1678EB4603
x-powered-by: Zope (www.zope.org), Python (www.python.org)
---
Response body:
---
Expired token (VfnM9XRNDB1Tkm59wbsC).
---

papukaija (papukaija)
tags: added: lucid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.