opendistro-for-elasticsearch / kibana-reports

Kibana Reports
https://opendistro.github.io/
39 stars 31 forks source link

PDF report download does not work #375

Closed rohitsawant02 closed 3 years ago

rohitsawant02 commented 3 years ago

Hello,

When I tried to download in image format it works. but when I tried to download same report in pdf format it gives me following error and pdf report never get generated. Error: [10:52:19.086] [error][opendistroReportsKibana][plugins] Failed to generate report by id: Error: Protocol error (Page.printToPDF): Printing is not enabled log [10:52:19.087] [error][opendistroReportsKibana][plugins] { Error: Protocol error (Page.printToPDF): Printing is not enabled at Promise (E:\Softwares\dev\ELK\kibana-7.10.2\plugins\elasticsearch_reporting\node_modules\puppeteer-core\lib\Connection.js:183:56) at new Promise () at CDPSession.send (E:\Softwares\dev\ELK\kibana-7.10.2\plugins\elasticsearch_reporting\node_modules\puppeteer-core\lib\Connection.js:182:12) at Page.pdf (E:\Softwares\dev\ELK\kibana-7.10.2\plugins\elasticsearch_reporting\node_modules\puppeteer-core\lib\Page.js:977:39) at Page.pdf (E:\Softwares\dev\ELK\kibana-7.10.2\plugins\elasticsearch_reporting\node_modules\puppeteer-core\lib\helper.js:112:23) at createVisualReport (E:\Softwares\dev\ELK\kibana-7.10.2\plugins\elasticsearch_reporting\server\routes\utils\visual_report\visualReportHelper.ts:205:25) at process._tickCallback (internal/process/next_tick.js:68:7) message: 'Protocol error (Page.printToPDF): Printing is not enabled' } error [10:51:16.228] Error: Internal Server Error at HapiResponseAdapter.toError (E:\Softwares\dev\ELK\kibana-7.10.2\src\core\server\http\router\response_adapter.js:132:19) at HapiResponseAdapter.toHapiResponse (E:\Softwares\dev\ELK\kibana-7.10.2\src\core\server\http\router\response_adapter.js:86:19) at HapiResponseAdapter.handle (E:\Softwares\dev\ELK\kibana-7.10.2\src\core\server\http\router\response_adapter.js:81:17) at Router.handle (E:\Softwares\dev\ELK\kibana-7.10.2\src\core\server\http\router\router.js:164:34) at process._tickCallback (internal/process/next_tick.js:68:7)

zhongnansu commented 3 years ago

@rohitsawant02 Hi, could you provide some info about how did you install reporting, or are you running from the source code? Also what OS are you running reporting? Note to mention that for different OS we require different Chromium to be installed seperately if you are running reporting from source code. Those are available here. Unzip under your kibana-reports dir, it will create a .chromium dir

├── kibana
│   └──plugins
│      └── kibana-reports
|         └── .chromium

ref: https://github.com/puppeteer/puppeteer/issues/2735 https://github.com/opendistro-for-elasticsearch/kibana-reports/blob/dev/kibana-reports/rendering-engine/headless-chrome/build_headless_chrome.sh

zhongnansu commented 3 years ago

I highly recommand you checkout our latest repo in OpenSearch. This Open Distro project will not have major release in the future, we have migrated to OpenSearch and are slowly deprecating OpenDistro.