You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "brunoams (via GitHub)" <gi...@apache.org> on 2023/07/11 16:44:00 UTC
[GitHub] [superset] brunoams opened a new issue, #24666: Embedded dashboard, how to handle refresh token (angular)
brunoams opened a new issue, #24666:
URL: https://github.com/apache/superset/issues/24666
### Summary:
Hello everyone. I encountered this problem of not being able to refresh the token after 5 minutes on the dashboard screen and noticed that there isn't a very clear solution to this issue, at least I didn't find one.
Including this Issue that attempts to address the same topic: #20817
### Problem:
The error occurs as follows:
1. We enter the dashboard screen;
2. The dashboards load normally;
3. After 5 minutes, if you try to do anything, apply filters, etc., it returns this error:
```
This endpoint requires the datasource app1_demo.tbl_1_locationwise, database or `all_datasource_access` permission
```
### Solution:
After doing some debugging, I noticed that the component uses `Buffer` to handle the first `token`, and then creates a `setTimeout` to refresh it every 5 minutes.


In my case, I saw that `Buffer` was `null`.
So, basically I solved it in the way I'll describe below.
- I installed the `Buffer` package `npm install Buffer`
- In the `index.html` file I added:
```
<script>
var global = global || window;
</script>
```
- In the `polyfills.ts` file, add this line of code:
`global.Buffer = global.Buffer || require('buffer').Buffer;`
The resolution was based on this stackoverflow question: https://stackoverflow.com/a/50377270/10580566
--
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
[GitHub] [superset] brunoams closed issue #24666: Embedded dashboard, how to handle refresh token (angular)
Posted by "brunoams (via GitHub)" <gi...@apache.org>.
brunoams closed issue #24666: Embedded dashboard, how to handle refresh token (angular)
URL: https://github.com/apache/superset/issues/24666
--
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