Programs from 'movies & shows on Plex' Crashing app

Server Version#: 1.40.4.8679-7000
Player Version#: 8.38 (8773)

Noticing this over the last couple of weeks. There are some random shows and movies on Plex in ‘movies and shows’ that are crashing the app. By random I mean sometimes I can get the show to play, but then a different one later on will have a problem. Click on the show, the show looks like it wants to start, sometimes you’ll get a glimpse, then the app crashes and closes to the main Apple TV screen. Reopen the app, go to movies and shows and sometimes the server is disconnected until you hard close the app and restart it. I have worked around it a couple times by searching the movie through Siri and accessing it through the appletv Siri search menu.

is there possibly a fix for this? I have reinstalled the app to just rule that out.. any help is appreciated!

Make sure your using a fast and reliable DNS instead of your ISP’s default in Router.
Example:

1.1.1.1 and 1.0.0.1

or

8.8.8.8 and 8.8.4.4

Same for me. I’m using 1.1.1.1 on my Apple TV. It’s updated on the latest non-beta firmware. It works 100% of the time until I try to watch something on-demand, e.g. a George Carlin special, and then the entire app crashes. Meanwhile, it works fine from my desktop.

I just tried this from my older gen Fire TV and it works fine there. Same server, same settings. So it’s localized to the AppleTV client.

Hey there! Yeah I came to that conclusion too. worked fine on laptop and devices, intermittent on both tvs. you can ‘brute force’ it. you just have to keep going through the cycle of opening the app, selecting, playing, hopefully it starts or repeat the process lol. I was trying all kinds of variations of clicking buttons too, like hit play while it’s loading, etc. nothing seemed to affect it. Weeds was giving me tons of trouble.

I’m seeing this as well.

Trying to stream Merlin works fine with Google TV, but crashes the app when using an Apple TV. Restarting the Apple TV doesn’t seem to fix the issue. Deleting and re-installing the app fixed it until the first ad tried to play, and after that, it went back to constantly crashing when trying to start playback. (I also played one episode on the Google TV while I was deleting and reinstalling the app, so I’m not sure if that’s relevant.)

I use NextDNS, but didn’t see any blocked DNS requests for my TV. Just to be sure, though, I tried changing to 1.1.1.1 with DoH and restarted the Apple TV, but that didn’t result in any noticeable difference.

Looking at the app logs and stack trace from the crash report, it’s 100% related to playing ads.

App Logs right before the crash:

2024/08/18 00:39:06.152 (9728) ➖ PMKAdController.m:412 | Received ad event Loaded
2024/08/18 00:39:06.152 (9728) 🔧 PMKAdController.m:422 | Ad event loaded with media info: 1920x1080 @ 4022kbps
2024/08/18 00:39:06.152 (9728) ➖ PMKAdController.m:251 | Switched to ad FY24_Q4_RMAA_Kroger_CTV_Pebbles_Fort_15sec (669e78397f96d1c7d14a1f38-1)
2024/08/18 00:39:06.152 (9728) ➖ PMKAdController.m:631 | Changing IMA ad playback state from stopped to paused
2024/08/18 00:39:06.153 (9728) ➖ PMKAdController.m:324 | Fail-safe timer destroyed
2024/08/18 00:39:07.665 (10007) 🔧 PMKAppEventMonitor.m:93 | [AppEventMonitor]: App Start did start 00:39:07,6650

Console logs right before the crash:

*** Terminating app due to uncaught exception 'UIViewControllerHierarchyInconsistency', reason: 'child view controller:<IMAAdViewController: 0x1648f79c0> should have parent view controller:<PTVVideoPlayerViewController: 0x15cda2600> but actual parent is:<PTVVideoPlayerViewController: 0x15cbc2c00>'

Stack trace from crash report:

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Termination Reason: SIGNAL 6 Abort trap: 6
Terminating Process: PlexTV [306]

Triggered by Thread:  0

Application Specific Information:
abort() called


