Local Files are being played as "remote"

Server Version#: 1.23.2.4656
Player Version#: 8.20.1.26670

Attempting to play any local files (server & shield on same network, but server is separate system) results in Plex converting to 720p (the default remote streaming quality.)
It is almost like Plex thinks my server is remote for some reason. Setting the remote streaming setting to Maximum “fixes” this bug and Iron Man will then direct play.

I’m attaching logs from the Shield, as well as logs from the Plex server.

shield_logs.txt (4.7 MB)

Plex Media Server Logs_2021-07-16_14-02-18.zip (9.4 MB)

I can confirm that the Shield is using a remote connection to talk to your server. your logs show that the Shield did try talking to your server using the local IP address, but it failed to get a response back so it chose not to use that connection.

Double check your server to make sure it is still at the .5 address. It may have changed to .20?

Quite strange. I can confirm my server is using the .5 address still.

I just force stopped the Plex app on the Shield and restarted it. Now I can see the files are being played locally, etc. New logs attached at the bottom.

Does it only try the local IP address one time before moving on to the remote connection?

I can see it was using the local IP earlier this morning - then I left the house for a few hours to run errands and came back to this issue. I don’t recall if I left the Plex app running or not when I left the house - I do know that I stopped what I was watching & powered off the Shield/TV using the power button on the remote.

I do find it kind of interesting that there is an error when I stopped watching earlier - I wonder if this coincides with that annoying “unable to navigate” popup - "unable to navigate, item not found" pop-up - or something else entirely.

07-16 09:13:20.017 e: [ServerWebSocket] Websocket error
07-16 09:13:20.017 e: An exception occurred: javax.net.ssl.SSLException: Read error: ssl=0x2c98c50b88: I/O error during system call, Connection reset by peer
07-16 09:13:20.018 e: Stacktrace: javax.net.ssl.SSLException: Read error: ssl=0x2c98c50b88: I/O error during system call, Connection reset by peer
at com.android.org.conscrypt.NativeCrypto.SSL_read(Native Method)
at com.android.org.conscrypt.NativeSsl.read(NativeSsl.java:399)
at com.android.org.conscrypt.ConscryptFileDescriptorSocket$SSLInputStream.read(ConscryptFileDescriptorSocket.java:546)
at f.q.read(SourceFile:5)
at f.d$d.read(SourceFile:3)
at f.y.x(SourceFile:5)
at f.y.b0(SourceFile:1)
at f.y.readByte(SourceFile:1)
at okhttp3.internal.ws.WebSocketReader.readHeader(SourceFile:4)
at okhttp3.internal.ws.WebSocketReader.processNextFrame(SourceFile:1)
at okhttp3.internal.ws.RealWebSocket.loopReader(SourceFile:2)
at okhttp3.internal.ws.RealWebSocket$connect$1.onResponse(SourceFile:14)
at okhttp3.internal.connection.RealCall$AsyncCall.run(SourceFile:7)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)
07-16 09:13:20.030 e: [ServerWebSocket] Websocket error
07-16 09:13:20.030 e: An exception occurred: javax.net.ssl.SSLException: Read error: ssl=0x2c98e0d188: I/O error during system call, Connection reset by peer
07-16 09:13:20.031 e: Stacktrace: javax.net.ssl.SSLException: Read error: ssl=0x2c98e0d188: I/O error during system call, Connection reset by peer
at com.android.org.conscrypt.NativeCrypto.SSL_read(Native Method)
at com.android.org.conscrypt.NativeSsl.read(NativeSsl.java:399)
at com.android.org.conscrypt.ConscryptFileDescriptorSocket$SSLInputStream.read(ConscryptFileDescriptorSocket.java:546)
at f.q.read(SourceFile:5)
at f.d$d.read(SourceFile:3)
at f.y.b(SourceFile:7)
at f.y.p(SourceFile:1)
at okhttp3.internal.http1.HeadersReader.readLine(SourceFile:1)
at okhttp3.internal.http1.Http1ExchangeCodec.readResponseHeaders(SourceFile:2)
at okhttp3.internal.connection.Exchange.readResponseHeaders(SourceFile:1)
at okhttp3.internal.http.CallServerInterceptor.intercept(SourceFile:25)
at okhttp3.internal.http.RealInterceptorChain.proceed(SourceFile:12)
at okhttp3.internal.connection.ConnectInterceptor.intercept(SourceFile:4)
at okhttp3.internal.http.RealInterceptorChain.proceed(SourceFile:12)
at okhttp3.internal.cache.CacheInterceptor.intercept(SourceFile:27)
at okhttp3.internal.http.RealInterceptorChain.proceed(SourceFile:12)
at okhttp3.internal.http.BridgeInterceptor.intercept(SourceFile:22)
at okhttp3.internal.http.RealInterceptorChain.proceed(SourceFile:12)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(SourceFile:7)
at okhttp3.internal.http.RealInterceptorChain.proceed(SourceFile:12)
at com.plexapp.plex.net.x2.intercept(SourceFile:33)
at okhttp3.internal.http.RealInterceptorChain.proceed(SourceFile:12)
at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(SourceFile:16)
at okhttp3.internal.connection.RealCall$AsyncCall.run(SourceFile:6)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)
07-16 09:13:20.751 i: [PlaybackTimeBehaviour] Time: 418613 IsStarted: true
07-16 09:13:20.847 i: [EngineEventManager] onPlaybackStopped: Closed
07-16 09:13:20.848 i: [Player][Timeline] Playback stopped (error: false)

