dosubot[bot] commented on issue #37310:
URL: https://github.com/apache/superset/issues/37310#issuecomment-3780976289

   <!-- Answer -->
   You're correct—issue #33702 is unrelated. That issue is about Docker 
configuration problems causing the "Embed dashboard" button not to appear in 
the UI, due to feature flags not being picked up from config files, not about 
runtime feature flag initialization or console errors in embedded dashboards 
that are already working ([see 
#33702](https://github.com/apache/superset/issues/33702)).
   
   For your case: the actual root cause of the console errors is that 
embedded/index.tsx does not call initFeatureFlags(), so window.featureFlags 
remains undefined. This is confirmed by the code—there is no call to 
initFeatureFlags() in embedded/index.tsx, which leads to isFeatureEnabled() 
logging "Failed to query feature flag" errors when it tries to access 
window.featureFlags ([see 
embedded/index.tsx](https://github.com/apache/superset/blob/master/superset-frontend/src/embedded/index.tsx)).
 Initializing feature flags from bootstrapData, as is done in regular mode, 
will resolve these errors.
   
   
   <!-- Dosu Comment Footer -->
   *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*
   
   ---
   <sup>How did I do? 
[Good](https://app.dosu.dev/response-feedback/1a35538f-40a5-4297-bcd7-3af807af63f2?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/1a35538f-40a5-4297-bcd7-3af807af63f2?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/1a35538f-40a5-4297-bcd7-3af807af63f2?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/1a35538f-40a5-4297-bcd7-3af807af63f2?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/1a35538f-40a5-4297-bcd7-3af807af63f2?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/1a35538f-40a5-4297-bcd7-3af807af63f2?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/1a35538f-40a5-4297-bcd7-3af807af63f2?feedback_type=other)</sup>
   
   [![Chat with 
Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)&nbsp;[![Open
 in 
Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=You%27re%20correct%E2%80%94issue%20%2333702%20is%20unrelated.%20That%20issue%20is%20about%20Docker%20configuration%20problems%20causing%20the%20%22Embed%20dashboard%22%20button%20not%20to%20appear%20in%20the%20UI%2C%20due%20to%20feature%20flags%20not%20being%20picked%20up%20from%20config%20files%2C%20not%20about%20runtime%20feature%20flag%20initialization%20or%20console%20errors%20in%20embedded%20dashboards%20that%20are%20already%20working%C2%A0%28%5Bsee%20%2333702%5D%28https%3A//github.com/apache/superset/issues/33702%29%29.%0A%0AFor%20your%20case%3A%20the%20actual%20root%20cause%20of%20the%20console%20errors%20is%20that%20embedded/index.tsx%20does%20not%20call%20initFeatureFlags%28%29%2C%20so%20window.featureFlags%20remains%20undefined.%20This%20
 
is%20confirmed%20by%20the%20code%E2%80%94there%20is%20no%20call%20to%20initFeatureFlags%28%29%20in%20embedded/index.tsx%2C%20which%20leads%20to%20isFeatureEnabled%28%29%20logging%20%22Failed%20to%20query%20feature%20flag%22%20errors%20when%20it%20tries%20to%20access%20window.featureFlags%C2%A0%28%5Bsee%20embedded/index.tsx%5D%28https%3A//github.com/apache/superset/blob/master/superset-frontend/src/embedded/index.tsx%29%29.%20Initializing%20feature%20flags%20from%20bootstrapData%2C%20as%20is%20done%20in%20regular%20mode%2C%20will%20resolve%20these%20errors.)&nbsp;[![Join
 
Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share
 on 
X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/37310)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to