flood-for-transmission
flood-for-transmission copied to clipboard
WebUI Empty (password expire ?)
Hi !
I don't know if it's related to Transmission or Flood, but i have password set for the web ui.
My Transmission has been running for 7+ days, when i go to the web ui, i type my password evertything work fine.
But sometime (like few hours after), if i go back to the ui, everything is empty (no torrent list, no access to settings...)
I need to ctrl + shift + r (reload the page without cookie and cache) to "force" the ui to ask my credentials again, and everything's working again
Does it sounds like an issue ? Maybe already known ?
I'm using Transmission 4.0.4
Thanks !
EDIT : Screenshot for the "empty page" before refresh
I'm aware of this because I have the same setup. I made an attempt not too long ago to resolve this but it didn't really work.
I will have to dive deeper into this at some point, but my experience is that it's hard to debug because it only happens after a few hours.
If you feel inspired to pick this issue up yourself feel free to do so! :D
For me, this happened because the Service Worker (/sw.js
) was caching the HTML even though the server would've normally given a 40X or 50X error because of the server being offline or the user not having login access anymore.
I fixed it by deleting sw.js
from my install.
I seem to have bumped into this issue to. One way to replicate (or debug) it without having to wait for hours. (Note that I have reverse proxy in front of it to make it https, but I don't think this should matter and I'm using example.com just as a placeholder).
- Assume that on the following address, https://example.com/transmission/web/, you are logged in and see the list of torrents.
- Now go to https://[email protected]/transmission/web/ you can basically pick any value for
user
but this seems trigger the http auth popup again, click on the "cancel" button, this will result in401: Unauthorizd
- Now go back to https://example.com/transmission/web/ and you will the the UI loaded but with an empty list. In my case the trailing slash was important, only with the trailing slash does it result in an empty list. If I remove the trailing slash it actually asks for credentials.
- Using ctrl+shift+R will trigger the http auth popup again.
I made an attempt at resolving this. Thank you @Sjiep for the suggestion on how to consistently reproduce.
However, it seems like this has little to do with my code but rather with how Chrome has implemented the Basic Auth. I found this bug: https://bugs.chromium.org/p/chromium/issues/detail?id=1055253 which seems very similar to the behaviour reported here. It's been open for a long time and I don't see this resolved at any point.
I don't really see any way around this, but if anyone has some ideas, I'm all ears.
The way I solved this is to prevent browser caching via my load-balancer that's in front of transmission. That way the browser will always refresh and notice if you're logged out.
For Nginx:
location = /transmission/web/ {
# Prevent caching so browser can detect when it is logged out
add_header Cache-Control 'no-store' always;
proxy_hide_header 'Expires';
}
The best solution might be to ask Transmission to not add those headers for the index by default.