1718: DoesNotExist: Profile matching query does not exist.

Jan.Ko*******@gmai***** (Google Code) (Is this you? Claim this profile.)
Sept. 7, 2010
What version are you running?
Review Board RC1

What's the URL of the page containing the problem?

What steps will reproduce the problem?
1. Try to log in using LDAP authentication

What is the expected output? What do you see instead?
There is some error (user which have the problem can't remember what was happen exactly).

What operating system are you using? What browser?

Please provide any additional information below.
I use LDAP authentication model. LDAP server is Active Directory indeed.
Traceback (most recent call last):
  File "/user/rboard/system/lib/python2.6/site-packages/Django-1.1.1-py2.6.egg/django/core/handlers/base.py", line 92, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/user/rboard/reviewboard/production/reviewboard/accounts/decorators.py", line 25, in _check
    return login_required(view_func)(*args, **kwargs)
  File "/user/rboard/system/lib/python2.6/site-packages/Djblets-0.6.3-py2.6.egg/djblets/auth/util.py", line 46, in _checklogin
    return view_func(request, *args, **kwargs)
  File "/user/rboard/reviewboard/production/reviewboard/reviews/views.py", line 119, in review_detail
  File "/user/rboard/system/lib/python2.6/site-packages/Django-1.1.1-py2.6.egg/django/contrib/auth/models.py", line 285, in get_profile
    self._profile_cache = model._default_manager.get(user__id__exact=self.id)
  File "/user/rboard/system/lib/py
#1 Jan.Ko*******@gmai***** (Google Code) (Is this you? Claim this profile.)
  # You must be logged out
  # Your user can't be known by Review Board
  * Set Review Board to LDAP authentication
  * Go to http://reviewboard/r/<NUMBER> (i.e. http://reviews.reviewboard.org/r/1 )
  * In authentication form enter username and password BUT USER which NEVER log into ReviewBoard before.
  * Login - You will get error in backtrace
#2 hadr****@gmai***** (Google Code) (Is this you? Claim this profile.)
We had the same error, but when user was trying to create new codereview request, upon clicking upload for diff it was presented with 500 error page and logs were saying "DoesNotExist".

It occured, that upon first login (we also use LDAP) user was migrated from LDAP (created user in RB), but his profile in RB was not created. It only happened after he clicked "my account" link and saved preferences.

After that everything works as expected.

Shouldn't the profile be created automatically upon first login regardless of saving preferences ?
#3 Jan.Ko*******@gmai***** (Google Code) (Is this you? Claim this profile.)
Here is a patch: http://reviews.reviewboard.org/r/1717/
#4 chipx86
  • +Confirmed
  • -Priority-Medium
  • +chipx86
#5 chipx86
Fixed on master (37538ed)
  • -Confirmed
#6 chipx86
Actually, this fix breaks anonymous usage, so I'm backing it out.
  • -Fixed
#7 chipx86
Alright, made some changes that should solve this and the new problem. Fixed on master (adf6a5e).
  • -Confirmed