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

[Fleet]: _hit$_source4.components.map is not a function error pop-up is repeatedly displayed on restarting service for Orphaned agents. #6572

Closed
amolnater-qasource opened this issue Jan 17, 2025 · 11 comments · Fixed by elastic/kibana#207746
Labels
bug Something isn't working impact:medium QA:Validated Validated by the QA Team Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team

Comments

@amolnater-qasource
Copy link

Kibana Build details:

VERSION: 9.0.0 SNAPSHOT
BUILD: 82760
COMMIT: ba92d08a58d67bc832078f52c8401d9e66598220

Preconditions:

  1. 9.0.0 SNAPSHOT Kibana cloud environment should be available.
  2. A few agents should be installed with Elastic Defend.

Steps to reproduce:

  1. Navigate to Agents tab.
  2. Stop agent service so that agent gets into orphaned state.
  3. Now restart the service and observe _hit$_source4.components.map is not a function error pop-up.

Expected Result:
_hit$_source4.components.map is not a function error pop-up should not be displayed on restarting service for Orphaned agents.

NOTE:

  • Errors get resolved after sometime.

Screen Recording:

Agents.-.Fleet.-.Elastic.-.Google.Chrome.2025-01-17.10-28-09.mp4
@amolnater-qasource amolnater-qasource added bug Something isn't working impact:medium Team:Fleet Label for the Fleet team labels Jan 17, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@amolnater-qasource
Copy link
Author

@muskangulati-qasource Please review.

@muskangulati-qasource
Copy link

Secondary review is Done for this ticket!

@juliaElastic
Copy link
Contributor

juliaElastic commented Jan 21, 2025

I've tried to reproduce locally on latest main, and not seeing the error.
@amolnater-qasource Do you you still have the cloud instance running where the error is reproduced? Could you share the login details? Thanks!

Image

I found one place in the code where _source.components.map is used, probably comes from there, but this code hasn't changed for a long time: https://github.com/elastic/kibana/blob/fb8a17ba04f493cd5a0d0ba33c002750150fd0af/x-pack/platform/plugins/shared/fleet/server/services/agents/helpers.ts#L45

@juliaElastic juliaElastic self-assigned this Jan 21, 2025
@amolnater-qasource
Copy link
Author

Hi @juliaElastic

We have revalidated this issue on latest 9.0.0 SNAPSHOT and found it still reproducible.

Screen Recording:

Agents.-.Fleet.-.Elastic.-.Google.Chrome.2025-01-22.14-00-15.mp4

Build details:
VERSION: 9.0.0 SNAPSHOT
BUILD: 82885
COMMIT: 939c9fb71ee5c23c0e54b017fdea44ce0c6de5cb

Just an update that error is observed immediately after we start the Elastic Agent service which was in orphaned state.
Error will be visible for approximately 30 seconds.

Further, I'll be sharing the environment details with you over slack.

Thanks!!

@juliaElastic
Copy link
Contributor

It seems that the root cause of this issue is that the agent components field has briefly a string value instead of array when restarting the orphaned agent. Added a fix in the UI so we don't show an error.
I'll transfer the issue to the agent repo to investigate why components is not an array.

@juliaElastic juliaElastic transferred this issue from elastic/kibana Jan 22, 2025
@jlind23 jlind23 added Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team and removed Team:Fleet Label for the Fleet team QA:Ready For Testing Code is merged and ready for QA to validate labels Jan 23, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)

@kenza-ab
Copy link

Any update regarding this issue ?

@richlv
Copy link

richlv commented Feb 20, 2025

For the record, we're hitting this on 8.17.2, cannot use a lot of the fleet functionality - fails both in the UI and via the API.

@juliaElastic
Copy link
Contributor

The fix is available from 8.18.0.

@amolnater-qasource amolnater-qasource added the QA:Ready For Testing Code is merged and ready for QA to validate label Feb 20, 2025
@amolnater-qasource
Copy link
Author

Hi Team,

We have revalidated this issue on latest 9.0-SNAPSHOT and found it fixed now.

Observations:

  • No error pop-up is be displayed on restarting service for Orphaned agents.

Build details:
VERSION: 9.0.0 SNAPSHOT
BUILD: 84188
COMMIT: 5c231847869504d37f8f4f5ac098a42429ee854c

Screen Recording:

Agents.-.Fleet.-.Elastic.-.Google.Chrome.2025-03-27.16-15-32.mp4

Hence, we are closing and marking this issue as QA:Validated.

Thanks!

@amolnater-qasource amolnater-qasource added QA:Validated Validated by the QA Team and removed QA:Ready For Testing Code is merged and ready for QA to validate labels Mar 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working impact:medium QA:Validated Validated by the QA Team Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants