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: Generating report for large dashboard fails #106873

Closed
liza-mae opened this issue Jul 27, 2021 · 12 comments
Closed

Reporting: Generating report for large dashboard fails #106873

liza-mae opened this issue Jul 27, 2021 · 12 comments
Labels
bug Fixes for quality problems that affect the customer experience 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

Comments

@liza-mae
Copy link
Contributor

liza-mae commented Jul 27, 2021

Kibana version: 8.0.0-alpha1

Elasticsearch version: 8.0.0-alpha1

Server OS version: Linux

Browser version: Chrome

Browser OS version: Latest

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

Description of the problem including expected versus actual behavior:
Generate large dashboard report should work, however it returns error unexpected token E in JSON at position 0
Steps to reproduce:

  1. Install ES/Kibana
  2. Generate PDF report for a large dashboard, about 51 visualizations or run large dashboard reporting test in x-pack directory.
  3. Observe error: Unable to fetch report content Unexpected token E in JSON at position 0

NOTE: The reporting diagnostic also failed with an error can't read property http of undefined.

I have seen reporting fail on large dashboards before, but the errors showing are different here, so not sure if it is the same root cause.

Screenshot from 2021-07-26 15-12-52

Screenshot from 2021-07-26 15-12-40

@elasticmachine
Copy link
Contributor

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

@liza-mae liza-mae added the bug Fixes for quality problems that affect the customer experience label Jul 27, 2021
@exalate-issue-sync exalate-issue-sync bot added impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. loe:small Small Level of Effort labels Jul 27, 2021
@tsullivan
Copy link
Member

tsullivan commented Jul 27, 2021

@liza-mae

I have seen reporting fail on large dashboards before, but the errors showing are different here, so not sure if it is the same root cause.

The Cannot read property 'http' of undefined comes from a bug in a refactoring PR that was merged for 7.15.

#105508

@dokmic
Copy link
Contributor

dokmic commented Jul 30, 2021

@liza-mae, The error Unable to fetch report content Unexpected token E in JSON at position 0 was not related to the large report generation. There was a bug on the UI side that was incorrectly deserializing the error message. That code was removed in #106184.
I tried to reproduce the reporting job failure by generating a report for the large dashboard, but everything works as expected. Could you please check if the issue is still valid with the latest changes? If the issue persists, we will be able to see the exact error now.

@tsullivan, I've addressed the error in the Reporting Diagnostics in #107282. Should we create a separate issue for the regression because the error is not related to the large dashboards?

@tsullivan
Copy link
Member

@dokmic

I've addressed the error in the Reporting Diagnostics in #107282. Should we create a separate issue for the regression because the error is not related to the large dashboards?

I think it's fine to get that fix in without opening a separate issue.

@tsullivan
Copy link
Member

@liza-mae hopefully when the diagnostic issue is fixed, you'll be able to see why reporting is not working on this Linux instance.

@exalate-issue-sync exalate-issue-sync bot added loe:large Large Level of Effort and removed loe:medium Medium Level of Effort labels Aug 19, 2021
@tsullivan
Copy link
Member

@liza-mae any update on this?

@exalate-issue-sync exalate-issue-sync bot added loe:small Small Level of Effort and removed loe:large Large Level of Effort labels Aug 19, 2021
@exalate-issue-sync exalate-issue-sync bot changed the title Generating report for large dashboard fails Reporting: Generating report for large dashboard fails Aug 19, 2021
@liza-mae
Copy link
Contributor Author

@tsullivan The diagnostic errors are now fixed and it gives me proper diagnostic error messages. The diagnostic states to increase xpack.reporting.capture.timeouts.waitForElements, which I did but the report still times out, is there an ideal time for this to be test to? I tried 60000ms.

@liza-mae
Copy link
Contributor Author

The diagnostic gives this error at 30s or 60s and throws an error at 120s. Something isn't working right.

@30s

Screenshot from 2021-08-23 16-32-28

@120s

Screenshot from 2021-08-23 15-07-49

@liza-mae
Copy link
Contributor Author

Logs

