-
Notifications
You must be signed in to change notification settings - Fork 14k
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
Error on embedded dashboard after upgrading to 3.1.1: "Guest user cannot modify chart payload" #27177
Comments
Please check #26749. |
Thanks for the response! After more testing, if I wait on the embedded page for a while, it sometimes starts working when I refresh the chart. I have checked logs and the requests in dev tools, but I can't see any difference between the requests that work and the requests that produce this error, other than a session cookie changing. |
@betodealmeida could you take a look? |
same issue here, all our chart show that guest user (Gamma role) can not set filter neither show charts. |
+1 |
Ping @sadpandajoe |
I wonder if anything changed in the way we generate Can anyone affected share the |
I've removed the columns here, but I did verify that they match. |
Thanks, let me try to repro it. |
For more info, I have tried to downgrade to 3.1.0, and it works well |
I had left a comment after the fact (though I probably should have created an issue earlier) on that here: #26749 (comment) |
We are encountering the same problem following an upgrade from V3.1.0 to V4.0.0rc1. most of the charts and all the filters are showing the following error(Guest user cannot modify chart payload) |
Same here - downgrade to 3.1.0 resolved it. Simple charts, such as our Table chart, are still working, but other visualizations such as the pie chart are not. |
Same problem for us too |
For now we had to comment out that raise error code on our local deploys, and it works as before. |
I'm getting this error on the main (master) branch, building with docker, how can I downgrade that modification on the code, without changing the whole code base? |
You can add a patch step to your build to modify just that file with the changes you need. We did the same as a build step, by overwriting just that file with the updated file with commented/removed code. |
Maybe an explicit superset flag to turn off this security feature will help. Thank you. |
@ilndinesh source patched it works, definitively an env to be checked would be good, thanks. |
Hello folks is there any progresss with the issue ? |
+1 (version 3.0.4) |
Sample problem in version 4.1.0rc1. Reverted to 3.1.0 work for me! |
same from 3.0.3 to 3.0.4 |
@betodealmeida Reopening the issue as it looks like the issue persists for some use cases even after #27484. |
Hello folks, pls how do I downgrade from 3.1.1 to 3.1.0 |
Hi @talk2morris. There are no migrations between 3.1.1 and 3.1.0. You can just download/point to the previous patch. |
It would be helpful if folks here could check if the issue persists after #27484 as @JurajBurian mentioned here. It would be helpful to determine if it's only a specific case that's still failing or if there are others. Given the nature of the bug, please provide as much detail as possible. |
@michael-s-molina I tested this using the apache/superset:735b895 docker image (correct me if I am wrong, but I believe that refers to the #27484 merge commit). I am still getting the same error. |
@michael-s-molina thanks, actually I have downgraded to 3.1.0 and it solved the issue. |
I patched latest docker image (and also manager.py looks as actual in master) and I believe that first change in my patch was correct. I replaced return True on False on the line 158 in sanity check: # sanity checks
if form_data is None or stored_chart is None:
return False this is probably correct, because in same case one (or maybe both) of values is None in the condition. And this patch was almost "correct", but for some cases then type cast exception occured - as I mentioned in my remark.
|
Thanks for the details @JurajBurian. Please open a specific issue for the Postgres problem. |
Taking a look. |
Thanks @betodealmeida for the fix 🙏🏼 |
I tested this using the apache/superset:36290ce docker image and it seems to have fixed the issue! |
Downgrading to |
Same issue here.... I had to downgrade my superset version from 3.1.1 to 3.1.0. it sucks as 3.1.1 version has resolved some bugs like "Full screen error" in embedded UI. |
3.1.2 is up for testing/voting now (as is 4.0, incidentally) |
Hi @Attachai77, I don't know if this is a solution but I solved the problem by removing the "datasource access on table..." right on my specific role. |
Hello @enzo-dechaene , Thank you for your reply, the below is my permissions which no any "datasource access on table..." , Could you please show me your guest permissions for work or tell me my some permission wrong , Thanks. |
It fix the problem for me, can you check using Gamma role instead ? it will help to know if it's a role problem |
I will try it. |
@Attachai77 I was testing v4.0 docker image and imported some dashboards from v3.1.0 and still see the issue on some charts. I then opened the problem charts in explore and saved them again (no changes just save) and they appear to work ok. so maybe persisting something in chart definition somewhere |
@justin-tomlinson I did it, but not work. the same error. 😭 |
I encountered the issue "Guest user cannot modify chart payload" in version 4.0 after importing dashboards from version 3.1. To resolve this, I opened the affected chart and saved it again. I believe there is a minor difference in the chart data structure between these versions that causes this error. Notably, this issue occurs only with the Pie Chart and Big Number chart. |
If you're still encountering this in current versions, please add additional context here: #28446 |
For me this was resolved by upgrading to 4.0.2 from 3.1.1 |
Bug description
After upgrading from 3.1.0 to 3.1.1, dashboards and filters no longer work and give this error: "Guest user cannot modify chart payload". I didn't change any permissions, and I even tried changing GUEST_ROLE_NAME to "Admin", but it still didn't work. I can see that the POST request to /api/v1/chart/data is coming back with 403, but I can't tell what is causing it.
How to reproduce the bug
Using the Docker 3.1.1 image:
Screenshots/recordings
No response
Superset version
3.1.1
Python version
I don't know
Node version
I don't know
Browser
Chrome
Additional context
Logs:
SupersetErrorException
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1823, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1799, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "/usr/local/lib/python3.9/site-packages/flask_appbuilder/security/decorators.py", line 95, in wraps
return f(self, *args, **kwargs)
File "/app/superset/views/base_api.py", line 127, in wraps
raise ex
File "/app/superset/views/base_api.py", line 121, in wraps
duration, response = time_function(f, self, *args, **kwargs)
File "/app/superset/utils/core.py", line 1463, in time_function
response = func(*args, **kwargs)
File "/app/superset/utils/log.py", line 255, in wrapper
value = f(*args, **kwargs)
File "/app/superset/charts/data/api.py", line 235, in data
command.validate()
File "/app/superset/commands/chart/data/get_data_command.py", line 68, in validate
self._query_context.raise_for_access()
File "/app/superset/common/query_context.py", line 137, in raise_for_access
self._processor.raise_for_access()
File "/app/superset/common/query_context_processor.py", line 754, in raise_for_access
security_manager.raise_for_access(query_context=self._query_context)
File "/app/superset/security/manager.py", line 1960, in raise_for_access
raise SupersetSecurityException(
superset.exceptions.SupersetSecurityException: Guest user cannot modify chart payload
2024-02-20 19:57:34,465:WARNING:superset.views.base:SupersetErrorException
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1823, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1799, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "/usr/local/lib/python3.9/site-packages/flask_appbuilder/security/decorators.py", line 95, in wraps
return f(self, *args, **kwargs)
File "/app/superset/views/base_api.py", line 127, in wraps
raise ex
File "/app/superset/views/base_api.py", line 121, in wraps
duration, response = time_function(f, self, *args, **kwargs)
File "/app/superset/utils/core.py", line 1463, in time_function
response = func(*args, **kwargs)
File "/app/superset/utils/log.py", line 255, in wrapper
value = f(*args, **kwargs)
File "/app/superset/charts/data/api.py", line 235, in data
command.validate()
File "/app/superset/commands/chart/data/get_data_command.py", line 68, in validate
self._query_context.raise_for_access()
File "/app/superset/common/query_context.py", line 137, in raise_for_access
self._processor.raise_for_access()
File "/app/superset/common/query_context_processor.py", line 754, in raise_for_access
security_manager.raise_for_access(query_context=self._query_context)
File "/app/superset/security/manager.py", line 1960, in raise_for_access
raise SupersetSecurityException(
superset.exceptions.SupersetSecurityException: Guest user cannot modify chart payload
172.20.0.1 - - [20/Feb/2024:19:57:34 +0000] "POST /api/v1/chart/data?form_data=%7B%22slice_id%22%3A108%7D&dashboard_id=65 HTTP/1.1" 403 149 "http://localhost:8088/embedded/3f11daf2-84ac-4c8f-80aa-e9310b488fe7" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36"
Checklist
The text was updated successfully, but these errors were encountered: