trepmag opened a new issue #14070: URL: https://github.com/apache/superset/issues/14070
Anonymous users get the following flash message while browsing chars or dashboards lists: "There was an error fetching the favorite status: Internal Server Error". ### Expected results The above described flash message shouldn't appears! ### Actual results The above described flash message appears! #### Screenshots  #### How to reproduce the bug 1. Go to http://localhost:9000/chart/list/ or http://localhost:9000/dashboard/list/ without login 1. Wait page load 1. See the above described flash message ### Environment - superset version: `1.0.1` (git) - python version: `3.7.9` (docker env) - node.js version: `12` (docker env) ### Logs #### Browser ``` GET http://localhost:9000/api/v1/dashboard/favorite_status/?q=%21%284%2C2%2C1%29 Status: 500 INTERNAL SERVER ERROR ``` #### Superset app ``` superset_app | ERROR:root:'AnonymousUserMixin' object has no attribute 'id' superset_app | Traceback (most recent call last): superset_app | File "/usr/local/lib/python3.7/site-packages/flask_appbuilder/api/__init__.py", line 84, in wraps superset_app | return f(self, *args, **kwargs) superset_app | File "/app/superset/views/base_api.py", line 79, in wraps superset_app | duration, response = time_function(f, self, *args, **kwargs) superset_app | File "/app/superset/utils/core.py", line 1289, in time_function superset_app | response = func(*args, **kwargs) superset_app | File "/usr/local/lib/python3.7/site-packages/flask_appbuilder/api/__init__.py", line 154, in wraps superset_app | return f(self, *args, **kwargs) superset_app | File "/app/superset/utils/log.py", line 164, in wrapper superset_app | value = f(*args, **kwargs) superset_app | File "/app/superset/dashboards/api.py", line 662, in favorite_status superset_app | favorited_dashboard_ids = DashboardDAO.favorited_ids(dashboards, g.user.id) superset_app | File "/usr/local/lib/python3.7/site-packages/werkzeug/local.py", line 347, in __getattr__ superset_app | return getattr(self._get_current_object(), name) superset_app | AttributeError: 'AnonymousUserMixin' object has no attribute 'id' superset_app | 192.168.112.1 - - [10/Apr/2021 11:36:59] "GET /api/v1/dashboard/favorite_status/?q=%21%284%2C2%2C1%29 HTTP/1.1" 500 - superset_app | INFO:werkzeug:192.168.112.1 - - [10/Apr/2021 11:36:59] "GET /api/v1/dashboard/favorite_status/?q=%21%284%2C2%2C1%29 HTTP/1.1" 500 - ``` -- 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. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
