Discover Code loading race condition with embeddables #70470
Labels
bug
Fixes for quality problems that affect the customer experience
Feature:Discover
Discover Application
Team:Visualizations
Visualization editors, elastic-charts and infrastructure
Kibana version: 7.8
Describe the bug: In some cases the "search" embeddable is registered too late, causing the embeddable to fail to render in a dashboard.
Steps to reproduce:
Put a saved search on a dashboard and reload (multiple times). This depends on the specific timing of requests
Seen here:
https://discuss.elastic.co/t/embeddable-factory-embeddablefactoryid-search-does-not-exist/239270
Expected behavior:
The search embeddable should always be registered in the setup phase with async steps.
Any additional context:
This can happen because code is loaded async before the embeddable is registered:
kibana/src/plugins/discover/public/plugin.ts
Line 350 in 684aa68
This means it's not registered in the setup phase and can leak into the start phase. We should register the factory during setup, then load the actual embeddable and other stuff async when it's used the first time.
The text was updated successfully, but these errors were encountered: