Closed asteriscos closed 1 month ago
The error is caused by a problem getting the screenshots of the visualizations. Editing the source code to display the error on console:
A recent pull request https://github.com/wazuh/wazuh-dashboard-plugins/pull/6558/files#diff-09c83b245d7d7757479c6f6bce9a14e1e15823a12d4e827885ed2b584d69f06dR480-R482 for 4.9.0 added a fix for the dom-to-image
dependency library.
I tried to remove the fix, and this avoids the error reported on the issue, but the logic to get the visualization screenshots seems to enter into a loop and the report can not be generated. This behavior happens on Firefox and Google Chrome.
I tried to replace the embedded dom-to-image
dependency by https://www.npmjs.com/package/dom-to-image-more and this seems to fix the problem related to the loop.
But it seems on Firefox, some images are cropped. Related issue: https://github.com/1904labs/dom-to-image-more/issues/160
I added a embedded dom-to-image-more
dependency because I wanted to remove the font fetching logic that was customized on the dom-to-image
library.
I applied a fix to solve the problem related to cropped images on Firefox.
@yenienserrano and me were reviewing the generation of reports on Safari and Firefox too.
I created the following pull request with the proposed solution: https://github.com/wazuh/wazuh-dashboard-plugins/pull/6902
Description When using a Firefox browser the create PDF report doesn't work, and throws an error.
Preconditions
Steps to reproduce
Screenshots