[GH-ISSUE #216] Plex + Logging/Debugging #1347

Closed
opened 2026-04-16 07:59:52 -05:00 by GiteaMirror · 10 comments
Owner

Originally created by @hikeeba on GitHub (Feb 17, 2025).
Original GitHub issue: https://github.com/fosrl/pangolin/issues/216

Love this project and I'm excited to see where it goes.

Below are the details of my issue. I'm not sure if this is a Plex config issue or not, but it doesn't seem like it at the moment.

I'm using Pangolin to replace the need for Cloudflare tunnels, and I believe everything is set up as expected, but I am unable to get the Plex iOS app to see my home Plex server, through Pangolin, when not on my home network. I am able to see, and play videos, using the Plex website remotely, just not the iOS app.

  • Home Network
    • Plex is running in docker on Unraid, network mode is host, port is 32400.
    • Plex is configured w/ remote access disabled, relay disabled, and under networking Custom server access URLs is set to https://[my plex domain through pangolin]:443.
    • Newt is running in docker on Unraid, network mode is bridge.
  • VPS
    • Pangolin is running in AWS on EC2 in docker w/ public IP and domain pointed at it w/ TLS.
    • The resource pointing to Plex in Pangolin is HTTP, SSL enabled, and pointing to Unraid LAN IP with Plex port (32400).
  • What Works
    • Connecting to Plex website using browser, either on the home LAN or remotely through Pangolin.
    • Playing Plex videos using browser, either on the home LAN or remotely through Pangolin.
    • The Plex website works in the browser using both my domain, or app.plex.tv.
    • Playing Plex videos using iOS app while on the LAN.
  • What Doesn't Work
    • Connecting to Plex using the iOS app remotely. Cannot see the server (it shows as offline), and then of course play videos.

I've tried logging in/out of the app, reinstalling Plex on iOS, and rebooting my phone.

Ultimately I'm not sure if this issue is Plex or not, but I'd like to be able to diagnose it and if you could provide some details on how to do that I'd be grateful. Or if you have an idea on what I've misconfigured that would be awesome.

Best,
John

Originally created by @hikeeba on GitHub (Feb 17, 2025). Original GitHub issue: https://github.com/fosrl/pangolin/issues/216 Love this project and I'm excited to see where it goes. Below are the details of my issue. I'm not sure if this is a Plex config issue or not, but it doesn't seem like it at the moment. I'm using Pangolin to replace the need for Cloudflare tunnels, and I believe everything is set up as expected, but I am unable to get the Plex iOS app to see my home Plex server, through Pangolin, when not on my home network. I am able to see, and play videos, using the Plex website remotely, just not the iOS app. - Home Network - Plex is running in docker on Unraid, network mode is host, port is 32400. - Plex is configured w/ remote access disabled, relay disabled, and under networking Custom server access URLs is set to `https://[my plex domain through pangolin]:443`. - Newt is running in docker on Unraid, network mode is bridge. - VPS - Pangolin is running in AWS on EC2 in docker w/ public IP and domain pointed at it w/ TLS. - The resource pointing to Plex in Pangolin is HTTP, SSL enabled, and pointing to Unraid LAN IP with Plex port (32400). - What Works - Connecting to Plex website using browser, either on the home LAN or remotely through Pangolin. - Playing Plex videos using browser, either on the home LAN or remotely through Pangolin. - The Plex website works in the browser using both my domain, or `app.plex.tv`. - Playing Plex videos using iOS app while on the LAN. - What Doesn't Work - Connecting to Plex using the iOS app remotely. Cannot see the server (it shows as offline), and then of course play videos. I've tried logging in/out of the app, reinstalling Plex on iOS, and rebooting my phone. Ultimately I'm not sure if this issue is Plex or not, but I'd like to be able to diagnose it and if you could provide some details on how to do that I'd be grateful. Or if you have an idea on what I've misconfigured that would be awesome. Best, John
Author
Owner

@hikeeba commented on GitHub (Feb 17, 2025):

Well, I was able to pull from debugging logs from the Plex iOS app and here is what I see.

2025/02/16 22:12:23.960 (48751) 📝 PMKConnectionTestOperation.m:70 | Error during test of <PMKPlexServerConnection: 0x3004336b0>[ [mydomain]:443 - plex,published,direct,verified ] (remaining attempts 0): Error Domain=com.alamofire.error.serialization.response Code=-1011 "Request failed: unauthorized (401)" UserInfo={NSLocalizedDescription=Request failed: unauthorized (401), NSErrorFailingURLKey=https://[mydomain]:443/?X-Plex-Language=en-US&X-Plex-Device-Name=iPhone, com.alamofire.serialization.response.error.data={length = 13, bytes = 0x556e617574686f72697a65640a}, com.alamofire.serialization.response.error.response=<NSHTTPURLResponse: 0x302d8f780> { URL: https://[mydomain]:443/?X-Plex-Language=en-US&X-Plex-Device-Name=iPhone } { Status Code: 401, Headers {
    "Content-Length" =     (
        13
    );
    "Content-Type" =     (
        "text/plain; charset=utf-8"
    );
    Date =     (
        "Mon, 17 Feb 2025 03:12:23 GMT"
    );
    "x-content-type-options" =     (
        nosniff
    );
} }}
2025/02/16 22:12:23.960 (48546) ❌ PMKConnectionManager.m:1076 | Error when connecting to <PMKServer: 0x301529f80>[ Potamoi (be0975ed6c992c843a346fbc2c76bfcd9dc42096) - server,standard,hasPresence (1.41.4.9463-630c9f557) ] using <PMKPlexServerConnection: 0x3004336b0>[ [mydomain]:443 - plex,published,direct,verified ]: Error Domain=com.alamofire.error.serialization.response Code=-1011 "Request failed: unauthorized (401)" UserInfo={NSLocalizedDescription=Request failed: unauthorized (401), NSErrorFailingURLKey=https://[mydomain]:443/?X-Plex-Language=en-US&X-Plex-Device-Name=iPhone, com.alamofire.serialization.response.error.data={length = 13, bytes = 0x556e617574686f72697a65640a}, com.alamofire.serialization.response.error.response=<NSHTTPURLResponse: 0x302d8f780> { URL: https://[mydomain]:443/?X-Plex-Language=en-US&X-Plex-Device-Name=iPhone } { Status Code: 401, Headers {
    "Content-Length" =     (
        13
    );
    "Content-Type" =     (
        "text/plain; charset=utf-8"
    );
    Date =     (
        "Mon, 17 Feb 2025 03:12:23 GMT"
    );
    "x-content-type-options" =     (
        nosniff
    );
} }}
2025/02/16 22:12:23.966 (48541) ➖ PMSourceManager.m:565 | Processing Potamoi
2025/02/16 22:12:23.966 (48541) ➖ PMSourceManager.m:479 | Processing media providers for Potamoi
2025/02/16 22:12:23.966 (48541) ➖ PMSourceManager.m:494 | No media providers for Potamoi
<!-- gh-comment-id:2661880472 --> @hikeeba commented on GitHub (Feb 17, 2025): Well, I was able to pull from debugging logs from the Plex iOS app and here is what I see. ``` 2025/02/16 22:12:23.960 (48751) 📝 PMKConnectionTestOperation.m:70 | Error during test of <PMKPlexServerConnection: 0x3004336b0>[ [mydomain]:443 - plex,published,direct,verified ] (remaining attempts 0): Error Domain=com.alamofire.error.serialization.response Code=-1011 "Request failed: unauthorized (401)" UserInfo={NSLocalizedDescription=Request failed: unauthorized (401), NSErrorFailingURLKey=https://[mydomain]:443/?X-Plex-Language=en-US&X-Plex-Device-Name=iPhone, com.alamofire.serialization.response.error.data={length = 13, bytes = 0x556e617574686f72697a65640a}, com.alamofire.serialization.response.error.response=<NSHTTPURLResponse: 0x302d8f780> { URL: https://[mydomain]:443/?X-Plex-Language=en-US&X-Plex-Device-Name=iPhone } { Status Code: 401, Headers { "Content-Length" = ( 13 ); "Content-Type" = ( "text/plain; charset=utf-8" ); Date = ( "Mon, 17 Feb 2025 03:12:23 GMT" ); "x-content-type-options" = ( nosniff ); } }} 2025/02/16 22:12:23.960 (48546) ❌ PMKConnectionManager.m:1076 | Error when connecting to <PMKServer: 0x301529f80>[ Potamoi (be0975ed6c992c843a346fbc2c76bfcd9dc42096) - server,standard,hasPresence (1.41.4.9463-630c9f557) ] using <PMKPlexServerConnection: 0x3004336b0>[ [mydomain]:443 - plex,published,direct,verified ]: Error Domain=com.alamofire.error.serialization.response Code=-1011 "Request failed: unauthorized (401)" UserInfo={NSLocalizedDescription=Request failed: unauthorized (401), NSErrorFailingURLKey=https://[mydomain]:443/?X-Plex-Language=en-US&X-Plex-Device-Name=iPhone, com.alamofire.serialization.response.error.data={length = 13, bytes = 0x556e617574686f72697a65640a}, com.alamofire.serialization.response.error.response=<NSHTTPURLResponse: 0x302d8f780> { URL: https://[mydomain]:443/?X-Plex-Language=en-US&X-Plex-Device-Name=iPhone } { Status Code: 401, Headers { "Content-Length" = ( 13 ); "Content-Type" = ( "text/plain; charset=utf-8" ); Date = ( "Mon, 17 Feb 2025 03:12:23 GMT" ); "x-content-type-options" = ( nosniff ); } }} 2025/02/16 22:12:23.966 (48541) ➖ PMSourceManager.m:565 | Processing Potamoi 2025/02/16 22:12:23.966 (48541) ➖ PMSourceManager.m:479 | Processing media providers for Potamoi 2025/02/16 22:12:23.966 (48541) ➖ PMSourceManager.m:494 | No media providers for Potamoi ```
Author
Owner