But yeah, looks like it failed to use the local server when I came back from my errands.

shield_logs.txt (4.9 MB)

I see that around 8 and 9 am you played something and it was working locally. There is a pause until about 1:30 pm. When you turned on the app, it tried to find your server but it was nor responding on the local network., so it tried the remote connection and that worked. I’m not sure why your sever isn’t responding locally. Does that server machine go to sleep or something? It’s possible the app isn’t waiting long enough for the local connection before moving on.

Nope, that server never goes to sleep and I was able to play locally from other devices during that time (tested Windows Plex app from my PC.)

Server is running in a FreeNAS jail and has been up for the last week & a half.
Do you see anything in the corresponding server logs by chance?

There was nothing in the initial server log you provided, but you did not provide one to go with that second shield log.

I will call this a fluke for now @anon18523487, but I continue to run into bugs regularly on the Shield. I have created two other topics recently - [BUG] Android TV doesn't always mark episodes as watched & [BUG]Shield Video Player frozen for 5-10 seconds at start of playback.
Are you able to look at either of those and help out?

I have also found more bugs just in the week that I have been testing the app. Is this forum the best/only way to report these? Should I continue to create separate topics for each bug? I really want to use/like the Shield, but I feel like the Android TV app is just riddled with bugs, and it is painful every time I use it.

Thanks for your help, I really do appreciate your time & assistance.

Both of those issues have been reported before and are being investigated. If you search you should be able to find the previous threads.

Please report any bugs/odd behaviors so they can be checked.

Is this the thread? Android TV New Video Player - Issues w/ Items Marked as Watched

I haven’t seen any Plex employee post in there since 2020, can you maybe provide a status update?

I have also posted myriad threads in the Plex Players/Streaming Devices forum, being sure to tag Android-TV, for the other bugs that I have encountered in the past week. I hope to see you in those threads. :slight_smile:

This happened again today - same circumstances.
I was playing media in the morning - all direct played, etc. Stepped away for a few hours, came back and started a video only to find it transcoding and playing as a “remote” connection again.

Attached are logs showing the same thing as before - only this time I can’t even see the local API attempt in the server logs. The issue happens at 14:28:18-14:28:25 in the server logs, which ends up being “Plex Media Server.6.log.”

Plex Media Server Logs_2021-09-24_15-00-48.zip (13.0 MB)

shield_logs_9_24_21_v2.txt (4.9 MB)

In the Shield logs, you can see that I “resumed HomeActivity” at 14:28:04 - that must have been when I officially came back. A few seconds later at 14:28:17 - you can see the “failed” local API call - but like I said, I can’t find the corresponding failed API call on the server side or anything. The server was running & accessible, etc. as you can tell from the server logs.

I force killed the Plex app and now it appears to be direct playing & “local” again.

The Shield is unable to find your server locally. i.e. It pings the servers local IP, but gets an error.

09-24 14:28:17.214 i: Fetching [method:GET] https://192.168.1.5:32400/media/providers?includePreferences=1&X-Plex-Token=...y1YN&X-Plex-Language=en-us
09-24 14:28:17.225 w: [MediaProvidersApiClient] Deathstar Couldn’t fetch providers. Result: Error (null)

It is correctly falling back to the secondary connection which is the remote connection. There is no indication on why it can’t reach the server on the local IP. Considering this is intermittent, I’m inclined to think this is a network issue and not an app issue.

I force killed the Plex app and now it appears to be direct playing & “local” again.

