You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "theromsh (via GitHub)" <gi...@apache.org> on 2024/04/15 06:55:51 UTC
[I] Dashboard links are leading to Internal Error when user is not logged in [superset]
theromsh opened a new issue, #28029:
URL: https://github.com/apache/superset/issues/28029
### Bug description
We are using apache-superset version 3.0.3
When a user that is not logged in tries to reach a dashboard link (e.g: https://<superset-domain>/superset/dashboard/<dashboard_id>/) he get Internal server error (500)
The error message in logs
> Traceback (most recent call last):
File \"/home/build/.pyzr/venvs/superset-bl5I_M_4-py3.10/lib/python3.10/site-packages/flask/app.py\", line 1823, in full_dispatch_request
rv = self.dispatch_request()
File \"/home/build/.pyzr/venvs/superset-bl5I_M_4-py3.10/lib/python3.10/site-packages/flask/app.py\", line 1799, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File \"/home/build/.pyzr/venvs/superset-bl5I_M_4-py3.10/lib/python3.10/site-packages/flask_appbuilder/security/decorators.py\", line 137, in wraps
return f(self, *args, **kwargs)
File \"/home/build/.pyzr/venvs/superset-bl5I_M_4-py3.10/lib/python3.10/site-packages/superset/utils/log.py\", line 253, in wrapper
value = f(*args, add_extra_log_payload=log, **kwargs)
File \"/home/build/.pyzr/venvs/superset-bl5I_M_4-py3.10/lib/python3.10/site-packages/superset/views/core.py\", line 898, in dashboard
\"user\": bootstrap_user_data(g.user, include_perms=True),
File \"/home/build/.pyzr/venvs/superset-bl5I_M_4-py3.10/lib/python3.10/site-packages/superset/views/utils.py\", line 97, in bootstrap_user_data
roles, permissions = get_permissions(user)
File \"/home/build/.pyzr/venvs/superset-bl5I_M_4-py3.10/lib/python3.10/site-packages/superset/views/utils.py\", line 111, in get_permissions
roles_permissions = security_manager.get_user_roles_permissions(user)
File \"/home/build/.pyzr/venvs/superset-bl5I_M_4-py3.10/lib/python3.10/site-packages/flask_appbuilder/security/sqla/manager.py\", line 420, in get_user_roles_permissions
result[role.name] = []
AttributeError: 'NoneType' object has no attribute 'name'
I think it's important to mention that are using Google/ Dex for authentication so we `SupersetSecurityManager` override with `CustomSsoSecurityManager` based on [this](https://superset.apache.org/docs/installation/configuring-superset/#custom-oauth2-configuration) doc

### How to reproduce the bug
1. Go to a randomly superset's dashboard page
2. Copy this link
3. Log out from your account
4. Go to the copied link
### Screenshots/recordings
_No response_
### Superset version
3.1.2
### Python version
3.10
### Node version
16
### Browser
Chrome
### Additional context
_No response_
### Checklist
- [X] I have searched Superset docs and Slack and didn't find a solution to my problem.
- [ ] I have searched the GitHub issue tracker and didn't find a similar bug report.
- [X] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
--
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.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
Re: [I] Dashboard links are leading to Internal Error when user is not logged in [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas closed issue #28029: Dashboard links are leading to Internal Error when user is not logged in
URL: https://github.com/apache/superset/issues/28029
--
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
Re: [I] Dashboard links are leading to Internal Error when user is not logged in [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #28029:
URL: https://github.com/apache/superset/issues/28029#issuecomment-2059466689
Ahh... then perhaps @dpgaspar will have some insight.
--
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
Re: [I] Dashboard links are leading to Internal Error when user is not logged in [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #28029:
URL: https://github.com/apache/superset/issues/28029#issuecomment-2057479148
Are you actually seeing a 500 in your logs? This seems truthful. According to your error, it sounds like on line 420, you should throw a 403 and/or redirect to the login page.
--
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
Re: [I] Dashboard links are leading to Internal Error when user is not logged in [superset]
Posted by "meska (via GitHub)" <gi...@apache.org>.
meska commented on issue #28029:
URL: https://github.com/apache/superset/issues/28029#issuecomment-2186224978
I was able to pass this error with
` AUTH_ROLE_PUBLIC = "Public" `
in superset_config.py
--
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
Re: [I] Dashboard links are leading to Internal Error when user is not logged in [superset]
Posted by "theromsh (via GitHub)" <gi...@apache.org>.
theromsh commented on issue #28029:
URL: https://github.com/apache/superset/issues/28029#issuecomment-2058916610
> Are you actually seeing a 500 in your logs? This seems truthful. According to your error, it sounds like on line 420, you should throw a 403 and/or redirect to the login page.
It's within `flask_appbuilder` python package. I can't control that.
--
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
Re: [I] Dashboard links are leading to Internal Error when user is not logged in [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #28029:
URL: https://github.com/apache/superset/issues/28029#issuecomment-2738178927
Hoping the above comment helped the original author. This has been silent for 9 months, so I'll close it as stale/solved, but it sounds like a config issue more than a bug anyway. We can take it to GitHub Discussions or Slack if it needs further attention.
--
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