Unrecoverable error when authorization fails
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
launchpadlib |
Triaged
|
Critical
|
Unassigned |
Bug Description
I just tried writing a very simple launchpadlib application that logs in to staging. The call to login_with failed with this error::
Traceback (most recent call last):
File "pkgme/upload.py", line 14, in get_launchpad
return Launchpad.
File "/usr/lib/
credential_
File "/usr/lib/
service_root, cache, timeout, proxy_info, version)
File "/usr/lib/
credentials, service_root, cache, timeout, proxy_info, version)
File "/usr/lib/
self._wadl = self._browser.
File "/usr/lib/
response, content = self._request(url, media_type=
File "/usr/lib/
raise error
lazr.restfulcli
Response headers:
---
-content-encoding: gzip
content-length: 44
content-type: text/plain
date: Fri, 22 Jul 2011 11:51:49 GMT
server: zope.server.http (HTTP)
status: 401
vary: Accept-Encoding
via: 1.1 wildcard.
x-powered-by: Zope (www.zope.org), Python (www.python.org)
---
Response body:
---
Unknown access token (cDBX2n5zxnfM9c
---
It took me a very, very long time to figure out that the way to "work around" this error was to:
1. Run "Password and Encryption Keys" (found in System Settings)
2. Look for the passwords called "Network password"
3. For each one:
a) Right-click and go to Properties
b) Click on the Details tab
c) Scroll right until I can see the full URL for the "user"
4. Find the one for staging.
5. Re-run the application, go through the authorization dance
Note that the error does not:
* give any reason for why I'm suddenly unauthorized
* provide any guidance on how to re-gain authorization
* mention "Network password" and only subtly mentions 'launchpadlib' or 'staging.
I only found out about "Network password" because james_w told me so.
Thus, as someone trying to write an application based on launchpadlib, I have no idea how to present such an exception to my users.
I don't know what caused the de-authorization in the first place. On #launchpad-dev, Steve Kowalik said:
<StevenK> I seem to recall something like that.
<StevenK> It usually happens when we blow up the session database.
Changed in launchpadlib: | |
status: | New → Triaged |
importance: | Undecided → Low |
Changed in launchpadlib: | |
importance: | Low → Critical |
On Mon, Jul 25, 2011 at 12:51 PM, Данило Шеган
<email address hidden> wrote:
> ** Changed in: launchpadlib
> Status: New => Triaged
>
> ** Changed in: launchpadlib
> Importance: Undecided => Low
When did Launchpad decide that cryptic crasher bugs were low priority?
jml