mbenz95 opened a new issue, #23380: URL: https://github.com/apache/superset/issues/23380
I have an embedded superset dashboard in my application When I click on the title of a chart (or on 'Edit Chart' in the three-dot menu) I expect it to open in superset or to to bring me to the login page of superset but the embedded UI only shows the error message `An error occurred while opening Explore` If I am logged in into superset on another browser tab, this works fine and a new tab opens with the chart (as the user logged in on the other tab). The superset_app container throws the following error (if not logged-in in another tab): ``` 2023-03-15 08:08:29,138:ERROR:root:'GuestUser' object has no attribute 'get_user_id' 2023-03-15T08:08:29.138837700Z Traceback (most recent call last): 2023-03-15T08:08:29.138840600Z File "/usr/local/lib/python3.8/site-packages/flask_appbuilder/api/__init__.py", line 86, in wraps 2023-03-15T08:08:29.138842900Z return f(self, *args, **kwargs) 2023-03-15T08:08:29.138844900Z File "/app/superset/utils/log.py", line 245, in wrapper 2023-03-15T08:08:29.138846900Z value = f(*args, **kwargs) 2023-03-15T08:08:29.138849100Z File "/app/superset/views/base_api.py", line 83, in wraps 2023-03-15T08:08:29.138851200Z return f(self, *args, **kwargs) 2023-03-15T08:08:29.138853300Z File "/app/superset/explore/form_data/api.py", line 113, in post 2023-03-15T08:08:29.138855400Z key = CreateFormDataCommand(args).run() 2023-03-15T08:08:29.138867600Z File "/app/superset/explore/form_data/commands/create.py", line 57, in run 2023-03-15T08:08:29.138870100Z "owner": get_owner(actor), 2023-03-15T08:08:29.138872100Z File "/app/superset/key_value/utils.py", line 70, in get_owner 2023-03-15T08:08:29.138874100Z return user.get_user_id() if not user.is_anonymous else None 2023-03-15T08:08:29.138876300Z AttributeError: 'GuestUser' object has no attribute 'get_user_id' ``` It looks like this action does not work for work for a guest user but I would at least expect superset to open a login page or similar to allow the user to log in. I tried different roles for the guest user with the GUEST_ROLE_NAME config option. I have the role set to 'Admin' which leads to the described error. I also tried to set the role to 'Gamma' which leads to a 404, presumably because editing the chart is not allowed for this role. I also correctly set the user in the `/api/v1/security/guest_token/` endpoint but for me it didn't have any effect which user I passed here. This looks like a bug but its also possible that I am missing some configuration option. I appreciate any help on how to solve this on my side if possible. Info: Superset 2.0.1 running in docker-container (using docker-compose provided by this repo) OS: Windows 10 Steps to reproduce: - Create dashboard with any chart in superset - Embed dashboard with superset-embedded-sdk - Configure guest role with: GUEST_ROLE_NAME = "Admin" - Click on chart title inside embedded dashboard (make sure to not be logged-in in superset in another tab) - Check logs of the superset_app container to see the error -- 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]
