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

SSL Certificate verification failed when using HTTPS required in Plex #2

Open
gentertain opened this issue Jun 20, 2024 · 6 comments
Open

Comments

@gentertain
Copy link

gentertain commented Jun 20, 2024

When the Plex Server is set to "Secure connections: Required" the connection from EMP fails because the certificate is invalid for the IP:
HTTPSConnectionPool(host='192.168.1.90', port=32400): Max retries exceeded with url: / (Caused by SSLError(SSLCertVerificationError(1, "[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: IP address mismatch, certificate is not valid for '192.168.1.90'. (_ssl.c:1135)")))

Perhaps an option to ignore SSL Certificate can be added in config to prevent this.

@x1ao4
Copy link
Owner

x1ao4 commented Jun 20, 2024

Do you have a domain name with a certificate pointing to your server's address? If so, you can try using your server's HTTPS domain name in the config to connect to the server. I think this should resolve the issue.

@gentertain
Copy link
Author

In this case i dont, this would also require to set a custom certificate in plex server, alternatively it would require to do a U-turn via a reverse proxy that has the doamin with proper certificate. It would be preferrable to do the connection EMP-PMS internally without requiring any external domains or services. another workaround is using the provided ip.xxx.plex.direct subdomain, though it is unclear if that might change frequently.

@x1ao4
Copy link
Owner

x1ao4 commented Jun 20, 2024

Alright, I'll see if I can find a way to solve this problem. I'm not a professional developer; I even used Copilot to write EMP. So, I'm not sure if I can fix it, but I'll give it a try. Do you have to set Secure connections to Required? If you set it to Preferred, this issue shouldn't occur.

@gentertain
Copy link
Author

Yes the issue only occurs when set to required.

@gentertain
Copy link
Author

gentertain commented Jun 20, 2024

I am not developer either but i think using this option in the request might already solve the issue:
response = requests.get(server, headers=headers, **verify=False**)
if this option can be set via the config file that would be ideal.

@x1ao4
Copy link
Owner

x1ao4 commented Jun 20, 2024

Alright, I'll test it when I have time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants