Debug iMessage app crashes after 8.3 Xcode update

I just updated to XCode 8.3. My iMessage extension (embedded in a main app) crashes immediately when running debug in XCode. It worked prior to upgrading. Xcode never reaches a breakpoint set on the first line of viewDidLoad() in my MSMessagesAppViewController. I'm using Swift, testing on an iPhone 7. I've tried restarting both computer and phone, and installing iOS 10.3 on my phone.


The following errors appear in the Xcode console:

2017-03-30 13:04:03.002418-0400 EmojiFaceLive-iMessage[293:13872] [WC] -[WCSession activateSession]_block_invoke_2 sessionReadyForInitialStateWithCompletionHandler failed due to NSXPCConnectionInterrupted

2017-03-30 13:04:03.226973-0400 EmojiFaceLive-iMessage[293:13873] <NSXPCConnection: 0x17411b090> connection from pid 290: Warning: Exception caught during decoding of received message, dropping incoming message.

Exception: <NSXPCDecoder: 0x12a82ae00> received a message that is not in the interface of the local object (_becomeActiveWithConversationState:presentationState:), dropping.

2017-03-30 13:04:03.310047-0400 EmojiFaceLive-iMessage[293:13824] -[_NSXPCDistantObject _remoteViewDidBecomeReadyForDisplay]: unrecognized selector sent to instance 0x172e63c00

2017-03-30 13:04:03.311666-0400 EmojiFaceLive-iMessage[293:13824] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[_NSXPCDistantObject _remoteViewDidBecomeReadyForDisplay]: unrecognized selector sent to instance 0x172e63c00'

*** First throw call stack:

(0x188d2afd8 0x18778c538 0x188d31ef4 0x188d2ef4c 0x188c2ad2c 0x1a4cec08c 0x1a4ce55f8 0x1a4ce558c 0x18ee71db0 0x18ee7231c 0x18f72ba30 0x188d30e80 0x188c262b4 0x188c2ae7c 0x18f832c34 0x188d2ed4c 0x188c2ad2c 0x188d30e80 0x188c262b4 0x188c2ae7c 0x18f783f98 0x188d2ed4c 0x188c2ad2c 0x188d30e80 0x188c262b4 0x188c2ae7c 0x188d2ed4c 0x188c2ad2c 0x188d30e80 0x188c262b4 0x18a8d3884 0x18a8d36f0 0x18a8d3aa0 0x188cd9424 0x188cd8d94 0x188cd69a0 0x188c06d94 0x18a670074 0x18eebf130 0x187e2bcd0 0x187e2d984 0x18992ed90 0x1916a512c 0x1916a4cf0 0x1916a5150 0x189914ba4 0x187c1559c)

libc++abi.dylib: terminating with uncaught exception of type NSException

Replies

Having the same issue in ours. Time for a radar?

I'm having a similar issue. The only way I've been able to prevent the crash is by changing the parent class of the root view controller from `MSMessagesAppViewController` to `UIViewController`.

I'm having the same trouble with Xcode 8.3.1. No problem at all in previous Xcode versions with the exact same project. I submitted a radar: 31663389.

XCode 8.3.2, still the same issue, tested both on device and simulator. I'm using Obj-c, iPhone 5 with iOS 10.2.1 and iPhone 5 simulator with iOS 10.3 and can reproduce this issue always. Any update about this?

Yep, I've got the same problem 😟 Please fix.

Downgrading to Xcode 8.2 is another workaround.

I'm running to the same issue and couldn't see the radar status. Anyone knows on what's the status of this bug in xcode?

This one is killing me, too -- I just confirmed that the bug still exists in XCode 9 Beta. Apple, can you please help. Anyone find a workaround?

Please get bugs filed for any case you're seeing. The one bug that was posted in this thread has been closed because we believe this should no longer happen in iOS 11 (the code in question from the report above no longer exists). If you're still seeing it in iOS 11 then it seems like there may be different issues, we need fresh bugs with attached sample projects that reproduce the situation (or any other details that you think might be relevant to us tracking down the issue).


You should always file your own bug for an issue you're encountering because while symptoms may be similar they may not necessarily be identical root causes. Or in cases where we don't have enough information to understand a root cause, having your particular bug report might fill in a missing detail that provides a critical piece of information. Please never worry about filing duplicate bugs even if you think something has been reported already.

I encountered this issue in Xcode 8.3.3. After much digging it turned out that a 3rd party library was causing it. Specifically the IronSourceAdMobAdapter installed via Cocoapods. Removing the library fixed the crash.

I had same problem and removing following CocoaPod fixed the situation:

pod 'Firebase/AdMob', '~> 4.0'

Hope it helps. Cheers 🙂