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

See full error toast button exception #4030

Closed
asteriscos opened this issue Apr 18, 2022 · 7 comments · Fixed by #4119
Closed

See full error toast button exception #4030

asteriscos opened this issue Apr 18, 2022 · 7 comments · Fixed by #4119
Assignees
Labels
type/bug Bug issue

Comments

@asteriscos
Copy link
Member

asteriscos commented Apr 18, 2022

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

Description
When an error toast pops up, sometimes the See full error button does nothing and throws an exception in the console.

Steps to reproduce

  1. Force an error, like killing wazuh-modulesd process in the manager
    image

Expected Result

  1. Clicking the See full error button should open a modal with a full description of the error
  2. In case there's no additional information, the button should not appear

Actual Result

  1. Clicking the button does nothing and throws an exception

Screenshots
Peek 2022-04-18 19-10

Screenshot from 2022-04-18 19-11-14

@Machi3mfl
Copy link
Member

Tested on Kibana 7.10.2 - Opendistro 1.2.0 - Wazuh 4.2.5

This issue doesn't exist on 4.2.5. The error toast doesn't have the button "See full error"

Screen Shot 2022-04-28 at 14 03 45

@Machi3mfl
Copy link
Member

Research

We found the problem reason. The error occurs when the error toast doesn't receive an error and instead receives only a message.
Because of that, the error toast doesn't have the error context to show it when the user clicks the "See full error" button.

Long Term Solution:

  • We must manage the error throws via an error service or something. I will open a new issue to treat this feature.

Short Term Solution:

  • Fix all the throw errors on wz-request, ensure all throw error returns a error instance and not a string.

@Machi3mfl
Copy link
Member

Solution:

Screen.Recording.2022-04-28.at.16.07.46.mov

@Desvelao Desvelao linked a pull request Apr 29, 2022 that will close this issue
@gdiazlo
Copy link
Member

gdiazlo commented Apr 29, 2022

Please take a look at this issue: #4104 is this fixed by the PR #4119

@gdiazlo gdiazlo moved this from In progress to In review in Release 4.3.0 Apr 29, 2022
@mauceballos
Copy link
Contributor

Test kibana 7.10 OK

toast-error

Repository owner moved this from In review to Done in Release 4.3.0 Apr 29, 2022
@jhaos
Copy link

jhaos commented May 12, 2022

Hi, we are getting the same problem in Wazuh 4.3 in the OVA and in a cloud environment.

imagen

Both versions environments: 4.3.0.
Both App revision: 4301-1.

  • Ways to replicate the error in cloud environment:

    1. Restarting the service and going to Wazuh > Settings > API Configuration. This will prompt the button but when clicking on it the error in the console triggers.
    2. Restarting the service and going to Wazuh > Modules > Any module. This will prompt the button but when clicking on it the error in the console triggers.
    3. If the configuration file is empty and we click in Save button. This will prompt the button but when clicking on it the error in the console triggers.
  • Way to replicate in OVA

    1. Restarting the service and going to Wazuh > Settings > API Configuration. This will prompt the button but when clicking on it the error in the console triggers.

@jhaos jhaos reopened this May 12, 2022
@davidjiglesias davidjiglesias moved this from Done to Known issues in Release 4.3.0 May 13, 2022
@Machi3mfl
Copy link
Member

Machi3mfl commented May 13, 2022

The initial case detected in this issue was resolved with a hotfix, but we consider that we need to find a better solution to these cases.
So, we opened a new issue to analyze and treat in-depth error management in the app.
New issue: #4145

Repository owner moved this from Known issues to Done in Release 4.3.0 May 13, 2022
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
Development

Successfully merging a pull request may close this issue.

5 participants