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

[reporting] Canvas does not create report when workpad name is non-english #34331

Closed
kimjmin opened this issue Apr 2, 2019 · 8 comments
Closed
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 Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas

Comments

@kimjmin
Copy link

kimjmin commented Apr 2, 2019

Kibana version:
6.7.0

Elasticsearch version:
6.7.0

Server OS version:
Linux Cent OS 7

Browser version:
Chrome 73.0.3683.86

Browser OS version:
MacOS 10.14.4(18E226)

Original install method (e.g. download page, yum, from source, etc.):
Download

Describe the bug:

  • Tried to create report from Canvas. When workpad name is saved with non-english (korean), when I clicked download button on report page, it shows next error.
{"statusCode":500,"error":"Internal Server Error","message":"An internal server error occurred"}
  • Once I changed workpad name to English, report created correctly.
  • Still PDF reports korean text is broken.

Steps to reproduce:

  1. Save workpad name to non-english in canvas.
  2. create report.
  3. download report.

Expected behavior:
PDF reporting file should be generated with correct non-english texts, whenever canvas workpad title is non-english.

Screenshots (if relevant):

Errors in browser console (if relevant):

Provide logs and/or server output (if relevant):

{"type":"response","@timestamp":"2019-04-02T06:33:18Z","tags":["api"],"pid":6537,"method":"post","statusCode":200,"req":{"url":"/api/reporting/generate/printablePdf?jobParams=(browserTimezone%3AAmerica%2FPhoenix%2Clayout%3A(dimensions%3A(height%3A720%2Cwidth%3A1080)%2Cid%3Apreserve_layout)%2CobjectType%3A'canvas%20workpad'%2CrelativeUrls%3A!(%2Fapp%2Fcanvas%23%2Fexport%2Fworkpad%2Fpdf%2Fworkpad-16afc8e0-85c5-493f-abd6-42aebd50acf5%2Fpage%2F1)%2Ctitle%3A'%ED%86%B5%ED%95%A9%20%EB%8C%80%EC%8B%9C%EB%B3%B4%EB%93%9C')","method":"post","headers":{"host":"35.189.148.237:5601","connection":"keep-alive","content-length":"0","accept":"application/json","origin":"http://35.189.148.237:5601","kbn-xsrf":"professionally-crafted-string-of-text","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.86 Safari/537.36","referer":"http://35.189.148.237:5601/app/canvas","accept-encoding":"gzip, deflate","accept-language":"ko-KR,ko;q=0.9,en-US;q=0.8,en;q=0.7,es;q=0.6,ru;q=0.5"},"remoteAddress":"125.143.163.33","userAgent":"125.143.163.33","referer":"http://35.189.148.237:5601/app/canvas"},"res":{"statusCode":200,"responseTime":65,"contentLength":9},"message":"POST /api/reporting/generate/printablePdf?jobParams=(browserTimezone%3AAmerica%2FPhoenix%2Clayout%3A(dimensions%3A(height%3A720%2Cwidth%3A1080)%2Cid%3Apreserve_layout)%2CobjectType%3A'canvas%20workpad'%2CrelativeUrls%3A!(%2Fapp%2Fcanvas%23%2Fexport%2Fworkpad%2Fpdf%2Fworkpad-16afc8e0-85c5-493f-abd6-42aebd50acf5%2Fpage%2F1)%2Ctitle%3A'%ED%86%B5%ED%95%A9%20%EB%8C%80%EC%8B%9C%EB%B3%B4%EB%93%9C') 200 65ms - 9.0B"}
0|index  | {"type":"response","@timestamp":"2019-04-02T06:33:21Z","tags":[],"pid":6537,"method":"get","statusCode":200,"req":{"url":"/app/canvas","method":"get","headers":{"host":"kr-demo-coordinate:5601","connection":"keep-alive","pragma":"no-cache","cache-control":"no-cache","accept":"application/json","accept-language":"ko-KR,ko;q=0.9,en-US;q=0.8,en;q=0.7,es;q=0.6,ru;q=0.5","kbn-xsrf":"professionally-crafted-string-of-text","origin":"http://35.189.148.237:5601","upgrade-insecure-requests":"1","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.86 Safari/537.36","accept-encoding":"gzip, deflate"},"remoteAddress":"10.146.0.10","userAgent":"10.146.0.10"},"res":{"statusCode":200,"responseTime":48,"contentLength":9},"message":"GET /app/canvas 200 48ms - 9.0B"}

Any additional context:
Recoreded Video
https://drive.google.com/a/elastic.co/file/d/1xIwJ3BncC5KWEEXf5Aa2qcr4BTplK-KZ/view?usp=sharing

@kimjmin kimjmin added the (Deprecated) Feature:Reporting Use Reporting:Screenshot, Reporting:CSV, or Reporting:Framework instead label Apr 2, 2019
@alexfrancoeur alexfrancoeur added Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas bug Fixes for quality problems that affect the customer experience labels May 15, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-canvas

@tsullivan
Copy link
Member

Hi, I was able to reproduce a PDF report for a Canvas workpad with the same name:

image

I don't have a screen recording, but the download was working for me.

The biggest thing here is none of the logs we have so far will really help. When an Internal Server Error happens, there is usually NOT any helpful messages sent to the browser, and this is by design: we shouldn't send the end-user information about lines of code that threw an exception, as a trace can be seen as a security issue, especially if it contains file paths.

Internal Server Errors require us to look on the server for logs. If you can, please try to reproduce this with verbose logging enabled - I am curious to see what Reporting is doing internally here.

@tsullivan
Copy link
Member

I think it's also important to speak about the 500 status from another angle: Reporting is expected to return a 500 status response at download time when PDF generation failed. I'm sure the experience here could be improved a bit, but for now we're working on making that more clear in the docs.

To understand why the PDF can't be downloaded, we need to look at logs that Kibana printed when it was trying to generate the PDF, which is a phase that happens a few seconds before the job "finishes"; and definitely before the time-of-attempting-download.

@tsullivan
Copy link
Member

There is a strange bug here though: if the PDF generation failed, then the Reporting listing should not be showing it as successful / completed. This is the first time I've seen this behavior.

@tsullivan
Copy link
Member

After looking more into this, it looks like @kimjmin received a different 500 error than I assumed.

If the report generation failed, the response JSON would look like:

{"message":"Reporting generation failed","reason":"Error: Encountered an unexpected message on the page: Saved object is missing"}%

We're blocked on making progress on this unless we can get a stack trace from the Kibana server console

@kimjmin
Copy link
Author

kimjmin commented Jul 18, 2019

Hi @tsullivan .Our local community reported that, to make Reporting work in local language, we have to install korean font at OS (Linux) level, which installed Kibana.

@tsullivan
Copy link
Member

tsullivan commented Jul 19, 2019 via email

@timductive
Copy link
Member

closing, solution was to install language-specific font on server

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 Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas
Projects
None yet
Development

No branches or pull requests

6 participants