-
Notifications
You must be signed in to change notification settings - Fork 14.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The filters bar crashes randomly in an embedded dashboard #32282
Comments
I found a similar unsolved discussion titled Unexpected JSON error when embedding, which might be related to the issue you're experiencing. Additionally, there was a closed issue, Dashboard Filter 'useFilterScope' Error, which was resolved by a pull request that involved optional chaining for a possibly nullable parent attribute in the Regarding the JSON syntax error, the Superset frontend code includes error handling mechanisms for JSON parsing errors. The If the error persists, you might want to investigate the specific conditions under which the error occurs, such as the types of filters being applied or removed, to help isolate the cause. To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other |
I have no idea why your discussion got closed but the stack trace there gives me better clue for debugging. Can you search for the tag attribute It's this LoC that crashed the page. |
This is the {'config': {'GUEST_TOKEN_HEADER_NAME': 'X-GuestToken'}, 'common': {'conf': {'SUPERSET_WEBSERVER_TIMEOUT': 60, 'SUPERSET_DASHBOARD_POSITION_DATA_LIMIT': 65535, 'SUPERSET_DASHBOARD_PERIODICAL_REFRESH_LIMIT': 0, 'SUPERSET_DASHBOARD_PERIODICAL_REFRESH_WARNING_MESSAGE': null, 'ENABLE_JAVASCRIPT_CONTROLS': null, 'DEFAULT_SQLLAB_LIMIT': 1000, 'DEFAULT_VIZ_TYPE': 'table', 'SQL_MAX_ROW': 100000, 'SUPERSET_WEBSERVER_DOMAINS': null, 'SQLLAB_SAVE_WARNING_MESSAGE': null, 'SQLLAB_DEFAULT_DBID': null, 'DISPLAY_MAX_ROW': 10000, 'GLOBAL_ASYNC_QUERIES_TRANSPORT': 'polling', 'GLOBAL_ASYNC_QUERIES_POLLING_DELAY': 500, 'SQL_VALIDATORS_BY_ENGINE': {'presto': 'PrestoDBSQLValidator', 'postgresql': 'PostgreSQLValidator'}, 'SQLALCHEMY_DOCS_URL': null, 'SQLALCHEMY_DISPLAY_TEXT': null, 'GLOBAL_ASYNC_QUERIES_WEBSOCKET_URL': 'ws://127.0.0.1:8080/', 'DASHBOARD_AUTO_REFRESH_MODE': 'force', 'DASHBOARD_AUTO_REFRESH_INTERVALS': [[0, 'Don't refresh'], [10, '10 seconds'], [30, '30 seconds'], [60, '1 minute'], [300, '5 minutes'], [1800, '30 minutes'], [3600, '1 hour'], [21600, '6 hours'], [43200, '12 hours'], [86400, '24 hours']], 'DASHBOARD_VIRTUALIZATION': null, 'SCHEDULED_QUERIES': {}, 'EXCEL_EXTENSIONS': ['xls', 'xlsx'], 'CSV_EXTENSIONS': ['txt', 'tsv', 'csv'], 'COLUMNAR_EXTENSIONS': ['zip', 'parquet'], 'ALLOWED_EXTENSIONS': ['tsv', 'zip', 'xls', 'csv', 'txt', 'parquet', 'xlsx'], 'SAMPLES_ROW_LIMIT': 1000, 'DEFAULT_TIME_FILTER': 'No filter', 'HTML_SANITIZATION': true, 'HTML_SANITIZATION_SCHEMA_EXTENSIONS': {}, 'WELCOME_PAGE_LAST_TAB': 'all', 'VIZ_TYPE_DENYLIST': [], 'ALERT_REPORTS_DEFAULT_CRON_VALUE': '0 0 * * *', 'ALERT_REPORTS_DEFAULT_RETENTION': 90, 'ALERT_REPORTS_DEFAULT_WORKING_TIMEOUT': 3600, 'NATIVE_FILTER_DEFAULT_ROW_LIMIT': 1000, 'PREVENT_UNSAFE_DEFAULT_URLS_ON_DATASET': true, 'JWT_ACCESS_CSRF_COOKIE_NAME': 'csrf_access_token', 'SQLLAB_QUERY_RESULT_TIMEOUT': 0, 'ALERT_REPORTS_NOTIFICATION_METHODS': ['Email'], 'HAS_GSHEETS_INSTALLED': true}, 'locale': 'en', 'language_pack': {'domain': 'superset', 'locale_data': {'superset': {'': {'domain': 'superset', 'plural_forms': 'nplurals=2; plural=(n != 1)', 'lang': 'en'}}}}, 'd3_format': {}, 'd3_time_format': {}, 'currencies': ['USD', 'EUR', 'GBP', 'INR', 'MXN', 'JPY', 'CNY'], 'feature_flags': {'DRUID_JOINS': false, 'DYNAMIC_PLUGINS': false, 'DISABLE_LEGACY_DATASOURCE_EDITOR': true, 'ENABLE_TEMPLATE_PROCESSING': true, 'ENABLE_JAVASCRIPT_CONTROLS': false, 'KV_STORE': false, 'PRESTO_EXPAND_DATA': false, 'THUMBNAILS': false, 'ENABLE_DASHBOARD_SCREENSHOT_ENDPOINTS': false, 'ENABLE_DASHBOARD_DOWNLOAD_WEBDRIVER_SCREENSHOT': false, 'SHARE_QUERIES_VIA_KV_STORE': false, 'TAGGING_SYSTEM': false, 'SQLLAB_BACKEND_PERSISTENCE': true, 'LISTVIEWS_DEFAULT_CARD_VIEW': false, 'ESCAPE_MARKDOWN_HTML': false, 'DASHBOARD_CROSS_FILTERS': true, 'DASHBOARD_VIRTUALIZATION': true, 'GLOBAL_ASYNC_QUERIES': false, 'EMBEDDED_SUPERSET': true, 'ALERT_REPORTS': false, 'ALERT_REPORT_TABS': false, 'ALERT_REPORT_SLACK_V2': false, 'DASHBOARD_RBAC': true, 'ENABLE_ADVANCED_DATA_TYPES': false, 'ALERTS_ATTACH_REPORTS': true, 'ALLOW_FULL_CSV_EXPORT': false, 'ALLOW_ADHOC_SUBQUERY': false, 'USE_ANALAGOUS_COLORS': false, 'RLS_IN_SQLLAB': false, 'IMPERSONATE_WITH_EMAIL_PREFIX': false, 'CACHE_IMPERSONATION': false, 'CACHE_QUERY_BY_USER': false, 'EMBEDDABLE_CHARTS': true, 'DRILL_TO_DETAIL': true, 'DRILL_BY': true, 'DATAPANEL_CLOSED_BY_DEFAULT': false, 'HORIZONTAL_FILTER_BAR': false, 'ESTIMATE_QUERY_COST': false, 'SSH_TUNNELING': false, 'AVOID_COLORS_COLLISION': true, 'MENU_HIDE_USER_INFO': false, 'ENABLE_SUPERSET_META_DB': false, 'PLAYWRIGHT_REPORTS_AND_THUMBNAILS': false, 'CHART_PLUGINS_EXPERIMENTAL': false, 'SQLLAB_FORCE_RUN_ASYNC': false, 'ENABLE_FACTORY_RESET_COMMAND': false, 'SLACK_ENABLE_AVATARS': false}, 'extra_sequential_color_schemes': [], 'extra_categorical_color_schemes': [], 'theme_overrides': {}, 'menu_data': {'menu': [], 'brand': {'path': '/superset/welcome/', 'icon': '/static/assets/images/superset-logo-horiz.png', 'alt': 'Superset', 'tooltip': '', 'text': ''}, 'environment_tag': {'color': '', 'text': ''}, 'navbar_right': {'show_watermark': false, 'bug_report_url': null, 'bug_report_icon': null, 'bug_report_text': 'Report a bug', 'documentation_url': null, 'documentation_icon': null, 'documentation_text': 'Documentation', 'version_string': '4.1.1', 'version_sha': '', 'build_number': null, 'languages': {'en': {'flag': 'us', 'name': 'English', 'url': '/lang/en'}}, 'show_language_picker': false, 'user_is_anonymous': true, 'user_info_url': '/users/userinfo/', 'user_logout_url': '/logout/', 'user_login_url': '/login/', 'locale': 'en'}}, 'flash_messages': []}, 'embedded': {'dashboard_id': 10}} This looks correct to me, i don't know what it means by unexpected |
Not really. I tossed the value into an online JSON validator and it reports to be invalid at this section ![]() If you don't mind, can you go into the Superset container and modify this LoC with following value |
Looks like that wasn't it, changed the LoC to JSON: {'config': {'GUEST_TOKEN_HEADER_NAME': 'X-GuestToken'}, 'common': {'conf': {'SUPERSET_WEBSERVER_TIMEOUT': 60, 'SUPERSET_DASHBOARD_POSITION_DATA_LIMIT': 65535, 'SUPERSET_DASHBOARD_PERIODICAL_REFRESH_LIMIT': 0, 'SUPERSET_DASHBOARD_PERIODICAL_REFRESH_WARNING_MESSAGE': null, 'ENABLE_JAVASCRIPT_CONTROLS': null, 'DEFAULT_SQLLAB_LIMIT': 1000, 'DEFAULT_VIZ_TYPE': 'table', 'SQL_MAX_ROW': 100000, 'SUPERSET_WEBSERVER_DOMAINS': null, 'SQLLAB_SAVE_WARNING_MESSAGE': null, 'SQLLAB_DEFAULT_DBID': null, 'DISPLAY_MAX_ROW': 10000, 'GLOBAL_ASYNC_QUERIES_TRANSPORT': 'polling', 'GLOBAL_ASYNC_QUERIES_POLLING_DELAY': 500, 'SQL_VALIDATORS_BY_ENGINE': {'presto': 'PrestoDBSQLValidator', 'postgresql': 'PostgreSQLValidator'}, 'SQLALCHEMY_DOCS_URL': null, 'SQLALCHEMY_DISPLAY_TEXT': null, 'GLOBAL_ASYNC_QUERIES_WEBSOCKET_URL': 'ws://127.0.0.1:8080/', 'DASHBOARD_AUTO_REFRESH_MODE': 'force', 'DASHBOARD_AUTO_REFRESH_INTERVALS': [[0, 'Do Not Refresh'], [10, '10 seconds'], [30, '30 seconds'], [60, '1 minute'], [300, '5 minutes'], [1800, '30 minutes'], [3600, '1 hour'], [21600, '6 hours'], [43200, '12 hours'], [86400, '24 hours']], 'DASHBOARD_VIRTUALIZATION': null, 'SCHEDULED_QUERIES': {}, 'EXCEL_EXTENSIONS': ['xls', 'xlsx'], 'CSV_EXTENSIONS': ['tsv', 'txt', 'csv'], 'COLUMNAR_EXTENSIONS': ['zip', 'parquet'], 'ALLOWED_EXTENSIONS': ['tsv', 'zip', 'txt', 'csv', 'parquet', 'xls', 'xlsx'], 'SAMPLES_ROW_LIMIT': 1000, 'DEFAULT_TIME_FILTER': 'No filter', 'HTML_SANITIZATION': true, 'HTML_SANITIZATION_SCHEMA_EXTENSIONS': {}, 'WELCOME_PAGE_LAST_TAB': 'all', 'VIZ_TYPE_DENYLIST': [], 'ALERT_REPORTS_DEFAULT_CRON_VALUE': '0 0 * * *', 'ALERT_REPORTS_DEFAULT_RETENTION': 90, 'ALERT_REPORTS_DEFAULT_WORKING_TIMEOUT': 3600, 'NATIVE_FILTER_DEFAULT_ROW_LIMIT': 1000, 'PREVENT_UNSAFE_DEFAULT_URLS_ON_DATASET': true, 'JWT_ACCESS_CSRF_COOKIE_NAME': 'csrf_access_token', 'SQLLAB_QUERY_RESULT_TIMEOUT': 0, 'ALERT_REPORTS_NOTIFICATION_METHODS': ['Email'], 'HAS_GSHEETS_INSTALLED': true}, 'locale': 'en', 'language_pack': {'domain': 'superset', 'locale_data': {'superset': {'': {'domain': 'superset', 'plural_forms': 'nplurals=2; plural=(n != 1)', 'lang': 'en'}}}}, 'd3_format': {}, 'd3_time_format': {}, 'currencies': ['USD', 'EUR', 'GBP', 'INR', 'MXN', 'JPY', 'CNY'], 'feature_flags': {'DRUID_JOINS': false, 'DYNAMIC_PLUGINS': false, 'DISABLE_LEGACY_DATASOURCE_EDITOR': true, 'ENABLE_TEMPLATE_PROCESSING': true, 'ENABLE_JAVASCRIPT_CONTROLS': false, 'KV_STORE': false, 'PRESTO_EXPAND_DATA': false, 'THUMBNAILS': false, 'ENABLE_DASHBOARD_SCREENSHOT_ENDPOINTS': false, 'ENABLE_DASHBOARD_DOWNLOAD_WEBDRIVER_SCREENSHOT': false, 'SHARE_QUERIES_VIA_KV_STORE': false, 'TAGGING_SYSTEM': false, 'SQLLAB_BACKEND_PERSISTENCE': true, 'LISTVIEWS_DEFAULT_CARD_VIEW': false, 'ESCAPE_MARKDOWN_HTML': false, 'DASHBOARD_CROSS_FILTERS': true, 'DASHBOARD_VIRTUALIZATION': true, 'GLOBAL_ASYNC_QUERIES': false, 'EMBEDDED_SUPERSET': true, 'ALERT_REPORTS': false, 'ALERT_REPORT_TABS': false, 'ALERT_REPORT_SLACK_V2': false, 'DASHBOARD_RBAC': true, 'ENABLE_ADVANCED_DATA_TYPES': false, 'ALERTS_ATTACH_REPORTS': true, 'ALLOW_FULL_CSV_EXPORT': false, 'ALLOW_ADHOC_SUBQUERY': false, 'USE_ANALAGOUS_COLORS': false, 'RLS_IN_SQLLAB': false, 'IMPERSONATE_WITH_EMAIL_PREFIX': false, 'CACHE_IMPERSONATION': false, 'CACHE_QUERY_BY_USER': false, 'EMBEDDABLE_CHARTS': true, 'DRILL_TO_DETAIL': true, 'DRILL_BY': true, 'DATAPANEL_CLOSED_BY_DEFAULT': false, 'HORIZONTAL_FILTER_BAR': false, 'ESTIMATE_QUERY_COST': false, 'SSH_TUNNELING': false, 'AVOID_COLORS_COLLISION': true, 'MENU_HIDE_USER_INFO': false, 'ENABLE_SUPERSET_META_DB': false, 'PLAYWRIGHT_REPORTS_AND_THUMBNAILS': false, 'CHART_PLUGINS_EXPERIMENTAL': false, 'SQLLAB_FORCE_RUN_ASYNC': false, 'ENABLE_FACTORY_RESET_COMMAND': false, 'SLACK_ENABLE_AVATARS': false}, 'extra_sequential_color_schemes': [], 'extra_categorical_color_schemes': [], 'theme_overrides': {}, 'menu_data': {'menu': [], 'brand': {'path': '/superset/welcome/', 'icon': '/static/assets/images/superset-logo-horiz.png', 'alt': 'Superset', 'tooltip': '', 'text': ''}, 'environment_tag': {'color': '', 'text': ''}, 'navbar_right': {'show_watermark': false, 'bug_report_url': null, 'bug_report_icon': null, 'bug_report_text': 'Report a bug', 'documentation_url': null, 'documentation_icon': null, 'documentation_text': 'Documentation', 'version_string': '4.1.1', 'version_sha': '', 'build_number': null, 'languages': {'en': {'flag': 'us', 'name': 'English', 'url': '/lang/en'}}, 'show_language_picker': false, 'user_is_anonymous': true, 'user_info_url': '/users/userinfo/', 'user_logout_url': '/logout/', 'user_login_url': '/login/', 'locale': 'en'}}, 'flash_messages': []}, 'embedded': {'dashboard_id': 10}} |
I have the app running in production, let me see if i can get the custom image to work. Also wouldn't it be easier to just replace |
It's better to sanitize with a proper battle-tested library than to have a crude replacement. Be careful with debugging on production! I was under impression you are working with dev Superset instance instead 🥵 |
Bug description
The filters bar crashes randomly in an embedded dashboard when trying to apply/remove filters. I have not been able to isolate the cause, it just happens randomly when trying to test.
Sometimes it works, but sometimes even just selecting the filter causes this issue.
The error message is also ambiguous so i have nothing to go off of, Any help would be appreciated.
By the way, refreshing or re-calling the embedDashboard function does render it normally but it loses all the filters applied previously, forcing to start again.
Screenshots/recordings
Screen Recording of it happening

Superset version
4.1.1
Python version
Not applicable
Node version
Not applicable
Browser
Chrome
Additional context
No response
Checklist
The text was updated successfully, but these errors were encountered: