You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "gervarela (via GitHub)" <gi...@apache.org> on 2023/04/18 11:47:11 UTC

[GitHub] [superset] gervarela commented on issue #23380: Opening chart in embedded dashboard leads to error (GuestUser has no attribute get_user_id)

gervarela commented on issue #23380:
URL: https://github.com/apache/superset/issues/23380#issuecomment-1512940320

   Hello,
   
   I'm seeing the same error, also with 2.0.1, but I'm getting it just by opening the dashboard embedded into other applications.
   
   The dashboard works fine, reviewn with the 'developer tools of the browser', one off the calls gest a 500 error as response, and the logs shows thesse error:
   
   `2023-04-18 07:11:53,745:ERROR:root:'GuestUser' object has no attribute 'get_user_id'
   Traceback (most recent call last):
     File "/usr/local/lib/python3.8/site-packages/flask_appbuilder/api/__init__.py", line 86, in wraps
       return f(self, *args, **kwargs)
     File "/app/superset/utils/log.py", line 245, in wrapper
       value = f(*args, **kwargs)
     File "/app/superset/dashboards/filter_state/api.py", line 98, in post
       return super().post(pk)
     File "/app/superset/views/base_api.py", line 83, in wraps
       return f(self, *args, **kwargs)
     File "/app/superset/temporary_cache/api.py", line 76, in post
       key = self.get_create_command()(args).run()
     File "/app/superset/temporary_cache/commands/create.py", line 35, in run
       return self.create(self._cmd_params)
     File "/app/superset/dashboards/filter_state/commands/create.py", line 41, in create
       entry: Entry = {"owner": get_owner(actor), "value": value}
     File "/app/superset/key_value/utils.py", line 70, in get_owner
       return user.get_user_id() if not user.is_anonymous else None
   AttributeError: 'GuestUser' object has no attribute 'get_user_id'`รง
   
   The call is a POST to: https://xxxxx.com/api/v1/dashboard/11/filter_state?tab_id=1
   
   The error only happens the user is not logged in into the Superset instance in another browser tab. If the use is logged in, the request doesn't fails.
   
   It looks like a bug when accesseing the dashboards with the GUEST user.
   
   


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org