-
-
Notifications
You must be signed in to change notification settings - Fork 281
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
Logged Out Between Sessions [TVOS] #776
Comments
I have experienced being logged out on a daily basis on my Apple TV 4K regardless of if there are multiple users or not. This doesn’t happen on my android tv nor any Rokus. |
The multiple TVOS users could be a red herring. That's just when I started seeing it. I know other people who get this regardless of TVOS users. Is there a way to collect TVOS logs that I could help look at/provide to better understand this? |
Sadly no logs would help, but I can investigate. |
Thank you! I don't know if it changes anything but it's a 2nd Gen 4K Since there is one that was impacted and one that is not, I've been racking my brain thinking what the difference between them could be. The only other thing I could think of is that the one that gets logged out also has Infuse logged into the same server. I'm not sure how that would make a difference. Just hoping maybe something there might help! |
I'm facing the same error on my apple tv 4k. Logged in yesterday (again) and I have no server today. Have to enter server + credentials again. |
I have the same issue as well, have Swiftfin installed on 3 apple tv's with accounts for myself my wife and my kids and it seems almost daily the accounts get wiped and I have to reconnect to the server and login again. |
The same issue. Can we help to investigate it somehow? |
Same issue for me. |
Thanks for this great tvOS app, but yes I have the same issue as the other on my 1st gen 4k |
Apologies that I haven't been able to investigate, I see that this is a pressing issue. I'll take a look at this soon. |
This occurs on each Apple TV that I have of various models. It's too bad because Swiftfin is miles faster to load and navigate compared to Infuse. Just a better app IMO. |
I’m observing the same thing. |
Same thing. Server shows multiple logged in sessions from that box. Apple TV 4K. |
I’m still having this same issue as well. App is great, but frustrating constantly having to input credentials over and over. |
Same problem, I have to sign in each time I open the app. I'm using the following: AppleTV Jellyfin |
Same issue here on our 4K 1st Gen On 16.5. We have multiple AppleIDs on it, but mainly using my AppleID, and we also have 6 users configured in Jellyfin. |
Family members are also experiencing this bug! Looking forward to a resolution! |
I have the same issue. My login / server info is not being saved on tvOS. Any suggestions? |
I'd like to comment on here that I've continued to experience this for several months. Jellyfin kicks off any users signed into an Apple TV after 1 day and sometimes even after a few hours. It's hot and miss. Doesn't sign out any Rokus, Android TVs, or iOS devices though. |
Just adding a +1 here. I don't know of any specific trigger, but I know I won't stay logged in for more than a day or so at most. |
Adding my voice in too! Relatives can't use the service at all because of the daily login requirement. |
I am having the same issue as well. I am using a 1st and 2nd gen Apple TV 4K and my server is installed via docker on a NAS. |
Happens with me too. It's just with one account though, after a certain period of time, usually a day, get logged out and I have to enter everything again including the ip address/domain |
Same here, I need to add a server and log in every time. |
Glad to find this issue....this has been driving me crazy and I couldn't figure out what the issue was. Hoping to see a fix soon!! |
For anyone experiencing issues how have you logged in? I used to have this issue when logging in with a password but after I logged in with quick connect a few days ago it's been working fine (so far...). |
FWIW, my Jellyfin runs inside docker, shows up in the list of servers, and Quick Connect works. It's just not all that quick. (A QR code would be quicker.) Still, the best would be for the credentials from logging in would be kept. |
I did try the "quick" login... it did not help. Next day I was logged out again. also I have to say that there is nothing quick about this... If you use a pw manager and your iphone to automatically put in the details that is 100times faster still I have to say, I love the app!!! and I am super thankful ❤️ |
This issue finally got to me and I had some free time, so I went hunting to see if I could track down what is causing this and I might have found the problem. CoreStore stores its SQLite db in the
Edit: This is an entire thing with data and caching in tvOS, I don't understand this well enough to fix it but Apple details bits of it in App Programming Guide for tvOS |
Hey all, I've started debugging this and currently trying to replicate. If it is truly something that happens over a period of 24 hours, this might be tough. |
It is definitely something that happens over a 24 hour period. Probably the absolute most annoying thing I’ve ever experienced. And since my Jellyfin server is also part of my home assistant, every single time I have to login it creates a new “device” in home assistant so I have probably 60 Apple TVs showing but 59 of them inactive. I quit deleting them because it just continues to happen. On my bedroom Sony Bravia for the AndroidTV app I haven’t ever been signed out. If there's anything I can do to help you out let me know. |
I am not familiar with iOS/tvOS development, but I can help as well. and interesting thing I had the last couple of days: when I have a video open when I leave the app, it keeps that video open over night, and I don't have to log in again (most days) but when I go back to the swiftfin overview, i think I am always logged out next evening (22h later most days 😃 ) |
Apparently the issue can be fixed by using UserDefaults for storing API key. |
Using quick connect does not solve the problem. As @JamesDearlove and @amochkin pointed out it seems like tvOS is very aggressive with purging data.
That appears to be explaining why I'm not logged out of my Apple TV (as I don't use it too much) while someone I know is logged out much more often (and they use it a lot more). As far as I can see in the code the API key and the server details are not stored in UserDefaults so they are eligible for cleanup. |
API keys are not stored in UserDefaults and never should be. I'm not too concerned with the cleanup being a problem as that is something that should have been an issue a long time ago, but it isn't out of the picture. |
I disagree, using UserDefaults completely solves the problem. |
2 days in a row I was not logged out while I keep the next video on pause and not Return to the main screen - but last night I did go back so I can report tomorrow if I got logged out again 😅 |
Have not been logged out since the new tv os update. Maybe that fixed it? |
Following up on this being a purging data on low storage, I was able to successfully recreate this issue. I have a few thousand photos in iCloud. When I remove iCloud Photos from syncing to the Apple TV, I have a lot of free space and I rarely have Swiftfin logouts. When I re-enable iCloud Photos to sync, the Apple TV downloads images to get me to ~1gb free. The next time I open Swiftfin it requires me to log back in. I assume this would work with anything that takes up a lot of storage on the AppleTV. I've found Infuse likes to chew up storage room too and I experience the same issue when Infuse takes up >5gb of library images. In testing, it looks like when Swiftfin is not in the foreground and storage is low, credentials are lost. I hope this helps in testing/troubleshooting! Hopefully others are able to recreate this as well. Edit for context: To identify the amount of storage used, I used this app: https://apps.apple.com/us/app/tv-info/id1443395433. So, a lot of this is riding off of the assumption that this app is accurate. I have a 32gb model and without Infuse/Photos I sit around 20gb in use. This number seems to fluctuate ~10gb without installing anything. I have found that it can even get to ~1gb left without adding anything new. I'm not an expert, but I would guess that Apple is pretty aggressive about caching? That being said, >1gb remaining, seems to be the sweet spot when it clears my login. When I get logged out, I found that Infuse also gives me that warning that it had to clear cached information. I hope this helps! Additionally, it would be great to confirm someone else was able to replicate this as well! |
I can replicate that the issue on tvOS 17 persists, and there is a new behaviour where it no longer accepts my credentials to log back into my media server. |
Same here, is seams to work for me know on TvOs17. Haven't ben logoed ut for a couple of days now |
This issue has seemingly disappeared on both of my Apple TVs. Gen 2 and 4 after the last time I did an update (Ubuntu). Both are also on TVOS 17. Used to kick me out every day -- does not do this anymore. |
I updated to the latest TV Os 17 and I still have the same problem. It keeps me logged in a little longer, but I still have to keep re-entering credentials. |
This problem made me switch to Infuse. I'd love to go back to Swiftfin, but this makes it unusable |
API keys are typically considered private keys. UserDefaults stores data in a text file on the device. https://stackoverflow.com/questions/68022172/why-is-using-userdefaults-to-store-sensitive-information-on-ios-not-safe |
After updating to TVOS 17.1 -- this issue has came back. Logging out every single day at some point. |
Is there a workaround that I'm missing here? I'm not sure how this isn't a showstopper. I haven't been able to configure a user that doesn't require a login, which disappears in a day or so. |
Sadly there isn't a workaround. Frankly, this issue has been difficult for me because:
So this issue is in the background for me, even though it can make the app practically unusable. I apologize for the inconvenience. |
Thanks for the quick response! I was hoping there was some way to get an account to show up in the "Public Users" side of the login screen or similar, but it's not clear how to do that. I've done exactly no tvOS development, but if you can point me at a guide to running the debugger, I actually could hang a spare machine off of one of our AppleTVs. |
Since then I never got logged out again. Maybe it is a different issue. |
Still happens to me. Is there a way to use jellyfin in DLNA mode without logging in? Is there a different way to store user credentials? Or setup Jellyfin to not need credentials? Seems like overkill for a LAN connection to the media server right beside the ATV. |
It has been some time since the last comment on this thread. Has there been any progress or updates regarding this issue? I am still experiencing this. Sometimes it is daily or many days between the need to log in again. |
This isn't a perfect fix, but it appears to happen when storage is low on the Apple TV. If you turn off the download screensaver option in the Apple TV settings and stop iCloud photos from syncing to the TV, it prevents the issue from occurring on my end. When I was doing some research it it sounds like Apple has a pretty aggressive cleanup process when storage starts getting low and Apple prioritizes retaining data from their own apps over third-party apps from the store so things like Infuse and Jellyfin have issues where the data gets wiped. That being said, I think Jellyfin might be able to resolve this by moving how the credentials are stored? But I am absolutely not an expert, so I'll lean on more qualified people. |
Unaware if this issue is holding up the 1.1 update for tvos. I suspect most people would rather gain the updated device profile & pushback this bugfix for 1.2. |
Hi, I took a look at this issue since I'm also having it on my Apple TV 😬
Deleting the store does the same as when tvOS cleans up the cache to free up space. Now to fix the issue there are multiple solutions:
Cache outside CoreData Mandatory data alongside the token in the Keychain This is an issue I've already been working on in one of my apps (We called it a I'm still figuring out the whole architecture of the project but if you want me to, I'm willing to try to do some work on this issue using the second solution. |
I can't get this trigger 100% of the time but I think I narrowed it down to having multiple users on the AppleTV. Since adding another user profile on the AppleTV, all saved Jellyfin users will get wiped after the TV goes to sleep or reboots.
I believe this is related to how session data is stored since this only started once I added other users. On another AppleTV, I have a single user and I have not experienced this issue (yet). I could be totally off base but if my guess is right I think this could be resolved by:
#661
#258
The text was updated successfully, but these errors were encountered: