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

Bug #647143 reported by Alan Bell
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical SSO provider
Won't Fix
Low
Unassigned
Ubuntu One Servers
Won't Fix
High
Alejandro J. Cura
Ubuntu Single Sign On Client
Invalid
High
Natalia Bidart

Bug Description

fully updated Maverick computer failing to authenticate against U1 for the first time. oauth-login.log attached showing error 500

Revision history for this message
Alan Bell (alanbell) wrote :
Revision history for this message
Natalia Bidart (nataliabidart) wrote :

Grepping thru edge logs, I've found:

ERROR:root:WSGI Handled Exception (OOPSID 1728appserverZCJCccDIefAfGEHAcJaDeEEcfdGDGEDbH152623)
Traceback (most recent call last):
  File "/srv/edge.ubuntuone.com/edge/ubunet-rev-3228/utilities/../lib/django/core/handlers/base.py",
 line 86, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/srv/edge.ubuntuone.com/edge/ubunet-rev-3228/utilities/../lib/ubuntuone/web/oauth/views.py", line 298, in pull_data_from_sso
    request_oauth_token = get_token_from_request(request)
  File "/srv/edge.ubuntuone.com/edge/ubunet-rev-3228/utilities/../lib/ubuntuone/oauth/utilities.py", line 25, in get_token_from_request
    raise oauth.OAuthError("No OAuth request.")
OAuthError
INFO:pastelogger:193.151.59.60 - - [24/Sep/2010:19:49:47 +0000] "GET /oauth/sso-finished-so-get-tokens/alan.bell%40theopenlearningcentre.com HTTP/1.1" 500 - "-" "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.11pre) Gecko/20100923 Ubuntu/10.10 (maverick) Namoroka/3.6.11pre"

Changed in ubuntu-sso-client:
status: New → Confirmed
assignee: nobody → Naty Bidart (nataliabidart)
importance: Undecided → High
Revision history for this message
Roman Yepishev (rye) wrote :

I believe this is not actually Alan's part of the log, I tried accessing the URL directly and got that OOPS id. So client is ok, that's the server side which failed and this will be filed as a separate bug.

Revision history for this message
Roman Yepishev (rye) wrote :

Here's the real traceback:

    Traceback (most recent call last):
  Module /srv/ubuntuone.com/production/ubunet-rev-3215/utilities/../lib/ubuntuone/web/oauth/views.py, line 242, in <genexpr>
    return any(token_name.startswith(s) for s in U1_TOKEN_HEADERS)
AttributeError: ' 'NoneType' object has no attribute 'startswith''

Changed in ubuntu-sso-client:
status: Confirmed → Invalid
summary: - request not signed with token
+ AttributeError: ' 'NoneType' object has no attribute 'startswith''
Changed in ubuntuone-servers:
importance: Undecided → High
assignee: nobody → Alejandro J. Cura (alecu)
status: New → In Progress
Revision history for this message
Roman Yepishev (rye) wrote :

OpenID for the user experiencing this issue is https://login.launchpad.net/+id/xCymMhD

It looks like Ubuntu SSO provides a token for this user even when all tokens are already cleared from his https://login.ubuntu.com/+applications page

P.S. No need for a separate bug report since the issue found later is the reason of INTERNAL SERVER ERROR logged to oauth-login.log

Changed in ubuntuone-servers:
status: In Progress → Fix Committed
Revision history for this message
Alejandro J. Cura (alecu) wrote :

Workaround for this bug is on the edge server right now.

Revision history for this message
Alan Bell (alanbell) wrote :

seems to have worked fine on the edge server, authentication happened and content is arriving \o/

Revision history for this message
Alejandro J. Cura (alecu) wrote :

Great! This workaround will surely be deployed on Tuesday to the production servers.

Canonical SSO Provider folk may still want to check why list_tokens returned a token with None as the token["name"], and that didn't show up on the list of tokens on the web (even after removing all other tokens).

Thanks all for the help solving this issue!

Changed in ubuntuone-servers:
status: Fix Committed → Fix Released
Changed in canonical-identity-provider:
importance: Undecided → Low
status: New → Triaged
Changed in ubuntuone-servers:
status: Fix Released → Won't Fix
Changed in canonical-identity-provider:
status: Triaged → Won't Fix
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.