| Aug 23, 2021 @ 22:38:36.000 |   | Error: An error occurred when trying to read the page for visualization panel info. You may need to increase 'xpack.reporting.capture.timeouts.waitForElements'. TimeoutError: waiting for selector `[data-shared-item],[data-shared-items-count]` failed: timeout 30000ms exceeded     at getNumberOfItems (/usr/share/kibana/x-pack/plugins/reporting/server/lib/screenshots/get_number_of_items.js:66:11)

| Aug 23, 2021 @ 22:38:36.000 |   | TimeoutError: waiting for selector `[data-shared-item],[data-shared-items-count]` failed: timeout 30000ms exceeded     at new WaitTask (/usr/share/kibana/node_modules/puppeteer/lib/cjs/puppeteer/common/DOMWorld.js:509:34)     at DOMWorld.waitForSelectorInPage (/usr/share/kibana/node_modules/puppeteer/lib/cjs/puppeteer/common/DOMWorld.js:420:26)     at Object.internalHandler.waitFor (/usr/share/kibana/node_modules/puppeteer/lib/cjs/puppeteer/common/QueryHandler.js:31:77)     at DOMWorld.waitForSelector (/usr/share/kibana/node_modules/puppeteer/lib/cjs/puppeteer/common/DOMWorld.js:313:29)     at Frame.waitForSelector (/usr/share/kibana/node_modules/puppeteer/lib/cjs/puppeteer/common/FrameManager.js:841:51)     at Page.waitForSelector (/usr/share/kibana/node_modules/puppeteer/lib/cjs/puppeteer/common/Page.js:1280:33)     at HeadlessChromiumDriver.waitForSelector (/usr/share/kibana/x-pack/plugins/reporting/server/browsers/chromium/driver/chromium_driver.js:181:34)     at getNumberOfItems (/usr/share/kibana/x-pack/plugins/reporting/server/lib/screenshots/get_number_of_items.js:39:19)     at MergeMapSubscriber.project (/usr/share/kibana/x-pack/plugins/reporting/server/lib/screenshots/observable.js:131:84)     at MergeMapSubscriber._tryNext (/usr/share/kibana/node_modules/rxjs/internal/operators/mergeMap.js:67:27)     at MergeMapSubscriber._next (/usr/share/kibana/node_modules/rxjs/internal/operators/mergeMap.js:57:18)     at MergeMapSubscriber.Subscriber.next (/usr/share/kibana/node_modules/rxjs/internal/Subscriber.js:66:18)     at MergeMapSubscriber.notifyNext (/usr/share/kibana/node_modules/rxjs/internal/operators/mergeMap.js:93:26)     at SimpleInnerSubscriber._next (/usr/share/kibana/node_modules/rxjs/internal/innerSubscribe.js:27:21)     at SimpleInnerSubscriber.Subscriber.next (/usr/share/kibana/node_modules/rxjs/internal/Subscriber.js:66:18)     at /usr/share/kibana/node_modules/rxjs/internal/util/subscribeToPromise.js:7:24

