Skip to content
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

Session is expired when alt tabbing #214

Closed
pokemonrocks9 opened this issue Aug 11, 2023 · 12 comments
Closed

Session is expired when alt tabbing #214

pokemonrocks9 opened this issue Aug 11, 2023 · 12 comments
Assignees
Labels
bug Something isn't working

Comments

@pokemonrocks9
Copy link

Expected Behavior

Feishin open and use the server

Current Behavior

Feishin will open for a short period of time then when alt tabbing suddenly closes the server and says session is expired. Server is a Jellyfin.

Server crash in Feishin

Unable to atm

Steps to Reproduce

Open Feishin, sign in, alt tab.

Unfortunately cannot yet

Possible Solution (Not obligatory)

Context

Your Environment

  • Application version (e.g. v0.1.0) :0.3.0
  • Operating System and version (e.g. Windows 10) : Windows 11
  • Server and version (e.g. Navidrome v0.48.0) : Jellyfin 10.8.10
  • Node version (if developing locally) :
    -Extra information: this bug report is on behalf of a friend who's struggling to get the app to run properly. I'm making this at work and can provide more information later.
@pokemonrocks9 pokemonrocks9 added the bug Something isn't working label Aug 11, 2023
@jeffvli
Copy link
Owner

jeffvli commented Aug 12, 2023

I don't think the issue is related to alt tabbing, my thoughts are that it's a permissions related issue that I'm unaware about on Jellyfin.

Is the person Feishin accessing your server on an account with limited permissions to your server?

@pokemonrocks9
Copy link
Author

pokemonrocks9 commented Aug 12, 2023 via email

@jeffvli
Copy link
Owner

jeffvli commented Aug 12, 2023

Feishin logs you out if you get a HTTP 401 status code on any API request.

Can you have them open the browser dev tools via CTRL + SHIFT + I or from the app menu and try replicating the issue and checking which API request is giving them the 401?

if (error.response && error.response.status === 401) {
const currentServer = useAuthStore.getState().currentServer;
authenticationFailure(currentServer);
}

@pokemonrocks9
Copy link
Author

pokemonrocks9 commented Aug 12, 2023

It seems in console we have
Failed to load resource: the server responded with a status of 401 (Unauthorized)
(Server IP and UserToken)/items?Fields=ChildCount%2C%20Genres%2C%20DateCreated%2C%20ParentId%2C%20Overview&IncludeItemTypes=Playlist&MediaTypes=Audio&Recursive=true&SortBy=SortName&SortOrder=Ascending&StartIndex=0

To add as well I have begun getting the same error

@pokemonrocks9
Copy link
Author

pokemonrocks9 commented Aug 12, 2023

Also have a
token is expired: undefined
renderer.js:2

Adding a photo of their error
tayerrorfeishin

@jeffvli
Copy link
Owner

jeffvli commented Aug 25, 2023

Sorry for the late response, but I believe this may have had something to do with how the app was fetching playlists (not 100% sure). I've added a way to re-authenticate whenever running into the expired session.

Going to close this for now, but will we can re-open this if you still experience this after the next release.

@jeffvli jeffvli closed this as completed Aug 25, 2023
@jeffvli jeffvli self-assigned this Aug 25, 2023
@silverfs
Copy link

silverfs commented Nov 1, 2023

Hi, I hope I am wrong on my end, but from the looks of it, this issue needs to be opened again.

I have been getting random "session expired" with the same 401 'unauthorized' as seen here in this issue.
This issue has been present for me and my family members since version 4.0.0, and frequent entry of login credentials has become muscle memory 😅.
I have used Jellyfin 10.8.10 and am currently on 10.8.11, both having the same issue on Feishin.

I mainly use the Windows version of Feishin, but have seen random "expired" sessions on Mac and in the browser version as well.
Is there something I'm missing?

P.S.: Sorry for only reporting this just now, I was incredibly busy.

edit: I'm currently on 10.8.10, as playlists in 3rd party apps haven't been able to show up on that version yet.

@jeffvli jeffvli reopened this Nov 1, 2023
@Mihara
Copy link

Mihara commented Feb 16, 2024

I'm also noticing mysterious "session expired" after long disuse with Navidrome, both Navidrome and Feishin running on Linux.

Opening the server edit page and re-saving gets it going again, at least.

@kgarner7
Copy link
Collaborator

I'm also noticing mysterious "session expired" after long disuse with Navidrome, both Navidrome and Feishin running on Linux.

Opening the server edit page and re-saving gets it going again, at least.

This is not mysterious; Navidrome's credentials are temporary (https://www.navidrome.org/docs/usage/configuration-options/#:~:text=false-,sessiontimeout,-ND_SESSIONTIMEOUT). When you save the password or re-save the server, it generates new credentials. This is unlike Jellyfin, whose credentials do not expire (as far as I understand)

@Mihara
Copy link

Mihara commented Feb 16, 2024

This is not mysterious;

Session timing out might not be mysterious, what's mysterious is why Feishin does not recreate it automatically like every other client. It has the password and username saved right there, after all.

@kgarner7
Copy link
Collaborator

This is not mysterious;

Session timing out might not be mysterious, what's mysterious is why Feishin does not recreate it automatically like every other client. It has the password and username saved right there, after all.

If (and only if) you selected save password, then it should reauthenticate on failure. But this could also be blocked by #403 (resolved hopefully by #510). If you're using web, the password is never stored

@kgarner7
Copy link
Collaborator

kgarner7 commented Apr 9, 2024

I will be closing this issue as the issue in my earlier comment was addressed (and some better fixes done).

@kgarner7 kgarner7 closed this as completed Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants