causefx / Organizr

HTPC/Homelab Services Organizer - Written in PHP
GNU General Public License v3.0
4.99k stars 288 forks source link

Plex Login results in "Login Error - API Connection Failed" #1395

Closed masterzxz closed 4 years ago

masterzxz commented 4 years ago
Organizr Version: V 2.0.570
Branch: Master
WebServer: Nginx
Operating System: Windows Server 2019 Datacenter Edition

Problem Description:

One of my Plex users can no longer login to the Organizr application. Every time he uses "Login with Plex", he gets an error stating "Login Error - API Connection Failed".

The strange thing is that there is nothing pointing to an error in the Organizr logs. Every time he logs in, I see the following lines in the Organizr logs (all with a green "V"):

May 15, 2020 10:57 PM REDACTED@gmail.com IP REDACTED Tautulli Token Function - Grabbed token from: http://192.168.99.149:8181/plx_ttlli [Execution Time: 02.36s \ 2369.5ms]  
May 15, 2020 10:57 PM REDACTED@gmail.com IP REDACTED Ombi Token Function - Grabbed token. [Execution Time: 289.9ms]  
May 15, 2020 10:57 PM REDACTED@gmail.com IP REDACTED Login Function - A User has logged in [Execution Time: 686.9ms]  
May 15, 2020 10:57 PM REDACTED@gmail.com IP REDACTED Plex User Check - User Approved for Login [Execution Time: 20.4ms]  
May 15, 2020 10:57 PM REDACTED@gmail.com IP REDACTED Plex User Check - Found User on Friends List [Execution Time: 602.8ms]

Reproduction Steps:

I have not been able to reproduce the issue myself. Other users report no issues. I have tried to reproduce the issue by connecting to Organizr externally with a user that has the exact same permissions as the user with this issue, so far without any luck. I have also asked this user to disable his adblocker, but that did not solve his issue.

The user is able to login directly into Ombi, Plex, Tautulli, etc. without any issues.


Errors on screen? If so paste here:

Client Side: "Login Error - API Connection Failed" Organizr Log: no errors Nginx Log: no errors

Ornias1993 commented 4 years ago

I think he has cookies blocked, by some browser settings or browser plugin.

Without at least his personal OS, Browser and browser settings combo, this can not be validated. Hence it is not valid as bug report (as there is no bug to report)

HalianElf commented 4 years ago

Can you check your nginx logs? This might be related to #1336

masterzxz commented 4 years ago

I think he has cookies blocked, by some browser settings or browser plugin.

Without at least his personal OS, Browser and browser settings combo, this can not be validated. Hence it is not valid as bug report (as there is no bug to report)

I have requested more info from the user.

Can you check your nginx logs? This might be related to #1336

As stated in the original logs, nginx logs are empty. No errors. I will adjust the mentioned parameters in #1336 and let the user try again.

Will keep you posted.

Ornias1993 commented 4 years ago

Never mind btw: "Login Function - A User has logged in [Execution Time: 686.9ms]"

This shows he actually did get a token/session approved, so he should at least get the token from plex.

masterzxz commented 4 years ago

Can you check your nginx logs? This might be related to #1336

After adding the following 2 lines:

fastcgi_buffers 32 32k; fastcgi_buffer_size 32k;

to the Nginx config, the user was able to login without any further issues. As I am not the first Organizr user with this issue, someone might want to add this to some kind of documentation? ;-)

Thanks for the help everyone.

HalianElf commented 4 years ago

I wrote up a page on docs based on the couple reports we've gotten on this.

kerwindouglas commented 4 years ago

I'm experiencing the exact same issue. Everything is fine with my admin account, but one of the test users on the account is not be able to login. And I've isolated the failed login to happen only when Tautulli/Ombi SSO being enabled at the sametime.

BUT

I've even used the php-fpm version of the docker container and even added fastcgi_buffers 32 32k; fastcgi_buffer_size 32k; to /config/nginx/nginx.conf , but the same result happens.

Here is screenshot of the organizr log. The ottawa username is the test user's failed login with Plex/Tautulli/Ombi SSO enabled. The ones above it, is my admin account that is successful regardless of the state of SSO.

organizr-loginlog

Is this not happening with anyone else?