MatthewCurlerTAC commented on issue #41862:
URL: https://github.com/apache/superset/issues/41862#issuecomment-4907394749
- I have tested and sending as a csv fails with `SESSION_COOKIE_SECURE`
being `True` and `False`. Same goes for Talisman config.
- All other content types send successfully: the worker is able to
communicate with app, successfully authenticate, and load the chart; this is
something specific to the csv export.
- The superset_app logs throw the same error regardless of the cookie_secure
settings:
```
WARNING:superset.views.error_handling:Exception
Traceback (most recent call last):
File "/app/.venv/lib/python3.10/site-packages/flask/app.py", line 1484, in
full_dispatch_request
rv = self.dispatch_request()
File "/app/.venv/lib/python3.10/site-packages/flask/app.py", line 1469, in
dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File
"/app/.venv/lib/python3.10/site-packages/flask_appbuilder/security/decorators.py",
line 128, in wraps
return f(self, *args, **kwargs)
File "/app/superset/views/base_api.py", line 127, in wraps
duration, response = time_function(f, self, *args, **kwargs)
File "/app/superset/utils/core.py", line 1600, in time_function
response = func(*args, **kwargs)
File "/app/superset/utils/log.py", line 299, in wrapper
value = f(*args, add_extra_log_payload=log, **kwargs)
File "/app/superset/charts/data/api.py", line 249, in get_data
return self._get_data_response(
File "/app/superset/utils/log.py", line 301, in wrapper
value = f(*args, **kwargs)
File "/app/superset/charts/data/api.py", line 582, in _get_data_response
return self._send_chart_response(
File "/app/superset/charts/data/api.py", line 464, in _send_chart_response
result = apply_client_processing(result, form_data, datasource)
File "/app/superset/utils/log.py", line 301, in wrapper
value = f(*args, **kwargs)
File "/app/superset/charts/client_processing.py", line 354, in
apply_client_processing
StringIO(data),
TypeError: initial_value must be str or None, not bytes
ERROR:superset.views.error_handling:initial_value must be str or None, not
bytes
Traceback (most recent call last):
File "/app/.venv/lib/python3.10/site-packages/flask/app.py", line 1484, in
full_dispatch_request
rv = self.dispatch_request()
File "/app/.venv/lib/python3.10/site-packages/flask/app.py", line 1469, in
dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File
"/app/.venv/lib/python3.10/site-packages/flask_appbuilder/security/decorators.py",
line 128, in wraps
return f(self, *args, **kwargs)
File "/app/superset/views/base_api.py", line 127, in wraps
duration, response = time_function(f, self, *args, **kwargs)
File "/app/superset/utils/core.py", line 1600, in time_function
response = func(*args, **kwargs)
File "/app/superset/utils/log.py", line 299, in wrapper
value = f(*args, add_extra_log_payload=log, **kwargs)
File "/app/superset/charts/data/api.py", line 249, in get_data
return self._get_data_response(
File "/app/superset/utils/log.py", line 301, in wrapper
value = f(*args, **kwargs)
File "/app/superset/charts/data/api.py", line 582, in _get_data_response
return self._send_chart_response(
File "/app/superset/charts/data/api.py", line 464, in _send_chart_response
result = apply_client_processing(result, form_data, datasource)
File "/app/superset/utils/log.py", line 301, in wrapper
value = f(*args, **kwargs)
File "/app/superset/charts/client_processing.py", line 354, in
apply_client_processing
StringIO(data),
TypeError: initial_value must be str or None, not bytes
172.18.0.6 - - [07/Jul/2026:18:37:46 +0000] "GET
/api/v1/chart/252/data/?format=csv&type=post_processed&force=true HTTP/1.1" 500
243 "-" "Python-urllib/3.10"
```
The logs for a successfully executed alert with `text` content type (all
other settings are the same):
**Worker**
```
[2026-07-07 18:43:51,618: INFO/MainProcess] Task
reports.execute[9256829f-4dbb-4ce3-904c-8faa7e150614] received
[2026-07-07 18:43:51,621: INFO/ForkPoolWorker-1] Executing alert/report,
task id: 9256829f-4dbb-4ce3-904c-8faa7e150614, scheduled_dttm:
2026-07-07T18:43:51.573383+00:00
[2026-07-07 18:43:51,621: INFO/ForkPoolWorker-1] session is validated: id 5,
executionid: 9256829f-4dbb-4ce3-904c-8faa7e150614
[2026-07-07 18:43:51,891: INFO/ForkPoolWorker-1] Query for
9256829f-4dbb-4ce3-904c-8faa7e150614 took 223.76 ms
[2026-07-07 18:43:52,734: INFO/ForkPoolWorker-1] DataFrame generation from
http://superset_app:8088/api/v1/chart/252/data/?format=json&type=post_processed&force=true
as user [email protected] took 0.82s - execution_id:
9256829f-4dbb-4ce3-904c-8faa7e150614
[2026-07-07 18:43:55,386: INFO/ForkPoolWorker-1] Report sent to email,
task_id: 9256829f-4dbb-4ce3-904c-8faa7e150614, notification content is
{'notification_type': 'Alert', 'notification_source':
<ReportSourceFormat.CHART: 'chart'>, 'notification_format': 'TEXT', 'chart_id':
252, 'dashboard_id': None, 'owners': [Owner Name], 'slack_channels': [],
'execution_id': '9256829f-4dbb-4ce3-904c-8faa7e150614'}
[2026-07-07 18:43:55,397: INFO/ForkPoolWorker-1] Report execution as user
[email protected] completed in 3.77s - execution_id:
9256829f-4dbb-4ce3-904c-8faa7e150614
[2026-07-07 18:43:55,400: INFO/ForkPoolWorker-1] Task
reports.execute[9256829f-4dbb-4ce3-904c-8faa7e150614] succeeded in
3.779876146931201s: None
```
**App**
```
1.2.3.4 - - [07/Jul/2026:18:43:47 +0000] "GET
/api/v1/report/?q=(filters:!((col:type,opr:eq,value:Alert)),order_column:name,order_direction:desc,page:0,page_size:25)
HTTP/1.1" 200 792
"https://superset.example.com/alert/list/?pageIndex=0&sortColumn=name&sortOrder=desc"
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like
Gecko) Chrome/150.0.0.0 Safari/537.36 Edg/150.0.0.0"
INFO:superset.commands.report.execute_now:Manually executing report schedule
<Report_Name> (id: 5), execution_id: 9256829f-4dbb-4ce3-904c-8faa7e150614
DEBUG:superset.stats_logger:[stats_logger] (incr)
ReportScheduleRestApi.execute.success
DEBUG:superset.stats_logger:[stats_logger] (timing)
ReportScheduleRestApi.execute.time | 55.32274302095175
1.2.3.4 - - [07/Jul/2026:18:43:51 +0000] "POST /api/v1/report/5/execute
HTTP/1.1" 200 115
"https://superset.example.com/alert/list/?pageIndex=0&sortColumn=name&sortOrder=desc"
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like
Gecko) Chrome/150.0.0.0 Safari/537.36 Edg/150.0.0.0"
DEBUG:superset.models.core:Database._get_sqla_engine(). Masked URL:
starrocks://<db_user>:[email protected]:9030/default_catalog.dmh
DEBUG:superset.common.query_object:QueryObject CACHE KEY generated:
953e778aa323478521eccd8c50b36bafdc0c8060f350bd407f9ebd5ef193fb83 from dict with
keys: ['changed_on', 'columns', 'datasource', 'extra_cache_keys', 'extras',
'filter', 'granularity', 'group_others_when_limit_reached', 'inner_from_dttm',
'inner_to_dttm', 'is_rowcount', 'is_timeseries', 'metrics', 'order_desc',
'orderby', 'post_processing', 'result_type', 'rls', 'row_limit', 'row_offset',
'series_columns', 'series_limit', 'series_limit_metric',
'time_compare_full_range', 'time_shift']
```
--
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]