@hikeeba commented on GitHub (Feb 17, 2025):

The resource for Plex in Pangolin is set as Not Protected. So it looks like it's trying to connect, so the settings from Plex are working. Not sure when the auth failure though.

I haven't tried swapping from HTTP to TCP/UDP in Pangolin, but it doesn't seem like that should be needed.

<!-- gh-comment-id:2661882795 --> @hikeeba commented on GitHub (Feb 17, 2025): The resource for Plex in Pangolin is set as `Not Protected`. So it looks like it's trying to connect, so the settings from Plex are working. Not sure when the auth failure though. I haven't tried swapping from HTTP to TCP/UDP in Pangolin, but it doesn't seem like that should be needed.
Author
Owner

@miloschwartz commented on GitHub (Feb 17, 2025):

Hi, this is an issue we've dealt with before and the work around right now is to create a raw TCP resource for TCP 32400 and then enter http://[vps-ip]:32400 into the custom URLs in the Plex iOS app. More info discussed in this thread on Discord.

I don't want to speak too soon, but I think we may have found the root cause of the problem and will have a fix out in the next update, allowing you to use the HTTPS resource as you expect. I think it has something to do with the iOS app sending requests with :443 appended to the end, thus causing Badger to not match it to the correct resource in the backend.

<!-- gh-comment-id:2661884851 --> @miloschwartz commented on GitHub (Feb 17, 2025): Hi, this is an issue we've dealt with before and the work around right now is to create a raw TCP resource for TCP 32400 and then enter `http://[vps-ip]:32400` into the custom URLs in the Plex iOS app. More info discussed in this [thread on Discord](https://discordapp.com/channels/1325658630518865980/1339101438705532989). I don't want to speak too soon, but I think we may have found the root cause of the problem and will have a fix out in the next update, allowing you to use the HTTPS resource as you expect. I think it has something to do with the iOS app sending requests with `:443` appended to the end, thus causing Badger to not match it to the correct resource in the backend.
Author
Owner

