Internal Server Error when using Reporting

Hi,

When we attempt to export a CSV via the discory window we recieve a “There was an error generating this report.” in the logs we see:

{“type”:“log”,“@timestamp”:“2021-04-22T13:54:04Z”,“tags”:[“error”,“plugins”,“opendistroReportsKibana”],“pid”:6843,“message”:“Failed to generate report: TypeError: Cannot read property ‘settings’ of undefined”}
{“type”:“log”,“@timestamp”:“2021-04-22T13:54:04Z”,“tags”:[“error”,“plugins”,“opendistroReportsKibana”],“pid”:6843,“message”:“TypeError: Cannot read property ‘settings’ of undefined\n at getMaxResultSize (/usr/share/kibana/plugins/opendistroReportsKibana/server/routes/utils/savedSearchReportHelper.ts:163:35)\n at process._tickCallback (internal/process/next_tick.js:68:7)”}
{“type”:“error”,“@timestamp”:“2021-04-22T13:54:04Z”,“tags”:,“pid”:6843,“level”:“error”,“error”:{“message”:“Internal Server Error”,“name”:“Error”,“stack”:“Error: Internal Server Error\n at HapiResponseAdapter.toError (/usr/share/kibana/src/core/server/http/router/response_adapter.js:132:19)\n at HapiResponseAdapter.toHapiResponse (/usr/share/kibana/src/core/server/http/router/response_adapter.js:86:19)\n at HapiResponseAdapter.handle (/usr/share/kibana/src/core/server/http/router/response_adapter.js:81:17)\n at Router.handle (/usr/share/kibana/src/core/server/http/router/router.js:164:34)\n at process._tickCallback (internal/process/next_tick.js:68:7)”},“url”:{“protocol”:null,“slashes”:null,“auth”:null,“host”:null,“port”:null,“hostname”:null,“hash”:null,“search”:“?timezone=Europe/London”,“query”:{“timezone”:“Europe/London”},“pathname”:“/api/reporting/generateReport”,“path”:“/api/reporting/generateReport?timezone=Europe/London”,“href”:“/api/reporting/generateReport?timezone=Europe/London”},“message”:“Internal Server Error”}

Versions below:

opendistro-index-management-1.12.0.1-1.noarch
opendistro-alerting-1.12.0.2-1.noarch
opendistro-reports-scheduler-1.12.0.0-1.noarch
opendistroforelasticsearch-1.12.0-1.noarch
opendistro-anomaly-detection-1.12.0.0-1.noarch
opendistro-security-1.12.0.0-0.noarch
opendistro-knn-1.12.0.0-1.noarch
opendistro-job-scheduler-1.12.0.0-1.noarch
opendistro-knnlib-1.12.0.0-1.x86_64
opendistro-sql-1.12.0.0-1.noarch
opendistroforelasticsearch-kibana-1.12.0-1.x86_64```

i believe this is the issue from your logs, how did you install the plugin and edit settings? can you also test on docker to confirm