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

Console error when I have an agent selected and environment change #5745

Closed
damarisg opened this issue Jul 28, 2023 · 3 comments · May be fixed by #6306
Closed

Console error when I have an agent selected and environment change #5745

damarisg opened this issue Jul 28, 2023 · 3 comments · May be fixed by #6306
Labels
level/task Task issue qa/known Issues that are already known by the QA team type/bug Bug issue

Comments

@damarisg
Copy link
Member

damarisg commented Jul 28, 2023

Wazuh Elastic Rev Security
4.5.0 7.x 4xxx Basic, ODFE, Xpack
Browser
Firefox 115.0.2 (64-bit)

Description

The goal of this test is to move between the environments without getting errors.

It is detected that when we have more agents in an environment and then we move them to another that has less, it generates an error.

This happens because if we select the agent with ID 002 in Env-1, and then move to Env-2, what it does is change the environments and keep agent ID 002 that there is inside Env-2.

Now, as in this case, Env-1 has 4 agents, and Env-2 only 2 agents. When I select the agent with ID 004 that exists in Env-1, and then I move to Env-2 as that ID does not exist, it generates the error.

I propose two solutions:

  • Option 1: Keep the behavior and fix the console error
  • Option 2: When changing the environment, redirect the page to the home panel.

Note: Found on Demo environment 4.5.0 in testing E2E.


Preconditions

  1. Should be have more agent in env-1 than env-2

Steps to reproduce

  1. Navigate to 'Agents' where the API env-1 is selected.
  2. Click on the last agent added to the list. Remember this ID shouldn't exist on env-2.
  3. Click on API and change env-1 to env-2.

Expected Result

  1. It shows a message: Could not get data for this agent.
  2. It doesn't show an error in the console.

Actual Result

  1. It shows a message: Could not get data for this agent.
  2. It shows an error in the console:

    Uncaught (in promise) Error: Error: No agent information was returned (1701) - Agent does not exist

Screenshots

