peppermint icon indicating copy to clipboard operation
peppermint copied to clipboard

Sign In button not working

Open mrysn opened this issue 2 years ago • 2 comments

Just launched a fresh install via docker-compose, the containers came up fine and I accessed the login page all okay. When I enter an email address (or keep it blank) and click the Sign In button it does not do anything.

Tested with same bug/failure on desktop Chrome and Firefox and mobile Firefox on iOS.

mrysn avatar Dec 27 '23 22:12 mrysn

I have the same issue. To get to the bottom of the problem I opened the Browser Console and when I click on the button this message appears:

XHRPOST http://localhost:3000/api/v1/auth/sso/check [HTTP/1.1 500 Internal Server Error 16ms]
Uncaught (in promise) SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data`

The same problem seems to exist on the password reset page, when something is entered here, nothing changes on the website and the same error appears in the browser console:

XHRPOST http://localhost:3000/api/v1/auth/password-reset [HTTP/1.1 500 Internal Server Error 7ms]
Uncaught (in promise) SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

SimAub21 avatar Jan 06 '24 09:01 SimAub21

After debugging the issue, I encountered the following error in the logs :

docker logs peppermint

Error: P1000: Authentication failed against database server at 'peppermint_postgres', the provided database credentials for 'peppermint' are not valid.

Additionally, I discovered that entering the container's bash and installing lsof

docker exec -it peppermint bash
apt update && apt install lsof
lsof -i

only the port 3000 was active, not the expected port 5003,

It turned out that the root cause was related to the usage of special characters in the password of docker-compose.yml without proper escaping. Even when attempting to recreate the container, the old credentials seemed to persist.

I resolved the issue by performing the following steps:

It's important to note that this command is suitable if only the peppermint container is running in Docker. If other containers are running, it will remove them as well.

docker rm $(docker ps -aq)
docker rmi $(docker images -q)
docker volume rm $(docker volume ls -q)
docker builder prune

I hope this information proves helpful to others facing a similar issue.

Nervus86 avatar Feb 19 '24 22:02 Nervus86

weird i'll close for now but i'll see if i can add some proofing to this

potts99 avatar Mar 21 '24 12:03 potts99