GitHub user dosubot[bot] added a comment to the discussion: Random http error 404 on embedded Superset Dashboards (“Unexpecter error”)
<!-- Greeting --> Hi @Username93788! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the superset team. <!-- Answer --> This is a known issue with embedded Superset dashboards, especially when opening multiple tabs with guest tokens and async queries enabled. The random 404 and "Unexpected error" messages are usually caused by race conditions in guest token propagation, async query handling, or frontend parsing errors. Refreshing the page works because it reinitializes the session and token context. Common causes include: guest tokens expiring or not being properly associated with the dashboard/chart, feature flags (like EMBEDDED_SUPERSET, DrillBy, DrillToDetail) not being enabled, async queries with polling transport causing cache key mismatches, and CSRF token conflicts when loading multiple dashboards concurrently. These issues are documented in several threads and code references ([example](https://github.com/apache/superset/issues/33561), [example](https://github.com/apache/superset/issues/34813), [example](https://github.com/apache/superset/discussions/33507)). Troubleshooting steps: - Make sure all required feature flags are enabled. - Confirm guest tokens are valid, not expired, and include the correct dashboard/chart resources. - If using async queries, try disabling GLOBAL_ASYNC_QUERIES for embedded dashboards, or ensure embedding is done from the same domain as Superset ([details](https://github.com/apache/superset/issues/33561)). - Check that datasets/charts exist and IDs are correct. - For CSRF issues, consider sequentially loading dashboards or synchronizing tokens across components ([details](https://github.com/apache/superset/discussions/33507)). - If using the @superset-ui/embedded-sdk, call unmount() when destroying dashboard components and monitor token expiration settings ([details](https://github.com/apache/superset/issues/35261)). - Inspect the browser console for JSON parsing errors or network errors on /api/v1/chart or /api/v1/dataset endpoints. There is no official fix for this in 4.1.x, but disabling async queries or requiring manual refresh are current workarounds. If you need more targeted help, check the dev console for specific failing endpoints or error codes. <!-- 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/34a35999-9ba7-4d67-bb9b-a12034b156da?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/34a35999-9ba7-4d67-bb9b-a12034b156da?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/34a35999-9ba7-4d67-bb9b-a12034b156da?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/34a35999-9ba7-4d67-bb9b-a12034b156da?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/34a35999-9ba7-4d67-bb9b-a12034b156da?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/34a35999-9ba7-4d67-bb9b-a12034b156da?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/34a35999-9ba7-4d67-bb9b-a12034b156da?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)& nbsp;[](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/35982) GitHub link: https://github.com/apache/superset/discussions/35982#discussioncomment-14868230 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
