Losing connection with Plex

Issue description:

Intermittently losing connection with Plex and reports as offline or invalid pin or password.

Could this possibly be because I have home accounts and the main account has a PIN?

If I recreate the profile and select the sub account I usually use it works again for a few days. I suspect until my home IP changes.

Logs:

Upload description: kanine

Additional information:

I confirmed the Plex server was online with the Plex app. Also looking at the debug.log it is trying to authenticate using an embedded public IP address (GET https://my-old-ip-address.44xxxxxxxxxxxxxxxe.plex.direct:32400/identity not app.plex.tv), and I have verified that my IP has changed since the last authentication.

Changing the server ip in the configuration screen to the correct IP appears to have no effect.

 

Reproduction steps:

This issue occurs whenever my public IP changes and I’m using the Web Authentication method.

 

Media provider:

Plex

Screenshots:

     

The auth is done via plex.tv butt yes seems there’s some issues due to the pin

2024-10-05 08:14:26.270 Error PlexTvUtils  Error during request: 404 / {"errors":[{"code":1020,"message":"Code not found or expired"}]}

Can you describe exactly your setup and configuration and how you added the host in Symfonium to try to repro.

Hi, and thanks for looking into this.

My Plex Setup is a WIndows based home server, with Settings > Plex Home user setup (about 5 home users no PIN + Home Admin with PIN).

My ISP resets Public IP about once a week which is when I lose connection in Symfonium.

In Symfonium I have the Plex Server set up using the Web Authentication method. This works perfectly when setting up for the first time (or re-creatiing) and I chose the relevant Home User as the User account (not Home Admin).

After a few days I get this Authentication Error so I try again, rerun the Web Authentication within the App but it fails as shown in the logs. This always happens after a Public IP change from my internet service provider.

At that point if I remove the media provider entry and recreate it, it works as usual.

I have tried just updating the IP as shown in Symfonium to the correct public IP when the error occurs but error persists.

Can you confirm what you see when you press auth again in the provider ?

Does it properly open a page and you auth via the pin?

It just shows the logged in email and verifies connection again it doesn’t request a PIN, although I would not expect it to because the chosen home user has no PIN.

When I recreate, it just asks which home user to log in as within Symfonium, not on the web page.

I’m doing a test now with a newly created Plex account that I just shared my library to, I’ll report back if that method works around the issue.

Hope that makes sense, basically I’m logging in as a “Friend”, but I need to wait till my Public IP changes to see if that works.

From the logs at some point a pin request is started, and never finish after the logging, so there’s something wrong somewhere that make Symfonium think there’s need for the pin auth.

Edit: I also see some ssl issues

 Verbose  javax.net.ssl.SSLPeerUnverifiedException: Hostname aaaa.44afd5xxxxxxxxxx.plex.direct not verified:
 Verbose      certificate: sha256/66p3+FGqqIYu+ZOxjdddBU=
 Verbose      DN: CN=*.647101xxxxxxx.plex.direct
 Verbose      subjectAltNames: [*.647101xxxxxxx.plex.direct]

Do you have multiple servers for that account or have reinstalled the server recently ?

I only have one server that is currently active on that account. Many years ago it was moved to this current device.

Not sure why a PIN is being requested using the Web Authentication method for a home user with no PIN attached.

So far my IP has not changed again since this was reported. Sorry I can’t be much more help at this stage.

Hi, I had another change in IP today and using the “Default Authentication” method seems to have coped with the change in IP without an issue. I’ve just sent the latest debug you can see at the start of the sync the previous IP (ending .153) and later it picks up the new ip ending 128-31.

I will set back to “Web authentication” and see if that is what was causing the problem.

Yes it’s a mix of web auth, home user and pin code.

I use web auth with a main account here and it never fails too.

For the moment no idea what is happening but too many other things to handle right now :frowning:

If the workaround is ok for you, please use it for now.

1 Like

Hey, thanks and happy to use the work around.

I do have someone else using the Web Authentication method and I can’t confirm this but suspect that the issue of losing sync resolves after a period of time passes. I say this because when I reported this issue they had the same problem, but later that same day it cleared up.

Maybe that information helps?

The App has been fantastic, we use for our Audiobook collection and it works extremely well. I’ll drop a couple of ideas in for improvements but for the most part it’s a very good fit! Thank you.