| Aug 23, 2021 @ 22:32:00.000 |   | TimeoutError: waiting for selector `[data-shared-item],[data-shared-items-count]` failed: timeout 30000ms exceeded     at new WaitTask (/usr/share/kibana/node_modules/puppeteer/lib/cjs/puppeteer/common/DOMWorld.js:509:34)     at DOMWorld.waitForSelectorInPage (/usr/share/kibana/node_modules/puppeteer/lib/cjs/puppeteer/common/DOMWorld.js:420:26)     at Object.internalHandler.waitFor (/usr/share/kibana/node_modules/puppeteer/lib/cjs/puppeteer/common/QueryHandler.js:31:77)     at DOMWorld.waitForSelector (/usr/share/kibana/node_modules/puppeteer/lib/cjs/puppeteer/common/DOMWorld.js:313:29)     at Frame.waitForSelector (/usr/share/kibana/node_modules/puppeteer/lib/cjs/puppeteer/common/FrameManager.js:841:51)     at Page.waitForSelector (/usr/share/kibana/node_modules/puppeteer/lib/cjs/puppeteer/common/Page.js:1280:33)     at HeadlessChromiumDriver.waitForSelector (/usr/share/kibana/x-pack/plugins/reporting/server/browsers/chromium/driver/chromium_driver.js:181:34)     at getNumberOfItems (/usr/share/kibana/x-pack/plugins/reporting/server/lib/screenshots/get_number_of_items.js:39:19)     at MergeMapSubscriber.project (/usr/share/kibana/x-pack/plugins/reporting/server/lib/screenshots/observable.js:131:84)     at MergeMapSubscriber._tryNext (/usr/share/kibana/node_modules/rxjs/internal/operators/mergeMap.js:67:27)     at MergeMapSubscriber._next (/usr/share/kibana/node_modules/rxjs/internal/operators/mergeMap.js:57:18)     at MergeMapSubscriber.Subscriber.next (/usr/share/kibana/node_modules/rxjs/internal/Subscriber.js:66:18)     at MergeMapSubscriber.notifyNext (/usr/share/kibana/node_modules/rxjs/internal/operators/mergeMap.js:93:26)     at SimpleInnerSubscriber._next (/usr/share/kibana/node_modules/rxjs/internal/innerSubscribe.js:27:21)     at SimpleInnerSubscriber.Subscriber.next (/usr/share/kibana/node_modules/rxjs/internal/Subscriber.js:66:18)     at /usr/share/kibana/node_modules/rxjs/internal/util/subscribeToPromise.js:7:24

| Aug 23, 2021 @ 22:32:00.000 |   | Error: An error occurred when trying to read the page for visualization panel info. You may need to increase 'xpack.reporting.capture.timeouts.waitForElements'. TimeoutError: waiting for selector `[data-shared-item],[data-shared-items-count]` failed: timeout 30000ms exceeded     at getNumberOfItems (/usr/share/kibana/x-pack/plugins/reporting/server/lib/screenshots/get_number_of_items.js:66:11)

| Aug 23, 2021 @ 22:29:52.000 |   | Error: An error occurred when trying to read the page for visualization panel info. You may need to increase 'xpack.reporting.capture.timeouts.waitForElements'. TimeoutError: waiting for selector `[data-shared-item],[data-shared-items-count]` failed: timeout 120000ms exceeded     at getNumberOfItems (/usr/share/kibana/x-pack/plugins/reporting/server/lib/screenshots/get_number_of_items.js:66:11)

| Aug 23, 2021 @ 22:29:52.000 |   | TimeoutError: waiting for selector `[data-shared-item],[data-shared-items-count]` failed: timeout 120000ms exceeded     at new WaitTask (/usr/share/kibana/node_modules/puppeteer/lib/cjs/puppeteer/common/DOMWorld.js:509:34)     at DOMWorld.waitForSelectorInPage (/usr/share/kibana/node_modules/puppeteer/lib/cjs/puppeteer/common/DOMWorld.js:420:26)     at Object.internalHandler.waitFor (/usr/share/kibana/node_modules/puppeteer/lib/cjs/puppeteer/common/QueryHandler.js:31:77)     at DOMWorld.waitForSelector (/usr/share/kibana/node_modules/puppeteer/lib/cjs/puppeteer/common/DOMWorld.js:313:29)     at Frame.waitForSelector (/usr/share/kibana/node_modules/puppeteer/lib/cjs/puppeteer/common/FrameManager.js:841:51)     at Page.waitForSelector (/usr/share/kibana/node_modules/puppeteer/lib/cjs/puppeteer/common/Page.js:1280:33)

@tsullivan
Copy link
Member

@liza-mae the solution is to use a smaller dashboard that works for the test instance. The diagnostic tool errors look like a separate issue, unrelated to generating report for a large dashboard.

@tsullivan
Copy link
Member

Same issue in 7.13: #102006

@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. and removed impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. labels Sep 27, 2021
@tsullivan
Copy link
Member

duplicate of #100461

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 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
Projects
None yet
Development

No branches or pull requests

4 participants