"An error occurred" is displayed when viewing specific files in a Pull Request in Bitbucket Server.

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

When viewing some files in a Pull Request in Bitbucket Server or Data Center an error is displayed saying something went wrong. Clicking the Reload the page button does not solve the issue.

(Auto-migrated image: description temporarily unavailable)

Environment

  • Any version of Bitbucket Server or Data Center

  • A reverse proxy or load balancer is deployed in front of Bitbucket Server or Data Center

Diagnosis

The error happens in different browsers and affects multiple users. Other files in the Pull Request may be accessible, while accessing others may result in a 403 Forbidden  error being returned such as the one below:

(Auto-migrated image: description temporarily unavailable)

Inspecting the source code of the 403 Forbidden error page may show something similar to this:

1 2 3 4 5 6 7 8 <html> <head><title>403 Forbidden</title></head> <body> <center><h1>403 Forbidden</h1></center> </body> </html> <!-- a padding to disable MSIE and Chrome friendly error page --> <!-- a padding to disable MSIE and Chrome friendly error page -->

There are no entries in the <BitbucketHome>/log/atlassian-bitbucket-access.log  file that would show attempts to access the page.

Cause

The reverse proxy or load balancer itself is not allowing access to the URL, potentially due to security restrictions configured in it.

These restrictions may prevent access to URLs that contain certain keywords, file extensions, special characters or patterns.

Solution

Review the log files of the reverse proxy or load balancer to identify why the request to the specific URL was denied by it, and then adjust the configuration accordingly to allow access to the URL(s) in question.

Updated on February 27, 2025

Still need help?

The Atlassian Community is here for you.