Closed Bug 642903 Opened 13 years ago Closed 13 years ago

Yahoo profiles don't always contain the data we need.

Categories

(Cloud Services :: Server: Share, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: clarkbw, Unassigned)

Details

== copied from https://github.com/mozilla/f1/issues/91 ==

I just created a test yahoo account and attempted to authorize it.  F1 responds with:

Traceback (most recent call last):
  File "O:\src\mm\f1\work\linkdrop\controllers\account.py", line 119, in verify
    user = auth.verify()
  File "O:\src\mm\f1\work\linkdrop\lib\oauth\openidconsumer.py", line 354, in verify
    return self._get_credentials(result_data)
  File "O:\src\mm\f1\work\linkdrop\lib\oauth\yahoo_.py", line 101, in _get_credentials
    username = profile['preferredUsername']
KeyError: 'preferredUsername'

I hacked the code to dump the profile and it was:


{'identifier': u'https://me.yahoo.com/a/xxx..#25f15',
 'name': {'formatted': None},
 'providerName': 'Yahoo',
 'verifiedEmail': u'xxx@yahoo.com.au'}


The profile seems strange as I did enter a name when creating the profile - maybe the error is due to the account being so new - I'll let you know if it ever changes.

While we can probably handle this case given we don't actually use the 'preferredUsername' field, note that the profile also lacks the 'xoauth_yahoo_guid' item - which we *do* use for fetching contacts.  Dealing with this latter field missing is the reason I didn't just fix the error relating to preferredUsername (actually, I did fix it, then hit a KeyError for the latter field :)

---

OK - so I went to the "profile" page in yahoo and noticed it saying "activated his profile" 30 seconds ago (which was long after I created the account). After that it worked correctly - so it seems this error is related to the profile not being "activated"
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.