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 stuck loading #103

Open
brantpastore opened this issue Jan 27, 2023 · 4 comments
Open

Login stuck loading #103

brantpastore opened this issue Jan 27, 2023 · 4 comments

Comments

@brantpastore
Copy link

When i try to sign into the website using either http or https, it gets stuck loading and never authenticates (or if using the wrong password denies) me.

Not using docker, setup per read me.

.env content:
NODE_ENV=production
HTTP_ALL_INTERFACES=yes
HTTPS_HOST=10.0.0.173
HTTPS_PORT=3443

I also can't seem to find the log location.

@lideming
Copy link
Contributor

If the path in address bar is /controller, then maybe it was requesting to the ZT controller API.
Try adding console.log before/after this line?

const response = await got(ZT_ADDR + '/status', options);

@brantpastore
Copy link
Author

The path is https://10.0.0.173:3443/login and this is after finishing the setup, i get stuck trying to login with default credentials it just gets stuck loading.

I reviewed the error log and here are its contents:

cat ztnsrv-error.log
Warning: connect.session() MemoryStore is not
designed for a production environment, as it will leak
memory, and will not scale past a single process.
SyntaxError: Unexpected token < in JSON at position 7
at JSON.parse ()
at Object.get_users (/srv/ztncui/src/controllers/usersController.js:25:21)
at async exports.authenticate (/srv/ztncui/src/controllers/auth.js:27:17)
at async /srv/ztncui/src/routes/index.js:46:3

@lideming
Copy link
Contributor

It failed to parse the passwd file. Did you run this command to initialize it?

cp -v etc/default.passwd etc/passwd

@brantpastore
Copy link
Author

Looks like that fixed it! Thank you very much.

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