Details of Error: No agent information was returned (1701) - Agent does not exist
_callee12$ https://demo.wazuh.info/45001/bundles/plugin/wazuh/wazuh.chunk.10.js:5
tryCatch https://demo.wazuh.info/45001/bundles/plugin/customImportMapDashboards/customImportMapDashboards.plugin.js:13
invoke https://demo.wazuh.info/45001/bundles/plugin/customImportMapDashboards/customImportMapDashboards.plugin.js:13
defineIteratorMethods https://demo.wazuh.info/45001/bundles/plugin/customImportMapDashboards/customImportMapDashboards.plugin.js:13
agents_asyncGeneratorStep https://demo.wazuh.info/45001/bundles/plugin/wazuh/wazuh.chunk.10.js:5
_throw https://demo.wazuh.info/45001/bundles/plugin/wazuh/wazuh.chunk.10.js:5
promise callback*agents_asyncGeneratorStep https://demo.wazuh.info/45001/bundles/plugin/wazuh/wazuh.chunk.10.js:5
_next https://demo.wazuh.info/45001/bundles/plugin/wazuh/wazuh.chunk.10.js:5
agents_asyncToGenerator https://demo.wazuh.info/45001/bundles/plugin/wazuh/wazuh.chunk.10.js:5
agents_asyncToGenerator https://demo.wazuh.info/45001/bundles/plugin/wazuh/wazuh.chunk.10.js:5
getAgent https://demo.wazuh.info/45001/bundles/plugin/wazuh/wazuh.chunk.10.js:5
_callee2$ https://demo.wazuh.info/45001/bundles/plugin/wazuh/wazuh.chunk.10.js:5
tryCatch https://demo.wazuh.info/45001/bundles/plugin/customImportMapDashboards/customImportMapDashboards.plugin.js:13
invoke https://demo.wazuh.info/45001/bundles/plugin/customImportMapDashboards/customImportMapDashboards.plugin.js:13
defineIteratorMethods https://demo.wazuh.info/45001/bundles/plugin/customImportMapDashboards/customImportMapDashboards.plugin.js:13
agents_asyncGeneratorStep https://demo.wazuh.info/45001/bundles/plugin/wazuh/wazuh.chunk.10.js:5
_next https://demo.wazuh.info/45001/bundles/plugin/wazuh/wazuh.chunk.10.js:5
agents_asyncToGenerator https://demo.wazuh.info/45001/bundles/plugin/wazuh/wazuh.chunk.10.js:5
agents_asyncToGenerator https://demo.wazuh.info/45001/bundles/plugin/wazuh/wazuh.chunk.10.js:5
getAgent https://demo.wazuh.info/45001/bundles/plugin/wazuh/wazuh.chunk.10.js:5
_callee6$ https://demo.wazuh.info/45001/bundles/plugin/wazuh/wazuh.chunk.10.js:5
tryCatch https://demo.wazuh.info/45001/bundles/plugin/customImportMapDashboards/customImportMapDashboards.plugin.js:13
invoke https://demo.wazuh.info/45001/bundles/plugin/customImportMapDashboards/customImportMapDashboards.plugin.js:13
defineIteratorMethods https://demo.wazuh.info/45001/bundles/plugin/customImportMapDashboards/customImportMapDashboards.plugin.js:13
agents_asyncGeneratorStep https://demo.wazuh.info/45001/bundles/plugin/wazuh/wazuh.chunk.10.js:5
_next https://demo.wazuh.info/45001/bundles/plugin/wazuh/wazuh.chunk.10.js:5
promise callback*agents_asyncGeneratorStep https://demo.wazuh.info/45001/bundles/plugin/wazuh/wazuh.chunk.10.js:5
_next https://demo.wazuh.info/45001/bundles/plugin/wazuh/wazuh.chunk.10.js:5
agents_asyncToGenerator https://demo.wazuh.info/45001/bundles/plugin/wazuh/wazuh.chunk.10.js:5
agents_asyncToGenerator https://demo.wazuh.info/45001/bundles/plugin/wazuh/wazuh.chunk.10.js:5
$onInit https://demo.wazuh.info/45001/bundles/plugin/wazuh/wazuh.chunk.10.js:5
ae https://demo.wazuh.info/45001/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:428
_ https://demo.wazuh.info/45001/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:428
ae https://demo.wazuh.info/45001/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:428
ce https://demo.wazuh.info/45001/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:428
ie https://demo.wazuh.info/45001/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:428
link https://demo.wazuh.info/45001/bundles/plugin/wazuh/wazuh.chunk.11.js:48
de https://demo.wazuh.info/45001/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:428
Ne https://demo.wazuh.info/45001/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:428
ae https://demo.wazuh.info/45001/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:428
ce https://demo.wazuh.info/45001/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:428
ie https://demo.wazuh.info/45001/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:428
ge https://demo.wazuh.info/45001/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:428
r https://demo.wazuh.info/45001/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:428
m https://demo.wazuh.info/45001/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:428
update https://demo.wazuh.info/45001/bundles/plugin/wazuh/wazuh.chunk.11.js:48
$broadcast https://demo.wazuh.info/45001/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:428
commitRoute https://demo.wazuh.info/45001/bundles/plugin/wazuh/wazuh.chunk.11.js:48
p https://demo.wazuh.info/45001/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:428
p https://demo.wazuh.info/45001/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:428
$digest https://demo.wazuh.info/45001/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:428
evalAsync https://demo.wazuh.info/45001/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:428
completeTask https://demo.wazuh.info/45001/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:428
r https://demo.wazuh.info/45001/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:428
setTimeout handler*un/i.defer https://demo.wazuh.info/45001/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:428
$evalAsync https://demo.wazuh.info/45001/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:428
wazuh.chunk.10.js:5:5085522
Details of Scenario with a video
@damarisg damarisg changed the title Uncaught (in promise) Error: Error: No agent information was returned (1701) - Agent does not exist Console error when I have an agent selected and environment change Jul 28, 2023
@davidjiglesias davidjiglesias added level/task Task issue type/bug Bug issue labels Jul 31, 2023
@gdiazlo
Copy link
Member

gdiazlo commented Aug 2, 2023

This is a known issue, present in older versions of Wazuh. The use case for this feature needs to be reworked. This should not be a stopper for 4.5.0.

@davidjiglesias davidjiglesias added the qa/known Issues that are already known by the QA team label Aug 29, 2023
@asteriscos
Copy link
Member

We will investigate the optimal solution for this in a future release.

@asteriscos
Copy link
Member

This fix will be fixed in this issue, that refactors the pinned agent management.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
level/task Task issue qa/known Issues that are already known by the QA team type/bug Bug issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants