Closed dminovski0 closed 3 years ago
Could be a duplicate of https://github.com/elastic/kibana/issues/85864 which was opened and fixed for 7.11
However, https://github.com/elastic/kibana/pull/85066 should not have been backported to 7.10, so I'm not sure how the issue would be present in 7.10
@tsullivan Thanks for the reply. We are using a cluster on the cloud, and the latest version we can upgrade to is 7.10.2. There isn't an option for 7.11.
Understood thanks.
I was not able to repro on a Linux server. I'll try Windows next.
Pinging @elastic/kibana-app-services (Team:AppServices)
Pinging @elastic/kibana-reporting-services (Team:Reporting Services)
The user with thsi https://github.com/elastic/sdh-kibana/issues/1316 would thi to be fixed ASAP is there any ETA for fix?
we need to build a new version of chromium, @tsullivan is working on it. @tsullivan do you think this is gonna make 7.13?
@tsullivan do you think this is gonna make 7.13?
It's planned for 7.14
The new build will allow us to stop increasing the browser viewport size before capture, which causes rendering artifacts because the embeddables are forced to re-render (they have resize handlers). That is one cause of failures with large dashboards.
Another cause is that Chromium limits the size of a screenshot capture to 16384 pixels. Earlier code in Kibana (before we had Puppeteer) did have a solution for this: https://github.com/elastic/kibana/pull/21788/files#diff-9744794bc3db91c2ab0e7eecbbf1664cde77fa26e10b95ff981b6b2dc8f2f893L94. That code was removed - maybe there was a misunderstanding in thinking that Puppeteer provided that.
The two things that need to happen for this:
screenshotStitcher
code from 6.4This will be fixed along with https://github.com/elastic/kibana/issues/90496
@tsullivan Using Kibana 7.17.0, the medium-sized dashboards are getting their visualizations cut and partially grayed out again. Is this https://github.com/elastic/kibana/issues/90496 Puppeteer upgrade applied to 7.17.0, or only to 8.0?
@dminovski0 sorry about this, but there is a newer issue (7.16+
) regarding images in a PDF or PNG of a dashboard appearing stretched or blank. Can you check if your customer is facing this issue: https://github.com/elastic/sdh-kibana/issues/2510#
@tsullivan The link leads to Page not found. Yes, some of the visualizations appear blank:
@dminovski0
The link leads to Page not found
That's strange. Did maybe you try to access it in a non-logged-in browser?
Based on your screenshot it sounds like this is the same issue. I paste the same advice as stated in that issue:
@tsullivan I'm logged in.
I tried with 32GB RAM and Kibana 7.17.0 on Windows 10 Pro connected to the cloud cluster, and there are blank visualizations. But the location of the visualizations that get blank is different. With Windows Kibana, the blankness is in the top right half of the dashboard.
With Windows, setting the --max-old-space-size=32768 in node.options
doesn't seem to increase the RAM in the app status page on the route http://localhost:5601/app/status. Adding this parameter to /bin/kibana.bat then shows the RAM as increased.
With Ubuntu Kibana and 4 GB RAM, the blankness appears in the bottom left half.
I tried this with Kibana 8.1.1 hosted locally on Windows. The reporting job fails when printing a PDF or PNG with an error message Error: Max attempts (3) reached for job l14sirv90d8008096af87pf0. Failed with: Error: Protocol error (Page.captureScreenshot): Unable to capture screenshot
.
The dashboard has Height in pixels 30668 px, Width in pixels 1904 px, and about 200 visualizations.
Printing an "Optimize for printing" PDF, it prints with a warning only the first two visualizations on a single PDF page, and there is only that page.
The RAM is set to 32 GB with --max-old-space-size=32768.
.
The RAM is set to 32 GB with --max-old-space-size=32768.
@dminovski0 The system RAM is 32 GB? 32768 megabytes is 32 GB. If you have Node reserve all of the system's RAM, there won't be enough free RAM for the spawned Chromium process that needs to open the Kibana tab on the server.
@tsullivan I tried setting the RAM to --max-old-space-size=4096
, and 8192 and 16384, in kibana.bat
, and nothing in node.options
. This is Elastic and Kibana 8.1.1. The same message gets returned: Failed with: Error: Protocol error (Page.captureScreenshot): Unable to capture screenshot
on Chrome and Firefox.
[2022-03-31T22:30:23.742+02:00][INFO ][plugins.screenshotting.screenshot] handled 150 page requests [2022-03-31T22:30:38.687+02:00][INFO ][plugins.screenshotting.screenshot] timeRange: Mar 31, 1962 @ 22:30:24.835 to Mar 31, 2022 @ 22:30:24.835 [2022-03-31T22:30:38.689+02:00][INFO ][plugins.screenshotting.screenshot] taking screenshots [2022-03-31T22:30:43.749+02:00][ERROR][plugins.reporting.runTask.printablePdfV2.printable_pdf_v2.execute-job.l1fgb8db04rk08096aaap4jc] Error: Protocol error (Page.captureScreenshot): Unable to capture screenshot at D:\ELK\kibana-8.1.1-windows-x86_64\kibana-8.1.1\node_modules\puppeteer\lib\cjs\puppeteer\common\Connection.js:217:63 at new Promise (
) at CDPSession.send (D:\ELK\kibana-8.1.1-windows-x86_64\kibana-8.1.1\node_modules\puppeteer\lib\cjs\puppeteer\common\Connection.js:216:16) at Page._screenshotTask (D:\ELK\kibana-8.1.1-windows-x86_64\kibana-8.1.1\node_modules\puppeteer\lib\cjs\puppeteer\common\Page.js:1958:43) at runMicrotasks ( ) at processTicksAndRejections (node:internal/process/task_queues:96:5) [2022-03-31T22:30:43.754+02:00][ERROR][plugins.reporting.runTask] Error: Protocol error (Page.captureScreenshot): Unable to capture screenshot at D:\ELK\kibana-8.1.1-windows-x86_64\kibana-8.1.1\node_modules\puppeteer\lib\cjs\puppeteer\common\Connection.js:217:63 at new Promise ( ) at CDPSession.send (D:\ELK\kibana-8.1.1-windows-x86_64\kibana-8.1.1\node_modules\puppeteer\lib\cjs\puppeteer\common\Connection.js:216:16) at Page._screenshotTask (D:\ELK\kibana-8.1.1-windows-x86_64\kibana-8.1.1\node_modules\puppeteer\lib\cjs\puppeteer\common\Page.js:1958:43) at runMicrotasks ( ) at processTicksAndRejections (node:internal/process/task_queues:96:5) [2022-03-31T22:30:43.761+02:00][INFO ][plugins.reporting.runTask] Rescheduling task:l1fgb8db04rk08096aaap4jc to retry after error. [2022-03-31T22:30:45.180+02:00][INFO ][plugins.reporting.runTask.printablePdfV2.printable_pdf_v2.execute-job.l1fgb8db04rk08096aaap4jc] Generating request for space: hmm4 [2022-03-31T22:30:45.180+02:00][INFO ][plugins.reporting.runTask.printablePdfV2.printable_pdf_v2.execute-job.l1fgb8db04rk08096aaap4jc] Request uses Space ID: hmm4 [2022-03-31T22:30:45.181+02:00][INFO ][plugins.reporting.runTask.printablePdfV2.printable_pdf_v2.execute-job.l1fgb8db04rk08096aaap4jc] Creating UI Settings Client for space: hmm4 [2022-03-31T22:30:45.188+02:00][INFO ][plugins.screenshotting.screenshot.browser-driver] Creating browser page driver [2022-03-31T22:30:45.394+02:00][INFO ][plugins.screenshotting.screenshot] opening url http://localhost:5601/s/hmm4/app/reportingRedirect?forceNow=2022-03-31T20%3A30%3A18.905Z [2022-03-31T22:30:45.790+02:00][ERROR][plugins.screenshotting.screenshot.browser-driver.headless-browser-console] Error in browser console: { message: "Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution. ", url: "http://localhost:5601/s/hmm4/app/reportingRedirect?forceNow=2022-03-31T20%3A30%3A18.905Z" } [2022-03-31T22:30:47.427+02:00][INFO ][plugins.screenshotting.screenshot] handled 150 page requests [2022-03-31T22:31:02.736+02:00][INFO ][plugins.screenshotting.screenshot] timeRange: Mar 31, 1962 @ 22:30:48.531 to Mar 31, 2022 @ 22:30:48.531 [2022-03-31T22:31:02.746+02:00][INFO ][plugins.screenshotting.screenshot] taking screenshots [2022-03-31T22:31:07.845+02:00][ERROR][plugins.reporting.runTask.printablePdfV2.printable_pdf_v2.execute-job.l1fgb8db04rk08096aaap4jc] Error: Protocol error (Page.captureScreenshot): Unable to capture screenshot at D:\ELK\kibana-8.1.1-windows-x86_64\kibana-8.1.1\node_modules\puppeteer\lib\cjs\puppeteer\common\Connection.js:217:63 at new Promise ( ) at CDPSession.send (D:\ELK\kibana-8.1.1-windows-x86_64\kibana-8.1.1\node_modules\puppeteer\lib\cjs\puppeteer\common\Connection.js:216:16) at Page._screenshotTask (D:\ELK\kibana-8.1.1-windows-x86_64\kibana-8.1.1\node_modules\puppeteer\lib\cjs\puppeteer\common\Page.js:1958:43) at runMicrotasks ( ) at processTicksAndRejections (node:internal/process/task_queues:96:5) [2022-03-31T22:31:07.847+02:00][ERROR][plugins.reporting.runTask] Error: Protocol error (Page.captureScreenshot): Unable to capture screenshot at D:\ELK\kibana-8.1.1-windows-x86_64\kibana-8.1.1\node_modules\puppeteer\lib\cjs\puppeteer\common\Connection.js:217:63 at new Promise ( ) at CDPSession.send (D:\ELK\kibana-8.1.1-windows-x86_64\kibana-8.1.1\node_modules\puppeteer\lib\cjs\puppeteer\common\Connection.js:216:16) at Page._screenshotTask (D:\ELK\kibana-8.1.1-windows-x86_64\kibana-8.1.1\node_modules\puppeteer\lib\cjs\puppeteer\common\Page.js:1958:43) at runMicrotasks ( ) at processTicksAndRejections (node:internal/process/task_queues:96:5) [2022-03-31T22:31:07.847+02:00][INFO ][plugins.reporting.runTask] Rescheduling task:l1fgb8db04rk08096aaap4jc to retry after error. [2022-03-31T22:31:09.257+02:00][INFO ][plugins.reporting.runTask.printablePdfV2.printable_pdf_v2.execute-job.l1fgb8db04rk08096aaap4jc] Generating request for space: hmm4 [2022-03-31T22:31:09.257+02:00][INFO ][plugins.reporting.runTask.printablePdfV2.printable_pdf_v2.execute-job.l1fgb8db04rk08096aaap4jc] Request uses Space ID: hmm4 [2022-03-31T22:31:09.258+02:00][INFO ][plugins.reporting.runTask.printablePdfV2.printable_pdf_v2.execute-job.l1fgb8db04rk08096aaap4jc] Creating UI Settings Client for space: hmm4 [2022-03-31T22:31:09.263+02:00][INFO ][plugins.screenshotting.screenshot.browser-driver] Creating browser page driver [2022-03-31T22:31:09.471+02:00][INFO ][plugins.screenshotting.screenshot] opening url http://localhost:5601/s/hmm4/app/reportingRedirect?forceNow=2022-03-31T20%3A30%3A18.905Z [2022-03-31T22:31:09.844+02:00][ERROR][plugins.screenshotting.screenshot.browser-driver.headless-browser-console] Error in browser console: { message: "Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution. ", url: "http://localhost:5601/s/hmm4/app/reportingRedirect?forceNow=2022-03-31T20%3A30%3A18.905Z" } [2022-03-31T22:31:11.240+02:00][INFO ][plugins.screenshotting.screenshot] handled 151 page requests [2022-03-31T22:31:26.710+02:00][INFO ][plugins.screenshotting.screenshot] timeRange: Mar 31, 1962 @ 22:31:12.528 to Mar 31, 2022 @ 22:31:12.528 [2022-03-31T22:31:26.712+02:00][INFO ][plugins.screenshotting.screenshot] taking screenshots [2022-03-31T22:31:31.769+02:00][ERROR][plugins.reporting.runTask.printablePdfV2.printable_pdf_v2.execute-job.l1fgb8db04rk08096aaap4jc] Error: Protocol error (Page.captureScreenshot): Unable to capture screenshot at D:\ELK\kibana-8.1.1-windows-x86_64\kibana-8.1.1\node_modules\puppeteer\lib\cjs\puppeteer\common\Connection.js:217:63 at new Promise ( ) at CDPSession.send (D:\ELK\kibana-8.1.1-windows-x86_64\kibana-8.1.1\node_modules\puppeteer\lib\cjs\puppeteer\common\Connection.js:216:16) at Page._screenshotTask (D:\ELK\kibana-8.1.1-windows-x86_64\kibana-8.1.1\node_modules\puppeteer\lib\cjs\puppeteer\common\Page.js:1958:43) at runMicrotasks ( ) at processTicksAndRejections (node:internal/process/task_queues:96:5) [2022-03-31T22:31:31.774+02:00][ERROR][plugins.reporting.runTask] Error: Max attempts (3) reached for job l1fgb8db04rk08096aaap4jc. Failed with: Error: Protocol error (Page.captureScreenshot): Unable to capture screenshot at Object.run (D:\ELK\kibana-8.1.1-windows-x86_64\kibana-8.1.1\x-pack\plugins\reporting\server\lib\tasks\execute_report.js:423:58) at runMicrotasks ( ) at processTicksAndRejections (node:internal/process/task_queues:96:5) at TaskManagerRunner.run (D:\ELK\kibana-8.1.1-windows-x86_64\kibana-8.1.1\x-pack\plugins\task_manager\server\task_running\task_runner.js:296:22)
*Kibana version: 7.10.2*
*Elasticsearch version: 7.10.2*
*Server OS version: Managed by elastic.co, Azure*
*Browser version: Chrome 88.0.4324.104*
*Browser OS version: Windows 10 64-bit*
*Original install method (e.g. download page, yum, from source, etc.): apt-get from official documentation*
*Describe the bug: Two bugs:
Steps to reproduce:
*Expected behavior: The reports in Stack Management -> Alerts and Insights -> Reporting -> should be whole and uncut.*
*Screenshots (if relevant): Cut visualizations in normal PDF printing, their titles are at the top of the images, but their bodies are below or missing. Cut labels in printable optimized PDF printing, they overflow through the page's boundaries on the right side.
Errors in browser console (if relevant):
Provide logs and/or server output (if relevant):
*Any additional context: In Kibana's Status page, the Heap total is 1.42 GB and during the printing, the heap used went up to 200 MB.