Could not contact Stash server. This repository might not function properly.
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
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
Problem
Unable to create or save existing Bitbucket Server (PKA Stash) repositories in Bamboo with the following error message:
Failed to parse response: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON in line 1 column 12
From the UI, the following is observed:
Diagnosis
Environment
- Bitbucket Server (PKA Stash) is running behind a reverse proxy server (e.g. Apache, NGinx, etc).
Diagnostic Steps
- Unable to reproduce the problem after creating an unproxied application link.
Cause
Proxies - both outbound and reverse - incorrectly routing traffic. This is happening because the reverse proxy sitting in front of Bitbucket Server (PKA Stash) is re-writing the URL and presenting Bamboo with some other content. The same problem happens if an application link is re-created and goes through the reverse proxy server. When an Application Link is attempted to be created inside an Atlassian application, it attempts to connect to the target application's manifest. This manifest contains some important information such as the id, name, type, version, application link version and authentication types of the target application. If that information cannot be retrieved the application link will not be successfully created.
Resolution
Check the reverse proxy configuration rules in Bitbucket Server (PKA Stash) and ensure requests coming from the Bamboo Server are not getting re-written.