You sure? Your Shield and server logs both show the remote IP being used to access your server.

You are right - the logs do appear to show the remote IP connection still. I’m not entirely sure why that is. I could have sworn the media I was testing was direct playing and no longer transcoding due to bitrate limitations. Looks like it went back to using local a little while later, per a different set of server logs that day.

What I don’t understand is why only the Android app seems to have a problem connecting to the local IP, why it fails back to the internet connection immediately and seemingly doesn’t fail back until much later?

I can see other local clients communicating with the Plex server in those server logs, at the same time the Android app claims the server is inaccessible. API call from 192.168.1.24 was successful literally one second before the Android app claims the server is unavailable.

Sep 24, 2021 14:28:16.051 [0x8159cfe00] DEBUG - Request: [192.168.1.24:43920 (Allowed Network (Subnet))] GET /status/sessions (14 live) GZIP Signed-in Token ()
Sep 24, 2021 14:28:16.051 [0x8159cfe00] DEBUG - [Now] Adding 0 sessions.
Sep 24, 2021 14:28:16.052 [0x8070fa800] DEBUG - Completed: [192.168.1.24:43920] 200 GET /status/sessions (14 live) GZIP 0ms 397 bytes (pipelined: 19)
Sep 24, 2021 14:28:16.206 [0x807538800] DEBUG - [MediaProviderManager] HTTP/1.1 (0.2s) 200 response from GET https://plex.tv/media/providers?X-Plex-Token=xxxxxxxxxxxxxxxxxxxx (reused)
Sep 24, 2021 14:28:16.206 [0x807538800] DEBUG - [MediaProviderManager] discovered cloud provider (Metadata)
Sep 24, 2021 14:28:16.206 [0x807538800] DEBUG - [MediaProviderManager] loading cloud provider details (Metadata) (alive: 1)
Sep 24, 2021 14:28:16.206 [0x807538800] DEBUG - [MediaProviderManager] we had 1 cloud providers online, we now have 1
Sep 24, 2021 14:28:16.206 [0x807538800] DEBUG - [MediaProviderManager] cloud provider (Metadata) is online and available

Plex Android app sends the API call at 14:28:17 and then these messages appear in the server log:

Sep 24, 2021 14:28:18.451 [0x8070fad00] DEBUG - WebSocket: client initiated close
Sep 24, 2021 14:28:18.451 [0x8070fa800] DEBUG - NotificationStream: Removing because of close
Sep 24, 2021 14:28:18.453 [0x8070fad00] DEBUG - handleStreamRead code 2: End of file
Sep 24, 2021 14:28:18.454 [0x8070fad00] DEBUG - Completed after connection close: [192.168.1.193:55508] -3 GET /:/websockets/notifications (14 live) TLS GZIP 5983ms 4 bytes
Sep 24, 2021 14:28:19.612 [0x8070fa800] DEBUG - handleStreamRead code 1: stream truncated
Sep 24, 2021 14:28:19.612 [0x8070fa800] DEBUG - NotificationStream: Removing because of error
Sep 24, 2021 14:28:19.613 [0x8070fa800] DEBUG - Completed after connection close: [192.168.1.193:55458] -3 GET /:/websockets/notifications (9 live) TLS GZIP 1357302ms 3803473 bytes
Sep 24, 2021 14:28:25.082 [0x8070fad00] DEBUG - Request came in with unrecognized domain / IP ‘98.144.67.139’ in header Host; treating as non-local
Sep 24, 2021 14:28:25.082 [0x8070fad00] DEBUG - Auth: authenticated user 1 as Pow4Life181

Why is the stream truncated? Why was it removed? What is the error? Why is the client closing that socket?
Why does the Android app try once on the local network and immediately fail to remote? What is the error of the local network failure?

Plex server continues to handle other local API calls, proving it is accessible, IMO?

Sep 24, 2021 14:28:26.688 [0x8070fad00] DEBUG - Auth: authenticating user as guest
Sep 24, 2021 14:28:26.688 [0x808e48000] DEBUG - Request: [192.168.1.24:43920 (Allowed Network (Subnet))] GET /clients (17 live) GZIP Signed-in Token ()
Sep 24, 2021 14:28:26.688 [0x8070fad00] DEBUG - Completed: [192.168.1.24:43920] 200 GET /clients (17 live) GZIP 0ms 610 bytes (pipelined: 20)

Is your Shield on WiFi? It may be a Shield issue. I’ve found it’s Wifi connections to be flaky at times.

Yes, it is.

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