Skip to content
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

Embed dashboard on v2.0 generates the following error and throws a 500 internal server error #21987

Closed
tharunkc-93 opened this issue Nov 1, 2022 · 0 comments · Fixed by #22462
Labels
#bug Bug report

Comments

@tharunkc-93
Copy link

tharunkc-93 commented Nov 1, 2022

Error log below for reference

'LoginManager' object has no attribute 'reload_user' Traceback (most recent call last): File "/root/superset/lib/python3.8/site-packages/flask/app.py", line 1523, in full_dispatch_request rv = self.dispatch_request() File "/root/superset/lib/python3.8/site-packages/flask/app.py", line 1509, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args) File "/root/superset/lib/python3.8/site-packages/superset/utils/log.py", line 243, in wrapper value = f(*args, add_extra_log_payload=log, **kwargs) File "/root/superset/lib/python3.8/site-packages/superset/embedded/view.py", line 60, in embedded login_manager.reload_user(AnonymousUserMixin()) AttributeError: 'LoginManager' object has no attribute 'reload_user' 2022-11-01 11:35:46,896:ERROR:superset.views.base:'LoginManager' object has no attribute 'reload_user' Traceback (most recent call last): File "/root/superset/lib/python3.8/site-packages/flask/app.py", line 1523, in full_dispatch_request rv = self.dispatch_request() File "/root/superset/lib/python3.8/site-packages/flask/app.py", line 1509, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args) File "/root/superset/lib/python3.8/site-packages/superset/utils/log.py", line 243, in wrapper value = f(*args, add_extra_log_payload=log, **kwargs) File "/root/superset/lib/python3.8/site-packages/superset/embedded/view.py", line 60, in embedded login_manager.reload_user(AnonymousUserMixin()) AttributeError: 'LoginManager' object has no attribute 'reload_user'

WhatsApp Image 2022-11-01 at 12 10 26 AM

@tharunkc-93 tharunkc-93 added the #bug Bug report label Nov 1, 2022
@tharunkc-93 tharunkc-93 changed the title Embed dashboard on v2.0 generates the following error Embed dashboard on v2.0 generates the following error and throws a 500 internal server error Nov 1, 2022
Usiel added a commit to Usiel/superset that referenced this issue Jan 11, 2023
Due to a breaking change in Flask-Login (maxcountryman/flask-login#378) the code for logging in our the AnonymousUser breaks. Unfortunately, Flask-Login not only renames the method we need, but also makes it quasi-private. We can switch to a different public util function Flask-Login offers since at least version 0.3.0. In all versions I checked it essentially executes the same steps as `reload_user(...)` did (it additionally signals the login event internally, which shouldn't cause issues).

Fixes apache#21987
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
#bug Bug report
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant