Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generating a PDF from Canvas is failing #95008

Closed
dadoonet opened this issue Mar 19, 2021 · 9 comments
Closed

Generating a PDF from Canvas is failing #95008

dadoonet opened this issue Mar 19, 2021 · 9 comments
Assignees
Labels
bug Fixes for quality problems that affect the customer experience (Deprecated) Feature:Reporting Use Reporting:Screenshot, Reporting:CSV, or Reporting:Framework instead Feature:Canvas feedback_needed impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas

Comments

@dadoonet
Copy link
Member

Kibana version: 7.11.2 (on cloud)

Browser version: Google Chrome Version 89.0.4389.82

Browser OS version: MacOS 11.2.1 (20D74)

Describe the bug:

I'm trying to print as PDF a Canvas presentation (9 slides) but no luck.

Steps to reproduce:

  1. Import this presentation: https:/dadoonet/demo-ingest-processors/raw/main/kibana-config/canvas.ndjson
wget https://raw.githubusercontent.com/dadoonet/demo-ingest-processors/main/kibana-config/canvas.ndjson
curl -XPOST http://localhost:5601/api/saved_objects/_import?overwrite=true -H 'kbn-xsrf: true' --form file="@canvas.ndjson"
  1. Generate the PDF
curl -XPOST https://localhost:5601/api/reporting/generate/printablePdf?jobParams=(browserTimezone:Europe%2FParis,layout:(dimensions:(height:1080,width:1920),id:canvas),objectType:'canvas%20workpad',relativeUrls:!(%2Fapp%2Fcanvas%23%2Fexport%2Fworkpad%2Fpdf%2Fworkpad-916fe3da-c3c9-4f58-a2fc-aea17953d636%2Fpage%2F1,%2Fapp%2Fcanvas%23%2Fexport%2Fworkpad%2Fpdf%2Fworkpad-916fe3da-c3c9-4f58-a2fc-aea17953d636%2Fpage%2F2,%2Fapp%2Fcanvas%23%2Fexport%2Fworkpad%2Fpdf%2Fworkpad-916fe3da-c3c9-4f58-a2fc-aea17953d636%2Fpage%2F3,%2Fapp%2Fcanvas%23%2Fexport%2Fworkpad%2Fpdf%2Fworkpad-916fe3da-c3c9-4f58-a2fc-aea17953d636%2Fpage%2F4,%2Fapp%2Fcanvas%23%2Fexport%2Fworkpad%2Fpdf%2Fworkpad-916fe3da-c3c9-4f58-a2fc-aea17953d636%2Fpage%2F5,%2Fapp%2Fcanvas%23%2Fexport%2Fworkpad%2Fpdf%2Fworkpad-916fe3da-c3c9-4f58-a2fc-aea17953d636%2Fpage%2F6,%2Fapp%2Fcanvas%23%2Fexport%2Fworkpad%2Fpdf%2Fworkpad-916fe3da-c3c9-4f58-a2fc-aea17953d636%2Fpage%2F7,%2Fapp%2Fcanvas%23%2Fexport%2Fworkpad%2Fpdf%2Fworkpad-916fe3da-c3c9-4f58-a2fc-aea17953d636%2Fpage%2F8,%2Fapp%2Fcanvas%23%2Fexport%2Fworkpad%2Fpdf%2Fworkpad-916fe3da-c3c9-4f58-a2fc-aea17953d636%2Fpage%2F9),title:'Elastic%20Daily%20Byte%20-%20Ingest%20Processors')

Errors in browser console (if relevant):

Unable to generate report
Reporting encountered an error on the page: Error: Error: Unauthorized at _callee3$ (https://0.0.0.0:18136/38015/bundles/core/core.entry.js:6:44939) at l (https://0.0.0.0:18136/38015/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:321:968615) at Generator._invoke (https://0.0.0.0:18136/38015/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:321:968368) at Generator.forEach.e.<computed> [as next] (https://0.0.0.0:18136/38015/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:321:968972) at fetch_asyncGeneratorStep (https://0.0.0.0:18136/38015/bundles/core/core.entry.js:6:39045) at _next (https://0.0.0.0:18136/38015/bundles/core/core.entry.js:6:39361)

And sometimes

ResponseError: security_exception

image

@dadoonet dadoonet added bug Fixes for quality problems that affect the customer experience (Deprecated) Feature:Reporting Use Reporting:Screenshot, Reporting:CSV, or Reporting:Framework instead Feature:Canvas labels Mar 19, 2021
@kibanamachine kibanamachine added impact:needs-assessment Product and/or Engineering needs to evaluate the impact of the change. loe:needs-research This issue requires some research before it can be worked on or estimated Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas labels Mar 19, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-presentation (Team:Presentation)

@lucabelluccini
Copy link
Contributor

Hello @dadoonet can you please try to remove all the demodata functions from static elements?
I suggest to review all the markdown which end up in static content.

Example:

filters
| demodata
| markdown "# Circle Processor
"
| render 
  css=".canvasRenderEl{

}
.canvasMarkdown p a {
color: lightgrey;
}
.canvasMarkdown h1 {
font-size: 60px;
color: black;
}
.canvasMarkdown h1 a {
color: lightgrey;
}"

This might be related to #94521

@dadoonet
Copy link
Member Author

Thanks @lucabelluccini. I just tried but still the same issue.
I updated the canvas file in my repo.

@tsullivan tsullivan self-assigned this Mar 23, 2021
@tsullivan tsullivan added Team:AppServices and removed Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas labels Mar 23, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-reporting-services (Team:Reporting Services)

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-services (Team:AppServices)

@tsullivan tsullivan added the Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas label May 5, 2021
@tsullivan tsullivan removed their assignment May 5, 2021
@tsullivan
Copy link
Member

Hi, @elastic/kibana-presentation can you check if this may be fixed along with: #93482?

@poffdeluxe
Copy link
Contributor

Looking now!

@poffdeluxe poffdeluxe self-assigned this May 13, 2021
@poffdeluxe
Copy link
Contributor

I downloaded the attached canvas.ndjson and was able to generate pdfs on both my local machine and on elastic cloud (both running 7.11.2).

Does the Kibana instance running on cloud have at least 4 GB of memory?

@dadoonet
Copy link
Member Author

Does the Kibana instance running on cloud have at least 4 GB of memory?

No. I'm using the default instance, which is 1gb of RAM.
I just looked at https://www.elastic.co/guide/en/kibana/current/reporting-troubleshooting.html#reporting-troubleshooting-system-requirements which says to increase to 2gb.

I increased to 4gb as you recommended and that worked like a charm.

Is there any way to change the error message in such a case and provide a link to the troubleshooting page or recommend to increase the memory?

I'm closing the issue as it's solved on my end. Thanks @poffdeluxe!

@exalate-issue-sync exalate-issue-sync bot added impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort and removed impact:needs-assessment Product and/or Engineering needs to evaluate the impact of the change. loe:needs-research This issue requires some research before it can be worked on or estimated labels Jun 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience (Deprecated) Feature:Reporting Use Reporting:Screenshot, Reporting:CSV, or Reporting:Framework instead Feature:Canvas feedback_needed impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas
Projects
None yet
Development

No branches or pull requests

7 participants