dosubot[bot] commented on issue #34130: URL: https://github.com/apache/superset/issues/34130#issuecomment-3060583193
<!-- Greeting --> Hi @msshroff! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the superset team. <!-- Answer --> This is a known bug in Superset's SQL Lab state management. When you switch databases, sometimes the frontend stores the database ID as a string (like `mysql-MySQL-5` or `postgresql-examples-1`) instead of a numeric ID. This causes all subsequent API calls for any database to fail with 404 errors, breaking SQL Lab for all databases until you reload or log out and back in. The backend expects a numeric database ID, so when it receives a string, it can't find the database and returns a 404. This also explains the 400 errors on `/tabstateview/`—the backend can't insert the invalid database ID into the tab state model, so it rejects the request. This bug is not specific to MySQL or Clickhouse; it can happen with any database if the frontend state gets corrupted. There is no robust recovery except to reload or log out/in, which resets the frontend state and restores functionality. Defensive type checking is needed on both the frontend and backend to prevent this, but as of now, no fix has landed in recent releases or PRs. More details and similar reports are discussed [here](https://github.com/apache/superset/issues/33935). For now, if you hit this state, reload the page or log out and back in to reset SQL Lab. Avoid using non-standard or slug-like database names if possible, and keep an eye on future releases for a fix. <!-- 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/a61d8884-a34e-4510-9f44-888c2b580b10?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/a61d8884-a34e-4510-9f44-888c2b580b10?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/a61d8884-a34e-4510-9f44-888c2b580b10?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/a61d8884-a34e-4510-9f44-888c2b580b10?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/a61d8884-a34e-4510-9f44-888c2b580b10?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/a61d8884-a34e-4510-9f44-888c2b580b10?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/a61d8884-a34e-4510-9f44-888c2b580b10?feedback_type=other)</sup> [](https://go.dosu.dev/discord-bot) [! [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/34130) -- 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]
