Debugging X-Pack Reporting

I have a very simple plugin that scrapes a website a displays some text, however when I try to export this visualization as a pdf I have this error.

{"type":"log","@timestamp":"2017-11-16T18:48:12Z","tags":["reporting","debug"],"pid":30589,"level":"error","message":"Timeout exceeded (20000)","error":{"message":"Timeout exceeded (20000)","name":"Error","stack":"Error: Timeout exceeded (20000)\n at Timeout.waitForCheck [as _onTimeout] (/home/xxx/kibana/plugins/x-pack/plugins/reporting/server/lib/phantom/index.js:311:29)\n at ontimeout (timers.js:386:11)\n at tryOnTimeout (timers.js:250:5)\n at Timer.listOnTimeout (timers.js:214:5)"}}
{"type":"log","@timestamp":"2017-11-16T18:48:12Z","tags":["reporting","esqueue","worker","debug"],"pid":30589,"message":"ja2tval60nlpe897370rbyns - Failure occurred on job ja2tvve60nlpe8973704tw0m: Error: Timeout exceeded (20000)"}

I can export native visualizations with no problem so I don't know if I have some configuration wrong in my yml file or if my visualiztion plugin has some bade code.

So I'm trying to setup an environment to debug whats causing the error that causes the timeout. I've setup a project in WebStorm and have a run config working with --inspect --debug-brk. When I hit the provided url to debug the server side code, the file /home/xxx/kibana/plugins/x-pack/plugins/reporting/server/lib/phantom/index.js. I only see usr/lib/node_modules/npm in my file://

I'm not experienced developing javascript apps and I'm just looking for some guidance on how to debug kibana on the server side or some help properly configuring my plugins so that they export without error.

You guys have help me a lot already and its very appreciated.

Thanks,

Alex

Alex,
What version are you using ? Can you please elaborate step-by step what are you trying to do in the end ?

Thanks
Rashmi

I'm using Kibana 5.5.2.

I want to build a report dashboard that automatically summarizes a given subject. This would include charts and text.

Most of the text I want to be dynamic/templated. So I'm developing set of viz plugins to flesh out this dashboard. One of these plugins uses the query string to search wikipedia for article and display it.

The final product being the dashboard exported as a pdf using xpack reporting.

My custom visualization causes the export to pdf to fail, and the error provided tells me nothing about why my viz plugin can't be exported.

So I'm trying to debug xpack reporting code, but I can't seem to be set up an environment to let me debug the server side javascript.

TLDR I'm looking for a guide to get Kibana fully debuggable (client/server) OR some help as to why my viz plugin will display correctly in browser, but can't be exported.

I am willing to upload my plugin code to facilitate this. I have a hunch its something small and easy as other visualizations are exporting fine. I'm just very inexperienced with javascript development and the run time.

For reference,

When running kibana from debug mode in webstorm use following settings to debug and see plugin code.

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