Unable to access Insight Reports page with error "Failed to fetch report list"

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

Summary

When attempting to access to Insight reports via Insight > Reports at <Jira_base_URL>/secure/InsightReportManager.jspa, existing reports do not load with "Failed to fetch report list"

Environment

This issue was reported on Insight 8.4.2 and 8.6.12

Diagnosis

In the <Jira_home>/log/atlassian-jira.log, the error below can be seen.

2021-04-21 14:41:34,190+0300 http-nio-8080-exec-11 ERROR admin 881x146107x1 g86goq 192.168.56.101,192.168.56.24 /rest/insight-widgets/1/widgets [i.r.core.rest.ExceptionErrorMapper] Oops
java.lang.IllegalArgumentException: Empty expression!
        at com.cronutils.parser.CronParser.parse(CronParser.java:93)
        at io.riada.jira.plugins.insight.widget.model.Cron$Companion.from(Cron.kt:38)
        at io.riada.jira.plugins.insight.widget.repository.WidgetRepositoryAOImpl.toCronExpression(WidgetRepositoryAOImpl.kt:1042)
        at io.riada.jira.plugins.insight.widget.repository.WidgetRepositoryAOImpl.toModel(WidgetRepositoryAOImpl.kt:1001)
        at io.riada.jira.plugins.insight.widget.repository.WidgetRepositoryAOImpl.search(WidgetRepositoryAOImpl.kt:618)
        at io.riada.jira.plugins.insight.widget.repository.WidgetRepositoryAOImpl.search(WidgetRepositoryAOImpl.kt:316)
        at io.riada.jira.plugins.insight.widget.service.WidgetServiceImpl.search(WidgetServiceImpl.kt:66)
        at io.riada.jira.plugins.insight.widget.rest.WidgetResource.widgets(WidgetResource.kt:122)
...

We can check the settings of the existing reports from the database table "AO_8542F1_IFJ_WIDGET" or by loading the Reports page with the browser developer tools > Network tab opened, and inspect the responses returned for each report.

Generally, it's easier to inspect the settings from the database by using the example SQL query below. It returns all reports with its ID, name, sync period and the cron expression if any.

For PostgreSQL
select "ID", "NAME", "SYNC_PERIOD", "SYNC_PERIOD_CRON" from "AO_8542F1_IFJ_WIDGET"

Cause

Invalid report configuration. For example, there is a report with the sync period set to "Advanced", which a valid cron expression is mandatory. However, it's empty. The cause to this is unknown.

Solution

As it's not possible to update the sync configuration from the UI, we can update it via database. For sync period which is just once, no cron expression is needed.

The example SQL query below update the report of ID 2 to set its sync period to Once and empty cron expression. 

Always back up your data before performing any modifications to the database. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.

For PostgreSQL
UPDATE "AO_8542F1_IFJ_WIDGET" SET "SYNC_PERIOD"  = 'ONCE', "SYNC_PERIOD_CRON" = NULL WHERE "ID" = '2';

Once the update is successfully made in the database, you can try to access the Insight Reports page and change the configurations again accordingly.

(info) If the issue persists, Jira needs to be restarted for the changes to take effect.






Last modified on Nov 3, 2021

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.