apache / superset

Apache Superset is a Data Visualization and Data Exploration Platform
https://superset.apache.org/
Apache License 2.0
62.39k stars 13.71k forks source link

Failed to report on Slack #30595

Open yokonsan opened 1 week ago

yokonsan commented 1 week ago

Bug description

Deployment Method: K8S

When reporting to Slack, there was an error in requesting report data: Failed generating dataframe HTTP Error 401: UNAUTHORIZED

After restarting the worker container, the first report succeeds, but subsequent attempts all result in a 401 error.

Screenshots/recordings

image

Superset version

4.0.2

Python version

I don't know

Node version

I don't know

Browser

Chrome

Additional context

No response

Checklist

dosubot[bot] commented 1 week ago

Hey @yokonsan! 👋 I'm here to help you with your bug report and answer any questions you have. I'm a bot designed to assist with bug troubleshooting, offer solutions, and guide you to become a contributor. Let's squash this bug together!

The HTTP 401 error when generating a dataframe in Superset could be related to authentication issues. Here are a few things to check:

  1. Session Management: Ensure that session cookies are properly managed and not expiring unexpectedly. Superset uses Flask-Login for session management, and the session lifetime can be configured with PERMANENT_SESSION_LIFETIME [1].

  2. Token Expiration: If you're using OAuth2 for data source access, verify that the access tokens are valid and not expired. Superset attempts to refresh tokens if a refresh token is available, but if both are invalid, it will result in a 401 error [2].

  3. Slack Integration: Check the SLACK_API_TOKEN configuration to ensure it's correctly set and not causing authentication issues [3].

  4. Kubernetes Configuration: Ensure that your Kubernetes deployment is correctly handling environment variables and secrets related to authentication.

Review these areas to identify potential misconfigurations or expired tokens that might be causing the issue.

To continue talking to Dosu, mention @dosu.