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

login issue - fresh install - ubuntu 18.04 #298

Closed
cromulon-actual opened this issue Mar 16, 2020 · 3 comments
Closed

login issue - fresh install - ubuntu 18.04 #298

cromulon-actual opened this issue Mar 16, 2020 · 3 comments

Comments

@cromulon-actual
Copy link

cromulon-actual commented Mar 16, 2020

Upon starting LXDUI 2.1.2 after a clean install following the wiki instructions, lxdui starts, and I can navigate to the login page. However, when using the default login nothing happens. Looking at the cli while the process is running, I get the below error:

Traceback (most recent call last):
  File "/root/.local/lib/python3.6/site-packages/flask/app.py", line 1612, in full_dispatch_request
    rv = self.dispatch_request()
  File "/root/.local/lib/python3.6/site-packages/flask/app.py", line 1598, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/root/.local/lib/python3.6/site-packages/flask_jwt/__init__.py", line 176, in decorator
    _jwt_required(realm or current_app.config['JWT_DEFAULT_REALM'])
  File "/root/.local/lib/python3.6/site-packages/flask_jwt/__init__.py", line 155, in _jwt_required
    headers={'WWW-Authenticate': 'JWT realm="%s"' % realm})
flask_jwt.JWTError: Authorization Required. Request does not contain an access token

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/root/.local/lib/python3.6/site-packages/flask/app.py", line 1982, in wsgi_app
    response = self.full_dispatch_request()
  File "/root/.local/lib/python3.6/site-packages/flask/app.py", line 1614, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/root/.local/lib/python3.6/site-packages/flask/app.py", line 1518, in handle_user_exception
    return handler(e)
  File "/root/.local/lib/python3.6/site-packages/flask_jwt/__init__.py", line 243, in _jwt_error_callback
    return self.jwt_error_callback(error)
  File "/root/.local/lib/python3.6/site-packages/flask_jwt/__init__.py", line 140, in _default_jwt_error_handler
    ('description', error.description),
  File "/root/.local/lib/python3.6/site-packages/flask/json.py", line 251, in jsonify
    if current_app.config['JSONIFY_PRETTYPRINT_REGULAR'] and not request.is_xhr:
  File "/root/.local/lib/python3.6/site-packages/werkzeug/local.py", line 347, in __getattr__
    return getattr(self._get_current_object(), name)
AttributeError: 'Request' object has no attribute 'is_xhr'
[2020-03-16 07:36:16,739] ERROR in app: Exception on /api/user/login [POST]
Traceback (most recent call last):
  File "/root/.local/lib/python3.6/site-packages/flask/app.py", line 1982, in wsgi_app
    response = self.full_dispatch_request()
  File "/root/.local/lib/python3.6/site-packages/flask/app.py", line 1614, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/root/.local/lib/python3.6/site-packages/flask/app.py", line 1517, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/root/.local/lib/python3.6/site-packages/flask/_compat.py", line 33, in reraise
    raise value
  File "/root/.local/lib/python3.6/site-packages/flask/app.py", line 1612, in full_dispatch_request
    rv = self.dispatch_request()
  File "/root/.local/lib/python3.6/site-packages/flask/app.py", line 1598, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/root/.local/lib/python3.6/site-packages/flask_jwt/__init__.py", line 126, in _default_auth_request_handler
    return _jwt.auth_response_callback(access_token, identity)
  File "/root/.local/lib/python3.6/site-packages/flask_jwt/__init__.py", line 132, in _default_auth_response_handler
    return jsonify({'access_token': access_token.decode('utf-8')})
  File "/root/.local/lib/python3.6/site-packages/flask/json.py", line 251, in jsonify
    if current_app.config['JSONIFY_PRETTYPRINT_REGULAR'] and not request.is_xhr:
  File "/root/.local/lib/python3.6/site-packages/werkzeug/local.py", line 347, in __getattr__
    return getattr(self._get_current_object(), name)
AttributeError: 'Request' object has no attribute 'is_xhr'

EDIT: Included the entire error output.

@vhajdari
Copy link
Contributor

Try it from an incognito browser. There may be something cached that is causing the error.

@vhajdari
Copy link
Contributor

Try updating Flask to > 1.0, and re-run the install.

@ailegion
Copy link
Collaborator

@cromulon-actual as @vhajdari mentioned, updating Flask version to 1.0 in requirements file and re-running the install solves this problem. There will be a new release in next 24 hours from the current develop branch which already includes this fix.

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

3 participants