@hikeeba commented on GitHub (Feb 17, 2025):

Thanks for the quick response! I'll try that workaround and wait for the next update.

<!-- gh-comment-id:2661889033 --> @hikeeba commented on GitHub (Feb 17, 2025): Thanks for the quick response! I'll try that workaround and wait for the next update.
Author
Owner

@scroguard commented on GitHub (Feb 19, 2025):

Hi, this is an issue we've dealt with before and the work around right now is to create a raw TCP resource for TCP 32400 and then enter http://[vps-ip]:32400 into the custom URLs in the Plex iOS app. More info discussed in this thread on Discord.

I don't want to speak too soon, but I think we may have found the root cause of the problem and will have a fix out in the next update, allowing you to use the HTTPS resource as you expect. I think it has something to do with the iOS app sending requests with :443 appended to the end, thus causing Badger to not match it to the correct resource in the backend.

i can confirm that you're on the right track with this. i had a similar issue when attempting to use caddy previously, as well as traefik, as a reverse proxy for plex. From what I've gathered the iOS app, as well as the XBOX one app, append the port number to the URL which indeed will cause a mismatch on the resource.

<!-- gh-comment-id:2669171819 --> @scroguard commented on GitHub (Feb 19, 2025): > Hi, this is an issue we've dealt with before and the work around right now is to create a raw TCP resource for TCP 32400 and then enter `http://[vps-ip]:32400` into the custom URLs in the Plex iOS app. More info discussed in this [thread on Discord](https://discordapp.com/channels/1325658630518865980/1339101438705532989). > > I don't want to speak too soon, but I think we may have found the root cause of the problem and will have a fix out in the next update, allowing you to use the HTTPS resource as you expect. I think it has something to do with the iOS app sending requests with `:443` appended to the end, thus causing Badger to not match it to the correct resource in the backend. i can confirm that you're on the right track with this. i had a similar issue when attempting to use caddy previously, as well as traefik, as a reverse proxy for plex. From what I've gathered the iOS app, as well as the XBOX one app, append the port number to the URL which indeed will cause a mismatch on the resource.
Author
Owner

