Bamboo fails to add a new repository with an "endless spinning wheel" animation
Platform Notice: Data Center Only - This article only applies to Atlassian apps 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 you add or save a repository in Bamboo (Plan configuration → Repositories → Add repository, or Linked/Project repositories), the save never finishes in the UI. Depending on the Bamboo version and browser:
Older versions: the page shows a spinning wheel that never stops.
Current versions (seen on 12.1): the repository form is replaced with the message "An unexpected error has occurred". The repository is often created on the server anyway, even though the UI shows an error. Refresh the Repositories page before trying again, so you don't create duplicates.
Environment
Bamboo Data Center 9.6 and later (all supported versions). Validated on Bamboo 12.1.12.
Diagnosis
1. Open the browser developer tools (F12) and try to add the repository again. 2. In the Console tab, look for an error like this:
Refused to display '<bamboo-base-url>/' in a frame because it set 'X-Frame-Options' to 'deny'.3. In the Network tab, or in a HAR file, find the POST request sent when you saved the repository. Check its response headers for: X-Frame-Options: DENY
Cause
After submitting a new repository creation, Bamboo sends a response to the browser containing an Inline Frame element (iframe). That response is being blocked or explicitly disabled by an X-Frame-Options: DENY header injected by the Reverse Proxy or Load Balancer.
That can be confirmed after generating a HAR file and checking for the response data:
In the example below, notice that the Reverse proxy duplicates some headers and also adds an X-Frame-Options: DENY on top of Bamboo's default X-Frame-Options: SAMEORIGIN
content-encoding gzip
content-language en-US
content-type text/html;charset=UTF-8
date Fri, 24 Jun 2022 08:13:17 GMT
server nginx/1.20.1
strict-transport-security max-age=31536000
vary Accept-Encoding
x-content-type-options nosniff
x-content-type-options nosniff
x-frame-options SAMEORIGIN
x-frame-options DENY
x-seraph-loginreason OK
x-xss-protection 1; mode=blockThe DENY value usually comes from:
A reverse proxy or load balancer in front of Bamboo that adds or overrides the header (for example, Apache Header always set X-Frame-Options DENY, nginx add_header X-Frame-Options DENY, or clickjacking protection on an LB/WAF).
Bamboo (10.0.2 and later), if the system property or environment variable bamboo.http.header.security.anti.clickjacking.x_frame_options is set to DENY. Please refer to BAM-20788
Solution
Starting from Bamboo 5.14, X-Frame-Options: SAMEORIGIN is enabled by default in HTTP response headers in order to provide ClickJacking protection
Work with the Infrastructure team to either remove any ClickJacking protection on your Reverse Proxy/Load Balancer. Alternatively, if the X-Frame-Options header can't be removed, forcibly set it as SAMEORIGIN for the Bamboo URL.
Option 1: Fix the reverse proxy or load balancer
Stop the proxy from sending DENY to Bamboo. Either remove the header it injects, so Bamboo's own SAMEORIGIN is used, or set it to SAMEORIGIN.
For a load balancer or WAF, turn off its clickjacking / X-Frame-Options injection for Bamboo, or change it to SAMEORIGIN. Reload the proxy afterwards.
Option 2: Check Bamboo's X-Frame-Options setting (10.0.2 and later)
Check whether bamboo.http.header.security.anti.clickjacking.x_frame_options is set: as a JVM argument, e.g. JVM_SUPPORT_RECOMMENDED_ARGS in <bamboo-install>/bin/setenv.sh (Linux) or setenv.bat (Windows) configuring-your-system-properties
If it's set to DENY, remove it (the default is SAMEORIGIN) or change it: -Dbamboo.http.header.security.anti.clickjacking.x_frame_options=SAMEORIGIN
Restart Bamboo. In a Data Center cluster, make the change on every node.
Was this helpful?