Open hhwong opened 3 years ago
It's strange, ffmpeg is having trouble with the tls verification.
2020-12-01T16:53:57.101 [ ERROR ] [mpv] ffmpeg: tls: Peer certificate failed verification
2020-12-01T16:53:57.103 [ ERROR ] [mpv] stream: Failed to open https://192-168-88-78.9b3571bfb8954e30a583cb550f26739b.plex.direct:32400/library/parts/132540/1606523106/file.mkv?X-Plex-Session-Identifier=k3qyzlyqn78zxvuy58ynmzl8&X-Plex-Product=Plex%20for%20Mac&X-Plex-Version=1.24.0.1483-714cba36&X-Plex-Client-Identifier=m5kpynr71q330a921sg0u568&X-Plex-Platform=osx&X-Plex-Platform-Version=10.16&X-Plex-Sync-Version=2&X-Plex-Features=external-media%2Cindirect-media&X-Plex-Model=standalone&X-Plex-Device-Name=SpacebookPro.local&X-Plex-Device-Screen-Resolution=1582x937%2C2560x1440&X-Plex-Client-Profile-Name=Plex%20Desktop&X-Plex-Token=xxxxxxxxxxxxxxxxxxxx&X-Plex-Language=en&Accept-Language=en.
2020-12-01T16:53:57.103 [ DEBUG ] [mpv] cplayer: Opening failed or was aborted: https://192-168-88-78.9b3571bfb8954e30a583cb550f26739b.plex.direct:32400/library/parts/132540/1606523106/file.mkv?X-Plex-Session-Identifier=k3qyzlyqn78zxvuy58ynmzl8&X-Plex-Product=Plex%20for%20Mac&X-Plex-Version=1.24.0.1483-714cba36&X-Plex-Client-Identifier=m5kpynr71q330a921sg0u568&X-Plex-Platform=osx&X-Plex-Platform-Version=10.16&X-Plex-Sync-Version=2&X-Plex-Features=external-media%2Cindirect-media&X-Plex-Model=standalone&X-Plex-Device-Name=SpacebookPro.local&X-Plex-Device-Screen-Resolution=1582x937%2C2560x1440&X-Plex-Client-Profile-Name=Plex%20Desktop&X-Plex-Token=xxxxxxxxxxxxxxxxxxxx&X-Plex-Language=en&Accept-Language=en
@hhwong will you please run this command in Terminal and respond with the output?
openssl s_client -connect 192-168-88-78.9b3571bfb8954e30a583cb550f26739b.plex.direct:32400
% openssl s_client -connect 192-168-88-78.9b3571bfb8954e30a583cb550f26739b.plex.direct:32400 getaddrinfo: nodename nor servname provided, or not known connect:errno=0
Thanks, that's helpful. You mentioned the web app can play; can you determine which URL is being played in the app?
Do you have DNS rebinding protection on your local network?
The URL on the browser is https://app.plex.tv/desktop. I'm digging around the inspector on Safari and there is a wss:// url that has my public IP on it plus 113.9b.3571bfb8954e30a583cb550f26739b.plex.direct:19158
I use pi-hole on my home network but I've had that working for the last 5 months with no change. This error just started happening after I quit when a video was playing in fullscreen mode (I'm using Big Sur, BTW). The next time I ran the Plex app, this error started happening.
I just tried it with my iPhone and Roku-powered TV and they work fine. I'm only having problems with the Mac app.
Pi-hole definitely performs DNS rebinding protection. So you need to define an exception in its preferences for the domain plex.direct
https://support.plex.tv/articles/206225077-how-to-use-secure-server-connections/
I ran into the similar problems with my Pi-hole. I believe we should be able to work around DNS rebinding protection within the application itself. Will spend some time verifying.
The strange thing is that none of the other apps on my home network have this problem and they're also using pi-hole as DNS. Also, I'm able to connect securely to the server to browse my library (I see the green padlock icon in settings). It just can't play the videos.
It's a good point. Our web app at https://app.plex.tv cannot talk to your local server insecurely; so the browser would need to be able to resolve the plex.direct
hostname.
The openssl
output above suggests DNS resolution is failing. That lines up with the ffmpeg log message.
When the green lock is shown on your server name in settings, just to double confirm, are you using https://app.plex.tv? Or, just maybe, are you browsing using a loopback IP, eg http://127.0.0.1:32400 or http://localhost:32400?
I'm using https://app.plex.tv. I also just did a clean reinstall of the Plex app (deleting all the files in ~/Library) and the problem persists. Might be a Big Sur-related bug? And where is the ffmpeg used by Plex located?
I just did a clean install of the Plex app on a new MacBook Pro (Big Sur too), and the problem persisted. Was checking to see if there was a local corruption of data. Also tried disabling pi-hole with the same result.
It started working again. I was also having issues with t.co redirects (darn Twitter), so I flushed the DNS cache on my laptop using:
dscacheutil -flushcache
Still doesn't explain why the new laptop had the same issue.
Well that was a temporary fix. The problem is back again and flushing DNS doesn't seem to be working. This is a weird problem.
PMS Version: 1.21.0.3711 (Synology x86) PMP Version: 1.24.0.1483-714cba36 Platform: macOS
Steps to reproduce
Current behavior
Expected behavior
It works using the web app (app.plex.tv) on the server.
Plex.log.zip