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

Custom visualization PDF report download error #4947

Closed
Rebits opened this issue Dec 2, 2022 · 7 comments
Closed

Custom visualization PDF report download error #4947

Rebits opened this issue Dec 2, 2022 · 7 comments
Assignees
Labels
level/task Task issue qa/report QA Team: Reporting possible bug type/bug Bug issue

Comments

@Rebits
Copy link
Member

Rebits commented Dec 2, 2022

Wazuh Elastic Rev Security
4.4 7.17 1
Browser
Chrome, Firefox, Safari, etc

Description

Report generation in PDF format of a custom visualization graph fails for a Download Error

Full log

Download error

There was an error generating this report

Console error

HTTP: 404 Not found
POSThttps://172.31.17.26/app/api/reporting/generateReport?timezone=Atlantic/Canary&dateFormat=MMM+D,+YYYY+@+HH:mm:ss.SSS&csvSeparator=,
Uncaught (in promise) TypeError: fileName is undefined
    _callee2$ https://172.31.17.26/440/bundles/plugin/reportsDashboards/reportsDashboards.plugin.js:1
    tryCatch https://172.31.17.26/440/bundles/plugin/reportsDashboards/reportsDashboards.plugin.js:1
    invoke https://172.31.17.26/440/bundles/plugin/reportsDashboards/reportsDashboards.plugin.js:1
    defineIteratorMethods https://172.31.17.26/440/bundles/plugin/reportsDashboards/reportsDashboards.plugin.js:1
    asyncGeneratorStep https://172.31.17.26/440/bundles/plugin/reportsDashboards/reportsDashboards.plugin.js:1
    _next https://172.31.17.26/440/bundles/plugin/reportsDashboards/reportsDashboards.plugin.js:1
    _asyncToGenerator https://172.31.17.26/440/bundles/plugin/reportsDashboards/reportsDashboards.plugin.js:1
    _asyncToGenerator https://172.31.17.26/440/bundles/plugin/reportsDashboards/reportsDashboards.plugin.js:1
    readStreamToFile https://172.31.17.26/440/bundles/plugin/reportsDashboards/reportsDashboards.plugin.js:1
    _callee$ https://172.31.17.26/440/bundles/plugin/reportsDashboards/reportsDashboards.plugin.js:1
    tryCatch https://172.31.17.26/440/bundles/plugin/reportsDashboards/reportsDashboards.plugin.js:1
    invoke https://172.31.17.26/440/bundles/plugin/reportsDashboards/reportsDashboards.plugin.js:1
    defineIteratorMethods https://172.31.17.26/440/bundles/plugin/reportsDashboards/reportsDashboards.plugin.js:1
    asyncGeneratorStep https://172.31.17.26/440/bundles/plugin/reportsDashboards/reportsDashboards.plugin.js:1
    _next https://172.31.17.26/440/bundles/plugin/reportsDashboards/reportsDashboards.plugin.js:1
    _asyncToGenerator https://172.31.17.26/440/bundles/plugin/reportsDashboards/reportsDashboards.plugin.js:1
    _asyncToGenerator https://172.31.17.26/440/bundles/plugin/reportsDashboards/reportsDashboards.plugin.js:1
    _callee2$/</< https://172.31.17.26/440/bundles/plugin/reportsDashboards/reportsDashboards.plugin.js:1
    promise callback*_callee2$ https://172.31.17.26/440/bundles/plugin/reportsDashboards/reportsDashboards.plugin.js:1
    tryCatch https://172.31.17.26/440/bundles/plugin/reportsDashboards/reportsDashboards.plugin.js:1
    invoke https://172.31.17.26/440/bundles/plugin/reportsDashboards/reportsDashboards.plugin.js:1
    defineIteratorMethods https://172.31.17.26/440/bundles/plugin/reportsDashboards/reportsDashboards.plugin.js:1
    asyncGeneratorStep https://172.31.17.26/440/bundles/plugin/reportsDashboards/reportsDashboards.plugin.js:1
    _next https://172.31.17.26/440/bundles/plugin/reportsDashboards/reportsDashboards.plugin.js:1
    promise callback*asyncGeneratorStep https://172.31.17.26/440/bundles/plugin/reportsDashboards/reportsDashboards.plugin.js:1
    _next https://172.31.17.26/440/bundles/plugin/reportsDashboards/reportsDashboards.plugin.js:1
    _asyncToGenerator https://172.31.17.26/440/bundles/plugin/reportsDashboards/reportsDashboards.plugin.js:1
    _asyncToGenerator https://172.31.17.26/440/bundles/plugin/reportsDashboards/reportsDashboards.plugin.js:1
    generateInContextReport https://172.31.17.26/440/bundles/plugin/reportsDashboards/reportsDashboards.plugin.js:1
    <anonymous> https://172.31.17.26/440/bundles/plugin/reportsDashboards/reportsDashboards.plugin.js:1
    dispatch https://172.31.17.26/440/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:413
    handle https://172.31.17.26/440/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:413
    add https://172.31.17.26/440/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:413
    Le https://172.31.17.26/440/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:413
    each https://172.31.17.26/440/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:402
    each https://172.31.17.26/440/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:402
    Le https://172.31.17.26/440/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:413
    on https://172.31.17.26/440/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:413
    <anonymous> https://172.31.17.26/440/bundles/plugin/reportsDashboards/reportsDashboards.plugin.js:1
    l https://172.31.17.26/440/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:413
    c https://172.31.17.26/440/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:413
    setTimeout handler*a/< https://172.31.17.26/440/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:413
    u https://172.31.17.26/440/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:413
    add https://172.31.17.26/440/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:413
    then https://172.31.17.26/440/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:413
    Deferred https://172.31.17.26/440/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:413
    then https://172.31.17.26/440/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:413
    ready https://172.31.17.26/440/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:413
    init https://172.31.17.26/440/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:413
    S https://172.31.17.26/440/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:402
    <anonymous> https://172.31.17.26/440/bundles/plugin/reportsDashboards/reportsDashboards.plugin.js:1
    __webpack_require__ https://172.31.17.26/440/bundles/plugin/reportsDashboards/reportsDashboards.plugin.js:1
    <anonymous> https://172.31.17.26/440/bundles/plugin/reportsDashboards/reportsDashboards.plugin.js:1
    __webpack_require__ https://172.31.17.26/440/bundles/plugin/reportsDashboards/reportsDashboards.plugin.js:1
    <anonymous> https://172.31.17.26/440/bundles/plugin/reportsDashboards/reportsDashboards.plugin.js:1
    __webpack_require__ https://172.31.17.26/440/bundles/plugin/reportsDashboards/reportsDashboards.plugin.js:1
    get https://172.31.17.26/bootstrap.js:28
    read https://172.31.17.26/440/bundles/core/core.entry.js:15
    _callee3$ https://172.31.17.26/440/bundles/core/core.entry.js:15
    l https://172.31.17.26/440/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:389
    _invoke https://172.31.17.26/440/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:389
    b https://172.31.17.26/440/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:389
    plugin_asyncGeneratorStep https://172.31.17.26/440/bundles/core/core.entry.js:15
    _next https://172.31.17.26/440/bundles/core/core.entry.js:15
    plugin_asyncToGenerator https://172.31.17.26/440/bundles/core/core.entry.js:15
    plugin_asyncToGenerator https://172.31.17.26/440/bundles/core/core.entry.js:15
    createPluginInstance https://172.31.17.26/440/bundles/core/core.entry.js:15
    _callee$ https://172.31.17.26/440/bundles/core/core.entry.js:15
    l https://172.31.17.26/440/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:389
    _invoke https://172.31.17.26/440/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:389
    b https://172.31.17.26/440/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:389

