Skip to content

[BUG] Error while calling api/stats?extended=true&legacy=true&exclude_usage=false #6376

@LDrago27

Description

@LDrago27

Describe the bug

While using the API api/stats?extended=true&legacy=true&exclude_usage=false. We see following error in console.
server log [22:53:51.746] [warning][collector-set][plugins][usageCollection] TypeError: Cannot destructure property 'index' of '(intermediate value).kibana' as it is undefined. at UsageCollector.fetch (/home/ubuntu/opensearchwork/OpenSearch-Dashboards-0721/OpenSearch-Dashboards/src/plugins/vis_type_vega/server/usage_collector/get_usage_collector.ts:154:15) at processTicksAndRejections (node:internal/process/task_queues:95:5) at /home/ubuntu/opensearchwork/OpenSearch-Dashboards-0721/OpenSearch-Dashboards/src/plugins/usage_collection/server/collector/collector_set.ts:150:21 at async Promise.all (index 10) at CollectorSet.bulkFetch (/home/ubuntu/opensearchwork/OpenSearch-Dashboards-0721/OpenSearch-Dashboards/src/plugins/usage_collection/server/collector/collector_set.ts:144:23) at CollectorSet.bulkFetchUsage (/home/ubuntu/opensearchwork/OpenSearch-Dashboards-0721/OpenSearch-Dashboards/src/plugins/usage_collection/server/collector/collector_set.ts:177:12) at getUsage (/home/ubuntu/opensearchwork/OpenSearch-Dashboards-0721/OpenSearch-Dashboards/src/plugins/usage_collection/server/routes/stats/stats.ts:80:19) at async Promise.all (index 0) at /home/ubuntu/opensearchwork/OpenSearch-Dashboards-0721/OpenSearch-Dashboards/src/plugins/usage_collection/server/routes/stats/stats.ts:125:38 at Router.handle (/home/ubuntu/opensearchwork/OpenSearch-Dashboards-0721/OpenSearch-Dashboards/src/core/server/http/router/router.ts:286:44) at handler (/home/ubuntu/opensearchwork/OpenSearch-Dashboards-0721/OpenSearch-Dashboards/src/core/server/http/router/router.ts:241:11) at exports.Manager.execute (/home/ubuntu/opensearchwork/OpenSearch-Dashboards-0721/OpenSearch-Dashboards/node_modules/@hapi/hapi/lib/toolkit.js:60:28) at Object.internals.handler (/home/ubuntu/opensearchwork/OpenSearch-Dashboards-0721/OpenSearch-Dashboards/node_modules/@hapi/hapi/lib/handler.js:46:20) at exports.execute (/home/ubuntu/opensearchwork/OpenSearch-Dashboards-0721/OpenSearch-Dashboards/node_modules/@hapi/hapi/lib/handler.js:31:20) at Request._lifecycle (/home/ubuntu/opensearchwork/OpenSearch-Dashboards-0721/OpenSearch-Dashboards/node_modules/@hapi/hapi/lib/request.js:371:32) at Request._execute (/home/ubuntu/opensearchwork/OpenSearch-Dashboards-0721/OpenSearch-Dashboards/node_modules/@hapi/hapi/lib/request.js:281:9) server log [22:53:51.758] [warning][collector-set][plugins][usageCollection] Unable to fetch data from vis_type_vega collector
To Reproduce
Steps to reproduce the behavior:

  1. Run opensearch dashboards
  2. Call the /api/stats?extended=true&legacy=true&exclude_usage=false important include the exclude_usage=false flag

Expected behavior
No Error should be reported in the console.

OpenSearch Version
3.0.0

Dashboards Version
3.0.0

Plugins

Please list all plugins currently enabled.

Screenshots

If applicable, add screenshots to help explain your problem.

Host/Environment (please complete the following information):

  • OS: [e.g. iOS]
  • Browser and version [e.g. 22]

Additional context

Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions