If a repository's branch is associated with a single pull request (regardless of the PR's status), and that pull request has a multi-byte character in its description (such as an emoji) - it's possible that there will be an error when retrieving the pull-request metadata for the branch.
This then causes any view of the 'branches' section of a repository that has this branch to then throw an error and not load.
- Add a commit to a branch, then create a pull request for this branch to be merged into a different branch
- In the pull request description, include a variety of content, including multi-byte characters such as emojis (ex: 🤔)
- Ensure the branch only has a single PR associated with it
- The bug cannot be reproduced if this branch has more than one PR logged against it
- Depending on the combination of characters used in the description, the issue may be inconsistent to reproduce, as the issue triggers when the library processing the description ends a 2k byte chunk on one of these multi-byte characters.
The branches page loads without issue, regardless of the content in any related pull request description.
The branch page fails to load when the branch associated with that PR is contained within the results:
The below exception is thrown in the atlassian-bitbucket.log file:
- Find the offending PR, and edit the description to remove any multi-byte characters. Then, save your change to the PR and reload the branches page.
- Create a second PR for the affected branch, as the issue will only occur when a branch as a single PR associated with it. This second PR can then be either merged or declined, but cannot be deleted.
The root cause is related to the following bug in the third-party jackson library: