Server Version#:1.18.8.2527
Player Version#:7.29.2.16071
Recently I’ve encountered an issue where the android TV plex app will abruptly terminate a stream that is direct playing on android TV with the help of rcombs (big thanks) I was able to determine that it was related to the value configured under the “terminate sessions paused for longer than” setting.
In my case the value was set to 10 minutes and my stream sessions were consistently be cut out at 11 or so minutes, this behavior only happens on Android TV, and one when the video is being direct played, if the video has subtitles or is being played at a lower quality the server will not forcefully close the session.
03-23 15:51:28.110 i: Fetching [method:GET] https://192.168.0.3:32400/:/timeline?audioStreamID=173910&bufferedTime=31733&duration=1299590&guid=com.plexapp.agents.thetvdb%3A%2F%2F269586%2F2%2F12%3Flang%3Den&key=%2Flibrary%2Fmetadata%2F15669&playbackTime=610205&playQueueItemID=170694&ratingKey=15669&state=playing&time=607239&token=...5HR2&X-Plex-Client-Identifier=fd432632bb45f484-com-plexapp-android&X-Plex-Token=...5HR2
03-23 15:51:28.465 i: [ExoPlayer][EventLogger] loading [617.35, 607.62, window=0, true]
03-23 15:51:28.577 i: [ExoPlayer][EventLogger] loading [617.47, 607.73, window=0, false]
03-23 15:51:28.736 i: [ExoPlayer][EventLogger] loading [617.62, 607.89, window=0, true]
03-23 15:51:28.746 i: [ExoPlayer][EventLogger] loading [617.64, 607.90, window=0, false]
03-23 15:51:31.840 i: [ExoPlayer][EventLogger] loading [620.73, 611.00, window=0, true]
03-23 15:51:31.952 i: [ExoPlayer][EventLogger] loading [620.84, 611.11, window=0, false]
03-23 15:51:35.256 i: [ExoPlayer][EventLogger] loading [624.15, 614.41, window=0, true]
03-23 15:51:35.277 i: [ExoPlayer][EventLogger] loading [624.16, 614.43, window=0, false]
03-23 15:51:36.854 i: [ExoPlayer][EventLogger] loading [625.74, 616.01, window=0, true]
03-23 15:51:37.020 i: [ExoPlayer][EventLogger] loading [625.91, 616.17, window=0, false]
03-23 15:51:38.111 i: [PlaybackTimeBehaviour] Time: 620208 IsStarted: true
03-23 15:51:38.115 i: Fetching [method:GET] https://192.168.0.3:32400/:/timeline?audioStreamID=173910&bufferedTime=33615&duration=1299590&guid=com.plexapp.agents.thetvdb%3A%2F%2F269586%2F2%2F12%3Flang%3Den&key=%2Flibrary%2Fmetadata%2F15669&playbackTime=620209&playQueueItemID=170694&ratingKey=15669&state=playing&time=617073&token=...5HR2&X-Plex-Client-Identifier=fd432632bb45f484-com-plexapp-android&X-Plex-Token=...5HR2
03-23 15:51:41.850 i: [ExoPlayer][EventLogger] loading [630.74, 621.01, window=0, true]
03-23 15:51:41.927 i: [FFmpeg] [ERROR] [tls @ 0xcb384d20] Error in the pull function.
03-23 15:51:41.928 i: [FFmpeg] [WARN] [https @ 0xbaf7f740] Will reconnect at 1121981903 in 0 second(s), error=I/O error.
03-23 15:51:41.973 i: [ExoPlayer][EventLogger] loading [630.86, 621.13, window=0, false]
03-23 15:51:42.168 i: [FFmpeg] [WARN] [https @ 0xbaf7f740] HTTP error 503 Service Unavailable
03-23 15:51:42.183 i: [FFmpeg] [ERROR] [tls @ 0xcb384d20] The specified session has been invalidated for some reason.
03-23 15:51:42.186 i: [FFmpeg] [WARN] [https @ 0xbaf7f740] Will reconnect at 1121981903 in 1 second(s), error=I/O error.
03-23 15:51:43.394 i: [FFmpeg] [WARN] [https @ 0xbaf7f740] HTTP error 503 Service Unavailable
03-23 15:51:43.410 i: [FFmpeg] [ERROR] [tls @ 0xcb384d20] The specified session has been invalidated for some reason.
03-23 15:51:43.411 i: [FFmpeg] [WARN] [https @ 0xbaf7f740] Will reconnect at 1121981903 in 3 second(s), error=I/O error.
03-23 15:51:46.607 i: [FFmpeg] [WARN] [https @ 0xbaf7f740] HTTP error 503 Service Unavailable
03-23 15:51:46.625 i: [FFmpeg] [WARN] [https @ 0xbaf7f740] Will reconnect at 1121981903 in 7 second(s), error=I/O error.
03-23 15:51:46.628 i: [FFmpeg] [ERROR] [tls @ 0xcb384d20] The specified session has been invalidated for some reason.
The time stamp for the error on the client matches the timestamp for the server error:
Mar 23, 2020 15:51:42.268 [16352] WARN - Denying access to direct play of part 20713 due to terminated session
As per the above logs the time for the server to close the session matches up the the time errors were recorded for the session becoming invalid. Upon clearing the “Terminate sessions paused for longer than” setting I was able to direct play media from start to finish on my android TV device as expected which certainly points to that being the issue.
Would love to see a fix for this.