@miloschwartz commented on GitHub (Feb 27, 2025):

For those of you with this issue, can you test out the latest 1.0.0-beta.15 release and let me know if we made any progress on fixing this? The new update strips 443 and 80 from the hostname when Badger authenticates with the resources. 🤞

<!-- gh-comment-id:2688516970 --> @miloschwartz commented on GitHub (Feb 27, 2025): For those of you with this issue, can you test out the latest [1.0.0-beta.15](https://github.com/fosrl/pangolin/releases/tag/1.0.0-beta.15) release and let me know if we made any progress on fixing this? The new update strips 443 and 80 from the hostname when Badger authenticates with the resources. 🤞
Author
Owner

@hikeeba commented on GitHub (Feb 27, 2025):

Excellent. I'll test it today and let you know how it goes.

<!-- gh-comment-id:2688576851 --> @hikeeba commented on GitHub (Feb 27, 2025): Excellent. I'll test it today and let you know how it goes.
Author
Owner

@manilx commented on GitHub (Feb 27, 2025):

Just tested. IOS connects just fine now!

<!-- gh-comment-id:2688591022 --> @manilx commented on GitHub (Feb 27, 2025): Just tested. IOS connects just fine now!
Author
Owner

@hikeeba commented on GitHub (Feb 27, 2025):

Appears to be working for me. Thanks for getting this in the latest update.

<!-- gh-comment-id:2689079852 --> @hikeeba commented on GitHub (Feb 27, 2025): Appears to be working for me. Thanks for getting this in the latest update.
Author
Owner

@skyzuma commented on GitHub (Jan 12, 2026):

i use the same setup but it will not work with the android app. i use latest unraid ... latest pangolin / newt / etc.pp and i use crowdsec, maybe is crowdsec the problem?

<!-- gh-comment-id:3739636453 --> @skyzuma commented on GitHub (Jan 12, 2026): i use the same setup but it will not work with the android app. i use latest unraid ... latest pangolin / newt / etc.pp and i use crowdsec, maybe is crowdsec the problem?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/pangolin#1347