Problem

Some clients have report difficulties with Xray macros, and sometimes even Jira filter macro with Xray information.

Confluence throws the following error: "Error retrieving chart data from server".

Investigating the cause

This error is mostly due to an internal Gateway Timeout while retrieving the info from Jira. To verify this situation, you'll need to analyze the HAR file for this request.

Follow the next steps:
  1. Please open the developer tools (in Chrome press F12) and open the browser Network (fourth tab) and try to load the gadget.
  2. Then try to find an entry similar to the one listed below. This will change according to the gadget used; however, a tip is to search for the error "504".
     < don't be evil' >{
    "http://localhost:8080/rest/raven/1.0/chart/requirement/historical?groupingField=status&flattenRequirements=true&numberDays=30&execScope=version&version=4.2.2000&savedFilter=12614&testEnvironment=-1":{
    "rc":504,"headers":{
    }


When a request is made to the gadget, a 504 error is returned indicated that a Gateway timeout happens. 


You can also confirm if the request took more than 5 seconds. If yes, and since Confluence has a default timeout of 5 seconds, such a request causes a timeout error.


This is an issue already known by Atlassian that you can see here: CONFSERVER-51594. The default timeout for gadgets in Jira is 60 seconds. Since Jira and Confluence have such different timeout values, it's possible to have a gadget that loads correctly in the Jira dashboard but fails to load on a Confluence page.

Workaround

We recommend increasing the Confluence hardcoded value to the Jira gadget timeout. Please see more info and how to do it here: Jira Gadget Timeout.


https://jira.atlassian.com/browse/CONFSERVER-51594?error=login_required&error_description=Login+required&state=798148bc-83b0-40a8-b30e-03b03f6be271

https://confluence.atlassian.com/jirakb/jira-gadget-timeout-value-966033530.html

Integration with Confluence