Creating PDF report via watcher - 404 error

I'm trying to create and send a pdf report from the dashboard via watcher.

The dashboard contains two simple visuals and the generation of the report directly in the dashboard works fine.

Now after coping the url and setting up a watcher, I do get an Email with the report attached, but the attachment contains only the 404 error:

image

In the report log, I found the following description of the problem:

          "output" : {
            "content_type" : "application/pdf",
            "size" : 50859,
            "warnings" : [
              """An error occurred when trying to open the Kibana URL. You may need to increase 'xpack.reporting.capture.timeouts.openUrl'. TimeoutError: waiting for selector ".application" failed: timeout 60000ms exceeded"""
            ]

After some research I found the issue, that exactly described my problem (except one point: my dashboard is on the default space):
https://github.com/elastic/kibana/issues/72475

I'm on 7.9.3 and not sure, if this version has already the bugfix for the issue above included.

Which version contains this bugfix?
Is there is something else, that should be checked to solve this problem?

Hey there!

So, that fix should have been in 7.9 and that bug was pretty specific to spaces due to how URLs were being built.

In the report log where you pulled that error, are you also able to pull out the URL that it's trying to hit when it gets the error?

Hi @poff,

here is the URL from the report log:

            "objects" : [
              {
                "relativeUrl" : "/app/dashboards#/view/255f2f80-bfab-11eb-993a-a97d8f91f21f?_g=(filters:!(),refreshInterval:(pause:!f,value:10000),time:(from:now-7d,to:now))&_a=(description:'',filters:!(),fullScreenMode:!f,options:(hidePanelTitles:!f,useMargins:!t),query:(language:kuery,query:''),timeRestore:!f,title:'ApiLogs',viewMode:view)"
              }
            ],

and here is the URL in the watcher, which I copied from the dashboard:

            "reporting": {
              "url": "https://XXXXX.com/api/reporting/generate/printablePdf?jobParams=%28browserTimezone%3AEurope%2FBerlin%2Clayout%3A%28dimensions%3A%28height%3A848%2Cwidth%3A1903%29%2Cid%3Apreserve_layout%29%2CobjectType%3Adashboard%2CrelativeUrls%3A%21%28%27%2Fapp%2Fdashboards%23%2Fview%2F255f2f80-bfab-11eb-993a-a97d8f91f21f%3F_g%3D%28filters%3A%21%21%28%29%2CrefreshInterval%3A%28pause%3A%21%21f%2Cvalue%3A10000%29%2Ctime%3A%28from%3Anow-7d%2Cto%3Anow%29%29%26_a%3D%28description%3A%21%27%21%27%2Cfilters%3A%21%21%28%29%2CfullScreenMode%3A%21%21f%2Coptions%3A%28hidePanelTitles%3A%21%21f%2CuseMargins%3A%21%21t%29%2Cquery%3A%28language%3Akuery%2Cquery%3A%21%27%21%27%29%2CtimeRestore%3A%21%21f%2Ctitle%3A%21%27oData%2520Audit%21%27%2CviewMode%3Aview%29%27%29%2Ctitle%3A%27ApiLogs%27%29",
              "retries": 40,
              "interval": "15s",

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.