Stops working after a period of time
I have connected AntennaPod to the server, it will work for a period of time and then start failing.
To get it working again I have to logout of AntennaPod and then connect it again.
I turned on the debug and saw this
I then looked at your code and saw this
I am not familiar with PHP enough but I think this means AntennaPod is broken and not sending the user name across, right?
After logging out and reconnecting I synced AntennaPod and once finished all the initial stuff I hit Synchronise now, the debug looks like this
So my thinking was that because Antennapod doe snot have access to my server at home while I am out and about something something then it starts failing.
To check that I made a server that is publicly available at all times: https://gpodder.tux.com.au
Nope it still ends up timing out, I have enabled the debug on the new server. The plan is to reconnect the phone to server then parse the logs to find out the time period it takes to start failing
I just updated to the latest code and will continue to monitor.
It seems like the time is about 1/2 hour
I have the same issue, not sure what is causing this currently.
Here is what I did as a hacky awful workaround.
- AntennaPod fails
- Kill the app
- Open the app
- Sync
I got the PHP to show me the cookie value, here it is before and after I killed the app
So AntennaPod does not even try to use the sessionid cookie when it has been killed. I wonder what the expiry of the cookie is and if AntennaPod cares.
@bohwaz are you using Antenna Pod as well? It could be a change in that not your server.
Yes AntennaPod as well.
I just changed the HTTP status code in this case to 401, maybe that will trigger AntennaPod to restart the authentication dance if the cookie has expired.
Tell me if the error comes back after upgrading to the latest version.
Hi!
I observe the same problem, but it doesn't seem to help. Seems that Antennapod is not reauthenticating:
127.0.0.1 - matthias [06/Jun/2024:09:54:30 +0200] "POST /api/2/auth/matthias/login.json HTTP/1.1" 400 73 "-" "AntennaPod/3.4.0"
127.0.0.1 - matthias [06/Jun/2024:09:54:32 +0200] "POST /api/2/auth/matthias/login.json HTTP/1.1" 400 73 "-" "AntennaPod/3.4.0"
<updated API.php>
127.0.0.1 - matthias [06/Jun/2024:09:55:08 +0200] "POST /api/2/auth/matthias/login.json HTTP/1.1" 401 73 "-" "AntennaPod/3.4.0"
127.0.0.1 - matthias [06/Jun/2024:09:55:11 +0200] "POST /api/2/auth/matthias/login.json HTTP/1.1" 401 73 "-" "AntennaPod/3.4.0"
127.0.0.1 - matthias [06/Jun/2024:09:55:12 +0200] "POST /api/2/auth/matthias/login.json HTTP/1.1" 401 73 "-" "AntennaPod/3.4.0"
This happens when the client is sending a cookie linked to an expired session (PHP sessions expire after 30 minutes by default, if I remember correctly).
It might be that AntennaPod is providing the Authorization AND the expired session cookie. oPodSync is using the cookie first. I changed so that if Authorization is provided, cookie is ignored and replaced.
Let me know if that changes things. I also changed the error message to make it clearer.
It works now. I couldn't duplicated it anymore. Thank you!
I was also experiencing the issue and an update to the latest code seems to have fixed it.
Thanks for the feedback. Closing this issue if everything is fine.