5058: Reviewboard 7.0.4 not working with BitBucket API tokens

johan-rossouw

We are running ReviewBoard 7.0.4 as a docker image. We are trying to add a new BitBucket git repository. Reviewboard is asking for a BitBucket app password, but this has been deprecated in BitBucket. You are not forced to use API tokens.

I have created an API token with the following permissions:
read:account
read:issue:bitbucket
read:me
read:package:bitbucket
read:permission:bitbucket
read:pipeline:bitbucket
read:project:bitbucket
read:pullrequest:bitbucket
read:repository:bitbucket
read:user:bitbucket
read:webhook:bitbucket
read:wiki:bitbucket
read:workspace:bitbucket

The BitBucket account is a team account. I provided the team name, repository name, my own personal username (not email address) and this newly created API token, but then when clicking on Save I get the error:

Something broke! (Error 500)
It appears something broke when you tried to go to here. This is either a bug in Review Board or a server configuration error. Please report this to your administrator.

I have attached the reviewboard.log file

2025-11-24 21:40:21,375 - ERROR - None - johanr - /admin/db/scmtools/repository/add/ - django.request - Internal Server Error: /admin/db/scmtools/repository/add/
Traceback (most recent call last):
  File "/venv/lib/python3.11/site-packages/django/core/handlers/exception.py", line 55, in inner
    response = get_response(request)
               ^^^^^^^^^^^^^^^^^^^^^
  File "/venv/lib/python3.11/site-packages/django/core/handlers/base.py", line 197, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/venv/lib/python3.11/site-packages/django/contrib/admin/options.py", line 688, in wrapper
    return self.admin_site.admin_view(view)(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/venv/lib/python3.11/site-packages/django/utils/decorators.py", line 134, in _wrapper_view
    response = view_func(request, *args, **kwargs)