ahmed-adly-khalil opened a new issue, #25955:
URL: https://github.com/apache/superset/issues/25955
A clear and concise description of what the bug is.
#### How to reproduce the bug
I created a new dashboard and used the client SDK instructions to create the
guest token and embed it in the react app
### Expected results
be able to embed the dashboard in react app
### Actual results
got the below error in the superset k8s pod logs
```2023-11-10 16:16:28,289:ERROR:flask_appbuilder.api:'NoneType' object has
no attribute 'name'
Traceback (most recent call last):
File
"/usr/local/lib/python3.9/site-packages/flask_appbuilder/api/__init__.py", line
110, in wraps
return f(self, *args, **kwargs)
File "/app/superset/views/users/api.py", line 92, in get_my_roles
user = bootstrap_user_data(g.user, include_perms=True)
File "/app/superset/views/utils.py", line 97, in bootstrap_user_data
roles, permissions = get_permissions(user)
File "/app/superset/views/utils.py", line 111, in get_permissions
roles_permissions = security_manager.get_user_roles_permissions(user)
File
"/usr/local/lib/python3.9/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'
```
#### Screenshots
<img width="659" alt="Screenshot 2023-11-10 at 12 51 59 PM"
src="https://github.com/apache/superset/assets/36244069/58d01925-3754-4916-807a-f84636e19bf4">
### Environment
(please complete the following information):
- browser type and version: latest chrome
- superset version: `superset version` helm superset-0.10.14
- python version: `python --version`
- node.js version: `node -v`
- any feature flags active:
### Checklist
Make sure to follow these steps before submitting your issue - thank you!
- [x] I have checked the superset logs for python stacktraces and included
it here as text if there are any.
- [x] I have reproduced the issue with at least the latest released version
of superset.
- [x] I have checked the issue tracker for the same issue and I haven't
found one similar.
### Additional context
this is how i request the token now
``` payload := map[string]interface{}{
"user": map[string]string{
"username": "guest",
"first_name": "Stan",
"last_name": "Lee",
},
"resources": []map[string]string{
{
"type": "dashboard",
"id": dashboardId,
},
},
"rls": []interface{}{},
}
guestURL := "https://mydomain/api/v1/security/guest_token"
```
--
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]