AttributeError: 'NoneType' object has no attribute 'accounts'

Bug #1284008 reported by Michael Nelson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Software Center Agent
Confirmed
Undecided
Unassigned

Bug Description

We saw a bunch of oopses in production [1] which, afaict, are were caused because SSO was erroring at the time.

That is, the sca oops is a result of n API call to /api/2.0/subscriptions/?complete_only=True (possibly from USC's install previous purchases option) by a uses who is authenticated in SSO, but does not yet have a related user object in software-center-agent. In that case, sca uses SSO's v1 user API to authenticate as the user and get the details needed to create the user, but it's failing to create an SSO api service root. Checking our logs, the attempt to create the SSO api resulted in an OOPS on sso [2].

That SSO oops has a high count (42k in the past week), but the last one was over 24hrs ago. I've not verified if it was an SSO issue that is now fixed permanently.

Either way, perhaps as a wish-list, it'd be great if SCA didn't oops in this case, but gave a sensible error/log.

[1] https://oops.canonical.com/oops/?oopsid=OOPS-00d48b2bc5754c3d96d46198565a7d79 , for posterity: https://pastebin.canonical.com/105423/
[2] https://pastebin.canonical.com/105424/

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.