Comment 10 for bug 657109

Revision history for this message
Michael Nelson (michael.nelson) wrote : Re: "Wallpaper to help testing software-center purchase" error

The 'Unauthorized' message is being caused when the privileged 'software-center-agent' Launchpad user that we use on the server tries to call getArchiveSubscriptionURL() via the Launchpad API. It is being rejected as unauthorized by the Launchpad API, even though the same authentication has just been used to create the subscription: (from softwarecenteragent/utilities.py)

{{{
            # This can raise HTTPError 400 - ArchiveNotPrivate,
            # AlreadySubscribed,
            subscription = p3a.newSubscription(subscriber=subscriber)

            # This can rais HTTPError 401 if not logged in as sca.
            token = subscriber.getArchiveSubscriptionURL(archive=p3a)
}}}

Details of the irc discussion are at:
https://pastebin.canonical.com/39101/

This was also discussed during a weekly call, and flacoste said that he's seen this before with the LP API, and that we could try the call multiple times (although from the above irc conversation, Anthony mentioned that the logs show this error over a period of time).