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

WebUI login not possible after updating to Version 1.9.9.2 #330

Closed
DanielHeinze opened this issue May 1, 2022 · 9 comments
Closed

WebUI login not possible after updating to Version 1.9.9.2 #330

DanielHeinze opened this issue May 1, 2022 · 9 comments
Labels
wontfix This will not be worked on

Comments

@DanielHeinze
Copy link

I updated my server from 1.9.9 to 1.9.9.2 and after that iam not able to loggin to the webui. wrong credentials

@Titou74
Copy link

Titou74 commented May 2, 2022

I've got the same problem.
Connection with ATAK work correctly.

Error on log: sqlite3.OperationalError: no such column: SystemUser.device_type

Complete log

[2022-05-02 11:05:06,836] ERROR in app: Exception on /AuthenticateUser [GET]
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/sqlalchemy/engine/base.py", line 1276, in _execute_context
self.dialect.do_execute(
File "/usr/local/lib/python3.9/dist-packages/sqlalchemy/engine/default.py", line 593, in do_execute
cursor.execute(statement, parameters)
sqlite3.OperationalError: no such column: SystemUser.device_type

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.9/dist-packages/flask_cors/extension.py", line 165, in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.9/dist-packages/flask/_compat.py", line 39, in reraise
raise value
File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1936, in dispatch_request
return self.view_functionsrule.endpoint
File "/usr/local/lib/python3.9/dist-packages/flask_httpauth.py", line 149, in decorated
user = self.authenticate(auth, password)
File "/usr/local/lib/python3.9/dist-packages/flask_httpauth.py", line 348, in authenticate
return self.verify_token_callback(token)
File "/usr/local/lib/python3.9/dist-packages/FreeTAKServer/controllers/services/RestAPI.py", line 94, in verify_token
output = dbController.query_systemUser(query=f'token = "{token}"')
File "/usr/local/lib/python3.9/dist-packages/FreeTAKServer/controllers/DatabaseControllers/DatabaseController.py", line 212, in query_systemUser
return self._query(controller=self.SystemUserTableController, query=query, columns=column)
File "/usr/local/lib/python3.9/dist-packages/FreeTAKServer/controllers/DatabaseControllers/DatabaseController.py", line 130, in _query
return controller.query(session=self.session, query=query, columns = columns)
File "/usr/local/lib/python3.9/dist-packages/FreeTAKServer/controllers/DatabaseControllers/table_controllers.py", line 32, in query
output = session.query(
File "/usr/local/lib/python3.9/dist-packages/sqlalchemy/orm/query.py", line 3373, in all
return list(self)
File "/usr/local/lib/python3.9/dist-packages/sqlalchemy/orm/query.py", line 3535, in iter
return self._execute_and_instances(context)
File "/usr/local/lib/python3.9/dist-packages/sqlalchemy/orm/query.py", line 3560, in _execute_and_instances
result = conn.execute(querycontext.statement, self._params)
File "/usr/local/lib/python3.9/dist-packages/sqlalchemy/engine/base.py", line 1011, in execute
return meth(self, multiparams, params)
File "/usr/local/lib/python3.9/dist-packages/sqlalchemy/sql/elements.py", line 298, in _execute_on_connection
return connection._execute_clauseelement(self, multiparams, params)
File "/usr/local/lib/python3.9/dist-packages/sqlalchemy/engine/base.py", line 1124, in _execute_clauseelement
ret = self._execute_context(
File "/usr/local/lib/python3.9/dist-packages/sqlalchemy/engine/base.py", line 1316, in _execute_context
self.handle_dbapi_exception(
File "/usr/local/lib/python3.9/dist-packages/sqlalchemy/engine/base.py", line 1510, in handle_dbapi_exception
util.raise
(
File "/usr/local/lib/python3.9/dist-packages/sqlalchemy/util/compat.py", line 182, in raise

raise exception
File "/usr/local/lib/python3.9/dist-packages/sqlalchemy/engine/base.py", line 1276, in _execute_context
self.dialect.do_execute(
File "/usr/local/lib/python3.9/dist-packages/sqlalchemy/engine/default.py", line 593, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such column: SystemUser.device_type
[SQL: SELECT "SystemUser".uid AS "SystemUser_uid", "SystemUser".name AS "SystemUser_name", "SystemUser".token AS "SystemUser_token", "SystemUser".password AS "SystemUser_password", "SystemUser"."group" AS "SystemUser_group", "SystemUser".device_type AS "SystemUser_device_type", "SystemUser".certificate_package_name AS "SystemUser_certificate_package_name"
FROM "SystemUser"
WHERE token = "token"]
(Background on this error at: http://sqlalche.me/e/13/e3q8)
{}

@brothercorvo
Copy link
Collaborator

clearly you have used the pip update option, however we have changed the DB structure to support the difference between certs. you need to delete and reinstall the system. The new API for User management help to recreate user pool automatically.

@brothercorvo brothercorvo added the wontfix This will not be worked on label May 2, 2022
@naman108
Copy link
Collaborator

naman108 commented May 2, 2022

essentially you need to delete the database at /opt/FreeTAKServer.db

@DanielHeinze
Copy link
Author

essentially you need to delete the database at /opt/FreeTAKServer.db

clearly you have used the pip update option, however we have changed the DB structure to support the difference between certs. you need to delete and reinstall the system. The new API for User management help to recreate user pool automatically.

so if i delete the FTS Server and delte the DB, all users and certs are deleted too or? So whats the best way? i dont want to create all users again with all certs..

@brothercorvo
Copy link
Collaborator

brothercorvo commented May 2, 2022 via email

@DanielHeinze
Copy link
Author

Stopped FTS and WebUI, deleted the file /opt/FreeTAKServer.db and started FTS and WebUI again.
After that iam able to loggin with the default credentials. but if i create a user with cert or without cert, its not visible in the webui?
Do i have do uninstall the hole FTS Server with WebUI to get it running again? Or you i have to delete /opt/FTSServer-UI.db also?

@Titou74
Copy link

Titou74 commented May 2, 2022

A clean install was required for me to make 1.9.9.2 working.

Cleaned with:
sudo pip uninstall FreeTAKServer
sudo pip uninstall FreeTAKServer-UI
sudo rm /opt/*

Then I maked a clean install.

NOTE: create a user on TFS-UI without cert don't work (user not listed on user list). Creation with cert work.

@brothercorvo
Copy link
Collaborator

@DanielHeinze what @Titou74 did is the best strategy, we will not provide detailed upgrade instructions because we have not tested and it may fail

@DanielHeinze
Copy link
Author

@brothercorvo thanks, that is working for me. But user create without cert is not working llike @Titou74 said

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

4 participants