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

[BUG] Visualizations are not displayed cause to Types was not set error #4199

Closed
Desvelao opened this issue Jun 3, 2022 · 1 comment · Fixed by #4200
Closed

[BUG] Visualizations are not displayed cause to Types was not set error #4199

Desvelao opened this issue Jun 3, 2022 · 1 comment · Fixed by #4200
Assignees
Labels
type/bug Bug issue

Comments

@Desvelao
Copy link
Member

Desvelao commented Jun 3, 2022

Wazuh Elastic Rev Security
4.x 7.10.2 4xxx Basic, ODFE, Xpack
Browser
Chrome, Firefox, Safari, etc

Description
In Kibana 7.10.2 appears an error in the visualizations that avoid hey are built and rendered correctly.

Screenshots
image

@Desvelao Desvelao added the type/bug Bug issue label Jun 3, 2022
@Desvelao Desvelao self-assigned this Jun 3, 2022
@Desvelao
Copy link
Member Author

Desvelao commented Jun 3, 2022

Research

This problem was introduced when replacing the way to build the visualizations in this PR. The related logic is https://github.com/wazuh/wazuh-kibana-app/pull/4166/files#diff-42e6e019bbfdef197e9fa0e231f0018792ce92f8fa2db530e5c506beef79ceb4R287-R294. This builds the visualization and apply the defined colors in the visualization correctly only in development mode. With the built package, it appears the Types was not set error.

Remediation

Revert how the visualization was created using the .createVis method exported by the visualizations plugin. This does that the problem disappears, but due to a bug in this method, the definitions related to params and uiStateJSON visualization properties are not set correctly. So it is required to set the properties as is done in https://github.com/elastic/kibana/blob/v7.10.2/src/plugins/visualizations/public/vis.ts#L99-L104

Bug in .createVis method of visualizations plugin in Kibana 7.10.2

In Kibana 7.10.2, there is a bug when creating the visualization with createVis method of the visualizations plugin that doesn't pass the visState parameter to the Vis class constructor. This does the .params, .uiState and .id properties of the visualization are not set correctly in the Vis class constructor. This bug causes that the visualization, for example, doesn't use the defined colors in the .uiStateJSON property. createVis method of Visualizations plugin: https://github.com/elastic/kibana/blob/v7.10.2/src/plugins/visualizations/public/plugin.ts#L207-L211
Vis class constructor: https://github.com/elastic/kibana/blob/v7.10.2/src/plugins/visualizations/public/vis.ts#L99-L104

Desvelao added a commit that referenced this issue Jun 3, 2022
…in a production package

- fix `Types was not set` error appearing in production package
More information in: #4199 (comment)
AlexRuiz7 pushed a commit that referenced this issue Jun 6, 2022
… production package (#4200)

* fix: fix an error that avoids the visualizations are built correctly in a production package

- fix `Types was not set` error appearing in production package
More information in: #4199 (comment)

* changelog: add PR entry
github-actions bot pushed a commit that referenced this issue Jun 6, 2022
… production package (#4200)

* fix: fix an error that avoids the visualizations are built correctly in a production package

- fix `Types was not set` error appearing in production package
More information in: #4199 (comment)

* changelog: add PR entry

(cherry picked from commit e8c4815)
github-actions bot pushed a commit that referenced this issue Jun 6, 2022
… production package (#4200)

* fix: fix an error that avoids the visualizations are built correctly in a production package

- fix `Types was not set` error appearing in production package
More information in: #4199 (comment)

* changelog: add PR entry

(cherry picked from commit e8c4815)
github-actions bot pushed a commit that referenced this issue Jun 6, 2022
… production package (#4200)

* fix: fix an error that avoids the visualizations are built correctly in a production package

- fix `Types was not set` error appearing in production package
More information in: #4199 (comment)

* changelog: add PR entry

(cherry picked from commit e8c4815)
Desvelao added a commit that referenced this issue Jun 7, 2022
… was not set error in a production package (#4213)

[FIX] Visualizations are not built due a Types was not set error in a production package (#4200)

* fix: fix an error that avoids the visualizations are built correctly in a production package

- fix `Types was not set` error appearing in production package
More information in: #4199 (comment)

* changelog: add PR entry

(cherry picked from commit e8c4815)

Co-authored-by: Antonio <34042064+Desvelao@users.noreply.github.com>
Desvelao added a commit that referenced this issue Jun 7, 2022
…pes was not set error in a production package (#4214)

[FIX] Visualizations are not built due a Types was not set error in a production package (#4200)

* fix: fix an error that avoids the visualizations are built correctly in a production package

- fix `Types was not set` error appearing in production package
More information in: #4199 (comment)

* changelog: add PR entry

(cherry picked from commit e8c4815)

Co-authored-by: Antonio <34042064+Desvelao@users.noreply.github.com>
Desvelao added a commit that referenced this issue Jun 7, 2022
… not built due a Types was not set error in a production package (#4215)

[FIX] Visualizations are not built due a Types was not set error in a production package (#4200)

* fix: fix an error that avoids the visualizations are built correctly in a production package

- fix `Types was not set` error appearing in production package
More information in: #4199 (comment)

* changelog: add PR entry

(cherry picked from commit e8c4815)

Co-authored-by: Antonio <34042064+Desvelao@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Bug issue
Projects
No open projects
Status: Done
2 participants