Steps to reproduce

  1. Navigate to Modules > Security Events
  2. Click on any available field and select Visualize
  3. Click on Reporting>Download PDF

Expected Result

  1. The report should be created and downloaded

Actual Result

  1. Unexpected error

Video

error_report.webm
@Machi3mfl
Copy link
Member

Machi3mfl commented Dec 7, 2022

Trying to reproduce the issue in OSD 2.3 for Wazuh 4.4

After following the steps the "Reporting" button is hidden.

Peek.2022-12-07.14-00.mp4

Trying to reproduce the issue kibana 7.10.2 for Wazuh 4.4

Peek.2022-12-07.13-48.mp4

Next step:

  • Test with Wazuh dashboard production mode using official documentation in a virtual machine

@Machi3mfl
Copy link
Member

Reproducing in 4.4 installed using Wazuh Official Quickstart commands

Peek.2022-12-12.15-48.mp4

image

@davidjiglesias
Copy link
Member

Does this error also replicate in OSD 2.4.0?

@Machi3mfl
Copy link
Member

Machi3mfl commented Dec 13, 2022

Does this error also replicate in OSD 2.4.0?

Hi @davidjiglesias.
I've tested the use case mentioned in this issue and doesn't happen in OSD 2.3.0 and 2.4.0.
As is shown in the videos added in the comments above when we redirect from our Discover to the OSD Visualize plugin the Reporting button is hidden.

Test cases:

  • OSD 2.3 for Wazuh 4.4
Peek.2022-12-07.14-00.mp4
  • Kibana 7.10.2 for Wazuh 4.4
Peek.2022-12-07.13-48.mp4
  • OSD 2.4 for Wazuh 4.4
Peek.2022-12-13.11-39.mp4
  • OSD 2.4 for Wazuh 4.3.11
Peek.2022-12-13.11-35.mp4

Conclusion

The issue only was replicated when I tested in the Wazuh dashboard 4.4 pre-release. We need to check it in the next pre-release package. Also, the behavior is from the OSD Visualize plugin and we aren't the owner we cannot change the behavior.

@AlexRuiz7
Copy link
Member

This is a bug from OpenSearch's reporting plugin: opensearch-project/reporting#590

@gdiazlo gdiazlo moved this from Known Issue to Blocked in Release 4.4.0 Jan 9, 2023
@gdiazlo gdiazlo moved this from Blocked to Known Issue in Release 4.4.0 Jan 9, 2023
@AlexRuiz7
Copy link
Member

Moved to Blocked to revisit periodically.

@gdiazlo gdiazlo added the level/task Task issue label Apr 26, 2023
@gdiazlo
Copy link
Member

gdiazlo commented Jul 13, 2023

We will revisit this in the future, when we refactor the reporting module

@gdiazlo gdiazlo closed this as not planned Won't fix, can't repro, duplicate, stale Jul 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
level/task Task issue qa/report QA Team: Reporting possible bug type/bug Bug issue
Projects
No open projects
Status: Known Issue
Development

No branches or pull requests

5 participants