-
-
Notifications
You must be signed in to change notification settings - Fork 155
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
Token lasts less than 2 minutes then results in "you need to provide a valid access token or user credentials to access this api" #392
Comments
Please post your gotify/server log while the error occurs. When you use the web-ui do you receive new messages without refreshing the page? Could logout and login in the android app, wait for the error and then post the logs here? |
webui works without issue. Logged out of android and back in, here's the logs 2024-12-06T18:58:00-05:00 | 200 | 2.79355ms | 172.23.0.3 | DELETE "/client/13"
2024-12-06T18:59:14-05:00 | 200 | 47.486µs | 172.23.0.3 | GET "/version"
2024-12-06T18:59:18-05:00 | 200 | 67.422583ms | 172.23.0.3 | GET "/current/user"
2024-12-06T18:59:20-05:00 | 200 | 66.015501ms | 172.23.0.3 | POST "/client"
2024-12-06T18:59:20-05:00 | 200 | 2.853257ms | 172.23.0.3 | GET "/current/user"
2024-12-06T18:59:20-05:00 | 200 | 1.819067ms | 172.23.0.3 | GET "/message?limit=1&since=0"
2024-12-06T18:59:20-05:00 | 200 | 29.228µs | 172.23.0.3 | GET "/version"
2024-12-06T18:59:20-05:00 | 200 | 977.552µs | 172.23.0.3 | GET "/application"
2024-12-06T18:59:20-05:00 | 200 | 662.292µs | 172.23.0.3 | GET "/stream?token=[masked]"
2024-12-06T18:59:20-05:00 | 200 | 1.726648ms | 172.23.0.3 | GET "/application"
2024-12-06T18:59:20-05:00 | 200 | 1.684159ms | 172.23.0.3 | GET "/message?limit=100&since=0"
WebSocket: ReadError read tcp 172.23.0.4:80->172.23.0.3:39612: i/o timeout
2024-12-06T19:04:34-05:00 | 200 | 2.42836ms | 172.23.0.3 | GET "/stream?token=[masked]"
2024-12-06T19:04:34-05:00 | 200 | 1.979579ms | 172.23.0.3 | GET "/message?limit=10"
2024-12-06T19:05:24-05:00 | 401 | 741.704µs | 172.23.0.3 | GET "/stream?token=[masked]"
Error #01: you need to provide a valid access token or user credentials to access this api |
Hmm weird. How do you run gotify/server with docker? |
docker run
-d
--name='gotify'
--net='intra'
--pids-limit 2048
-e 'GOTIFY_DEFAULTUSER_PASS'='admin'
-p '8070:80/tcp'
-v '/mnt/user/appdata/gotify/':'/app/data':'rw'
-v '/mnt/user/appdata/gotify/config/':'/etc/gotify':'rw'
--no-healthcheck 'gotify/server:latest' So i tried logging out, logging back in, restarting my phone and it worked well for a few hours but by the time i woke up it was right back to token failure. |
Hmm looks okay too, could you try using sqlite3 as database? |
I'm now on sqlite3, server logs still showing |
I posted this here because the note below says "Please open the issue in gotify/android instead if it is only related to the android client" and my browser tab has never experienced issues. I'm not 100% sure if its the server invalidating the token or something going wrong in android.
Can the issue be reproduced with the latest available release? (y/n)
yes
Which one is the environment gotify server is running in?
Docker startup command or config file here (please mask sensitive information)
Do you have an reverse proxy installed in front of gotify server? (Please select None if the problem can be reproduced without the presense of a reverse proxy)
Reverse proxy configuration (please mask sensitive information)
On which client do you experience problems? (Select as many as you can see)
What did you do?
Login to gotify server, 2 minutes later I'm getting "Error unreachable (see logs), trying to reconnect in 1 minute". Logs states "Expected Http 101 but received 404"
I will note that if I open gotify manually and refresh the connection, it'll load messages, but in the background it never wil
What did you expect to see?
A working gotify instance with message.
What did you see instead? (Include screenshots, android logcat/request dumps if possible)
gotify android log.txt
Details
The text was updated successfully, but these errors were encountered: