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

While logging in, Apache superset it redirects me back to login page #24783

Closed
valkiara opened this issue Jul 24, 2023 · 2 comments
Closed

While logging in, Apache superset it redirects me back to login page #24783

valkiara opened this issue Jul 24, 2023 · 2 comments

Comments

@valkiara
Copy link

A clear and concise description of what the bug is.
I have istalled Apache Superset with docker compose, I can log in from local browser but if I try to log in from remote browser I am redirected to log in page, no matter it's wrong or right password without any messages in console.

I checked logs from Superset docker container and found this error:
"The CSRF session token is missing."

Then I updated WTF_CSRF_ENABLED to false, after restarting services I don't get that error message anymore but still I am redirecte to logon page.

Here is log from my container:
logging was configured successfully
2023-07-24 11:32:05,325:INFO:superset.utils.logging_configurator:logging was configured successfully
2023-07-24 11:32:05,337:INFO:root:Configured event logger of type <class 'superset.utils.log.DBEventLogger'>
Loaded your LOCAL configuration at [/app/docker/pythonpath_dev/superset_config.py]
192.168.16.1 - - [24/Jul/2023:11:32:18 +0000] "GET /login/?next=/ HTTP/1.1" 200 51554 "http://192.168.7.252:8088/login/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"
HTTPException
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1823, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1799, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "/usr/local/lib/python3.9/site-packages/flask/scaffold.py", line 331, in send_static_file
return send_from_directory(
File "/usr/local/lib/python3.9/site-packages/flask/helpers.py", line 590, in send_from_directory
return werkzeug.utils.send_from_directory( # type: ignore[return-value]
File "/usr/local/lib/python3.9/site-packages/werkzeug/utils.py", line 578, in send_from_directory
raise NotFound()
werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
2023-07-24 11:32:18,552:WARNING:superset.views.base:HTTPException
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1823, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1799, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "/usr/local/lib/python3.9/site-packages/flask/scaffold.py", line 331, in send_static_file
return send_from_directory(
File "/usr/local/lib/python3.9/site-packages/flask/helpers.py", line 590, in send_from_directory
return werkzeug.utils.send_from_directory( # type: ignore[return-value]
File "/usr/local/lib/python3.9/site-packages/werkzeug/utils.py", line 578, in send_from_directory
raise NotFound()
werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
192.168.16.1 - - [24/Jul/2023:11:32:18 +0000] "GET /static/appbuilder/css/bootstrap.min.css.map HTTP/1.1" 404 334 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"
2023-07-24 11:32:27,064:INFO:flask_wtf.csrf:The CSRF session token is missing.
Refresh CSRF token error
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/flask_wtf/csrf.py", line 261, in protect
validate_csrf(self._get_csrf_token())
File "/usr/local/lib/python3.9/site-packages/flask_wtf/csrf.py", line 103, in validate_csrf
raise ValidationError("The CSRF session token is missing.")
wtforms.validators.ValidationError: The CSRF session token is missing.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1821, in full_dispatch_request
rv = self.preprocess_request()
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 2313, in preprocess_request
rv = self.ensure_sync(before_func)()
File "/usr/local/lib/python3.9/site-packages/flask_wtf/csrf.py", line 229, in csrf_protect
self.protect()
File "/usr/local/lib/python3.9/site-packages/flask_wtf/csrf.py", line 264, in protect
self._error_response(e.args[0])
File "/usr/local/lib/python3.9/site-packages/flask_wtf/csrf.py", line 307, in _error_response
raise CSRFError(reason)
flask_wtf.csrf.CSRFError: 400 Bad Request: The CSRF session token is missing.
2023-07-24 11:32:27,065:WARNING:superset.views.base:Refresh CSRF token error
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/flask_wtf/csrf.py", line 261, in protect
validate_csrf(self._get_csrf_token())
File "/usr/local/lib/python3.9/site-packages/flask_wtf/csrf.py", line 103, in validate_csrf
raise ValidationError("The CSRF session token is missing.")
wtforms.validators.ValidationError: The CSRF session token is missing.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1821, in full_dispatch_request
rv = self.preprocess_request()
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 2313, in preprocess_request
rv = self.ensure_sync(before_func)()
File "/usr/local/lib/python3.9/site-packages/flask_wtf/csrf.py", line 229, in csrf_protect
self.protect()
File "/usr/local/lib/python3.9/site-packages/flask_wtf/csrf.py", line 264, in protect
self._error_response(e.args[0])
File "/usr/local/lib/python3.9/site-packages/flask_wtf/csrf.py", line 307, in _error_response
raise CSRFError(reason)
flask_wtf.csrf.CSRFError: 400 Bad Request: The CSRF session token is missing.
192.168.16.1 - - [24/Jul/2023:11:32:27 +0000] "POST /login/?next=/ HTTP/1.1" 302 201 "http://192.168.7.252:8088/login/?next=/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"
192.168.16.1 - - [24/Jul/2023:11:32:27 +0000] "GET /login/ HTTP/1.1" 200 51550 "http://192.168.7.252:8088/login/?next=/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"
HTTPException
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1823, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1799, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "/usr/local/lib/python3.9/site-packages/flask/scaffold.py", line 331, in send_static_file
return send_from_directory(
File "/usr/local/lib/python3.9/site-packages/flask/helpers.py", line 590, in send_from_directory
return werkzeug.utils.send_from_directory( # type: ignore[return-value]
File "/usr/local/lib/python3.9/site-packages/werkzeug/utils.py", line 578, in send_from_directory
raise NotFound()
werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
2023-07-24 11:32:27,470:WARNING:superset.views.base:HTTPException
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1823, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1799, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "/usr/local/lib/python3.9/site-packages/flask/scaffold.py", line 331, in send_static_file
return send_from_directory(
File "/usr/local/lib/python3.9/site-packages/flask/helpers.py", line 590, in send_from_directory
return werkzeug.utils.send_from_directory( # type: ignore[return-value]
File "/usr/local/lib/python3.9/site-packages/werkzeug/utils.py", line 578, in send_from_directory
raise NotFound()
werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.

@sfirke
Copy link
Member

sfirke commented Jul 24, 2023

Possible duplicate of #24579

@sfirke
Copy link
Member

sfirke commented Aug 10, 2023

Closing as duplicate of #24579

@sfirke sfirke closed this as completed Aug 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants