MyPlex failed login, account locked

I'm currently unable to login to MyPlex (which worked before) using the same credentials that are working on other devices.  And every time it fails it's also locking my plex account, and I receive an email to unlock it.

Is anyone else seeing this issue?  Is there a bug in PlexConnect which loops the authentication process and causes the account locking?

I think you are the only person to ever report this, are you able to provide details of any non standard character in your password?

How are you entering your password, remote or iOS device?

It is a bug actually, here are some details.  My password ends with the following characters, which are getting cut in half: xx

12:08:59 WebServer: PlexConnect options:

{'aTVAddress': '192.168.0.3', 'PlexConnectCredentials': 'login:password', 'aTVLanguage': 'en', 'PlexConnectUDID': 'UDIDhere', 'aTVScreenResolution': '1080', 'aTVFirmwareVersion': '6.1.1', 'PlexConnect': 'MyPlexLogin'}

12:08:59 WebServer: additional arguments:

Now you can see the second half of the end of the password is on the next line:

12:08:59 WebServer: serving .xml: /xx  

12:08:59 XMLConverter: PlexConnect Cmd: MyPlexLogin
12:08:59 XMLConverter: PlexConnectChannelsSearch:
12:08:59 XMLConverter: MyPlex->Logging In...
12:09:01 PlexAPI: Authentication failed
 
Note that I'm using the Synology PlexConnect package, last updated on 4/14.

This really smells like a bug. :-D

I guess you shouldn't use the "&" for now, as it usually divides the options-string...

Edit:

This is strange. The name/password is actually fed through "encodeURIComponent", which should convert the "&" in a safe way (see settings.js, line 198).

The options get decoded in WebServer.py, line 100, using unquote... which is supposed to turn the conversion back.

Edit:

Could you please provide another line form your logs? A couple of line up, under

WebServer: http request path:

The following line should show the complete address requested by aTV, I wonder what happened to the "&"...

It's fine for me, if you clean the UDID and password as you did before. :-)

I'm notorious for hitting/finding bugs that nobody else ever encounters, lol :(

Hm. Posted another "Edit" to my message above. Not sure if you missed it - when it came in at the same time as your last comment?

12:08:15 WebServer: cleaned path:
/js/settings.js
12:08:15 WebServer: PlexConnect options:
{'aTVScreenResolution': '1080', 'aTVFirmwareVersion': '6.1.1', 'aTVLanguage': 'en', 'aTVAddress': '192.168.0.3'}
12:08:15 WebServer: additional arguments:
 
12:08:15 WebServer: serving /js/settings.js
12:08:59 WebServer: http request header:
Host: trailers.apple.com^M
X-Apple-Store-Front: 143441-1,19 ab:14CB2^M
Accept: */*^M
Accept-Encoding: gzip, deflate^M
Accept-Language: en;q=0.9^M
Cookie: mz_at0=AwQAAAEMAADDUgAAAABQdgwZ8MHMWcE7BFV9Ha8FW2bACpua+g8=; mz_at0-106271644=AwQAAAEMAADEfAAAAABSafbx7jAFQDg7PQWBTUR9INpE2pMHEG8=; s_vi=[CS]v1|27D01861050115D5-6000010A206161CF[CE]; X-Dsid=106271644^M
X-Apple-TV-Resolution: 1080^M
X-Apple-TV-Version: 6.1.1^M
User-Agent: iTunes-AppleTV/6.1.1 (3; 8GB; dt:12)^M
X-Forwarded-For: 192.168.0.3^M
X-Forwarded-Host: trailers.apple.com^M
X-Forwarded-Server: trailers.apple.com^M
Connection: Keep-Alive^M
 
12:08:59 WebServer: http request path:
/&PlexConnect=MyPlexLogin&PlexConnectCredentials=login:password&PlexConnectUDID=F02HJ177DRHN
12:08:59 Localize: aTVLanguage: en
12:08:59 WebServer: pms address:
 
12:08:59 WebServer: cleaned path:
/xx
12:08:59 WebServer: PlexConnect options:
{'aTVAddress': '192.168.0.3', 'PlexConnectCredentials': 'login:password', 'aTVLanguage': 'en', 'PlexConnectUDID': 'F02HJ177DRHN', 'aTVScreenResolution': '1080', 'aTVFirmwareVersion': '6.1.1', 'PlexConnect': 'MyPlexLogin'}
12:08:59 WebServer: additional arguments:
 
12:08:59 WebServer: serving .xml: /
12:08:59 XMLConverter: PlexConnect Cmd: MyPlexLogin
12:08:59 XMLConverter: PlexConnectChannelsSearch:
12:08:59 XMLConverter: MyPlex->Logging In...
12:09:01 PlexAPI: Authentication failed
 
There you go sir!

I really don't get why aTV's encodeURIComponent doesn't (seem to) encode the "&"...

What do we miss?

Note that this did work at one point, but something changed.  I had to reinstall plexconnect due to a DSM update and I lost my previous settings, so I had to reenter my plex credentials again and bam.

I'm notorious for hitting/finding bugs that nobody else ever encounters, lol :(


Our favourite kind of user [emoji12]

I did a check with my setup, tried to post a "&" through encodeURIComponent() and the http request lines... Everything seems to work as expected.

I wonder, if that has to do with Synology forwarding and possibly modifying/decoding the string again?

Edit: left a message to bwynants - our Synology expert. :-)

can you try https://www.dropbox.com/s/91idrx2f6zcdna6/plexconnect_noarch_0.3-10.spk

Works like a charm!  What was the problem?

On synology, traffic is redirected by apache via a virtual host to plexconnect

Apache decoded the encoded url which made it fail

I  added an attribute to the vhost so that the decoding no longer happens.

https://github.com/bwynants/spksrc/commit/c0a338875ca411adfe4457247d8d285932e510e4

thanks to Baa for pointing in this direction

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.