Last Exception Backtrace:
0   CoreFoundation                	       0x19eca97c4 __exceptionPreprocess + 164
1   libobjc.A.dylib               	       0x19e0e29e8 objc_exception_throw + 60
2   CoreFoundation                	       0x19eca96b0 -[NSException initWithCoder:] + 0
3   UIKitCore                     	       0x1bec2e020 -[UIView(Hierarchy) _associatedViewControllerForwardsAppearanceCallbacks:performHierarchyCheck:isRoot:] + 220
4   UIKitCore                     	       0x1bec2e69c -[UIView(Hierarchy) _willMoveToWindow:withAncestorView:] + 188
5   UIKitCore                     	       0x1bec3c8a8 -[UIView(Internal) _addSubview:positioned:relativeTo:] + 360
6   GoogleInteractiveMediaAds     	       0x104826a58 -[IMAAdDisplayContainer setAdViewController:] + 312
7   GoogleInteractiveMediaAds     	       0x104818ed4 -[IMAAdsManager handleMessageContentPauseRequested:] + 256
8   CoreFoundation                	       0x19ebe6a50 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 148
9   CoreFoundation                	       0x19ebe696c ___CFXRegistrationPost_block_invoke + 88
10  CoreFoundation                	       0x19ebe5d88 _CFXRegistrationPost + 436
11  CoreFoundation                	       0x19ebe5784 _CFXNotificationPost + 748
12  Foundation                    	       0x1a4e49148 -[NSNotificationCenter postNotificationName:object:userInfo:] + 92
13  GoogleInteractiveMediaAds     	       0x10483b8c0 -[IMAJavaScriptSession didReceiveMessage:] + 272
14  GoogleInteractiveMediaAds     	       0x10483ae60 -[IMABaseDispatcher processNewMessage:] + 204
15  GoogleInteractiveMediaAds     	       0x10483ad84 -[IMABaseDispatcher processNewMessageWithChannelName:data:] + 52
16  GoogleInteractiveMediaAds     	       0x10483791c -[IMAJSContextDispatcher processNewMessageWithChannelName:data:] + 80
17  GoogleInteractiveMediaAds     	       0x104812a24 -[IMAJavaScriptTvosBridge messageReceiver:didReceiveMessageNamed:withData:] + 80
18  GoogleInteractiveMediaAds     	       0x104837e80 -[IMAJSMessageReceiver didReceiveMessageNamed:withData:] + 104
19  CoreFoundation                	       0x19ecb0824 __invoking___ + 148
20  CoreFoundation                	       0x19ecad6b8 -[NSInvocation invoke] + 428
21  JavaScriptCore                	       0x1b94dfa80 JSC::ObjCCallbackFunctionImpl::call(JSContext*, OpaqueJSValue*, unsigned long, OpaqueJSValue const* const*, OpaqueJSValue const**) + 304
22  JavaScriptCore                	       0x1b94df4b4 JSC::objCCallbackFunctionCallAsFunction(OpaqueJSContext const*, OpaqueJSValue*, OpaqueJSValue*, unsigned long, OpaqueJSValue const* const*, OpaqueJSValue const**) + 184
23  JavaScriptCore                	       0x1b94dda3c JSC::callObjCCallbackFunction(JSC::JSGlobalObject*, JSC::CallFrame*) + 356
24  JavaScriptCore                	       0x1ba65b5f0 llint_function_for_construct_arity_checkTagGateAfter + 157540
25  JavaScriptCore                	       0x1ba659108 llint_function_for_construct_arity_checkTagGateAfter + 148092
26  JavaScriptCore                	       0x1ba659108 llint_function_for_construct_arity_checkTagGateAfter + 148092
27  JavaScriptCore                	       0x1ba657f20 llint_function_for_construct_arity_checkTagGateAfter + 143508
28  JavaScriptCore                	       0x1ba659108 llint_function_for_construct_arity_checkTagGateAfter + 148092
29  JavaScriptCore                	       0x1ba62efd4 vmEntryToJavaScriptGateAfter + 0
30  JavaScriptCore                	       0x1b9c87d68 JSC::Interpreter::executeCall(JSC::JSObject*, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 972
31  JavaScriptCore                	       0x1b95035e0 JSObjectCallAsFunction + 632
32  JavaScriptCore                	       0x1b944a534 -[JSValue callWithArguments:] + 356
33  GoogleInteractiveMediaAds     	       0x104838ddc -[IMAJSTimer timerDidFire:] + 168
34  Foundation                    	       0x1■■■4107c __NSFireTimer + 96
35  CoreFoundation                	       0x19ec0bb28 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 32
36  CoreFoundation                	       0x19ec0b7e0 __CFRunLoopDoTimer + 964
37  CoreFoundation                	       0x19ec0ae1c __CFRunLoopDoTimers + 288
38  CoreFoundation                	       0x19ec05064 __CFRunLoopRun + 1856
39  CoreFoundation                	       0x19ec0450c CFRunLoopRunSpecific + 608
40  GraphicsServices              	       0x1aa31e478 GSEventRunModal + 164
41  UIKitCore                     	       0x1be77026c -[UIApplication _run] + 888
42  UIKitCore                     	       0x1be7747d0 UIApplicationMain + 152
43  PlexTV                        	       0x102898b9c 0x102540000 + 3509148
44  dyld                          	       0x19e0f5934 start + 2328

I believe I’ve found a potential workaround for this crash. While I haven’t had time to watch an entire movie or episode yet, it looks promising so far.

The crash is occurring in the Google IMA (Interactive Media Ads) SDK. Until Plex and/or Google fixes this, technically inclined users can work around the crash by blocking access to the Google IMA server.

To do this, configure your network to block DNS lookups for imasdk.googleapis.com. In my case, I did this by adding the hostname to my NextDNS denylist, which causes lookups for that hostname to return 0.0.0.0. Something similar can be done for other routers or DNS resolvers though.

After blocking that hostname and restarting my Apple TV to clear its DNS cache, I’m now able to stream media that was previously causing the app to crash.

For further context, I’ve found reports of this crash occurring in older versions of the Google IMA SDK dating back to 2022. A fix was released in version 3.18.1 on October 2, 2022, and there doesn’t seem to be much more information about it since then. I’m not sure whether Plex is really using such an outdated version of the SDK or if the issue has resurfaced in a more recent version of the SDK. Either way, this workaround should hopefully help until the issue is resolved more appropriately.

(Also, I apologize for the quick successive replies to this thread. I’m not entirely sure whether I should be editing my previous replies or creating new ones. I’m mainly sharing updates as I learn more, and since the overall theme of each update has varied significantly, I figured it made more sense to post separate replies. The help text to the right of the editor telling me to avoid posting multiple replies is making me second-guess that, though… :P)

Same here. Crashes on Apple TV when trying to watch a tv show on demand. No personal server issues, only on demand.
Seems to be the ads. Reinstalled the app, everything is updated and it still crashes at the beginning of an ad or when an ad is about to start on the 1 in 30 tries and I get an episode to start.

Just wanted to say thank you for your efforts digging into the logs and spotting the crash point. I have been having the same exact crash on apple tv and suspected it was the ads causing it. I did the dns blackhole on the url you listed and the videos are no longer causing a crash.