[_NSXPCDistantObject ___nsx_pingHost:]: unrecognized selector sent to instance

Hi there

While developing a new widget with WidgetKit, my app crashes almost immediately every time I launch the extension with the error "[NSXPCDistantObject _nsxpingHost:]: unrecognized selector sent to instance"

Does anyone else have this problem? Is this due to the Xcode beta?

Thanks!
I've had the same issue using Xcode 12.0db1, deleting the app from my device, and restarting Xcode resolved the issue for me.
Happening for me as well and restarting XCode not always solves the issue, very random. If I enable breakpoints on exceptions this is the stack trace when it happens:

Code Block
#0 0x000000019e7be234 in objc_exception_throw ()
#1 0x000000019e9acc4c in -[NSObject(NSObject) doesNotRecognizeSelector:] ()
#2 0x000000019ea9db24 in _forwarding_ ()
#3 0x000000019ea9fa9c in _CF_forwarding_prep_0 ()
#4 0x00000001de71a1c4 in -[EXExtensionContextImplementation _willPerformHostCallback:] ()
#5 0x00000001de71c4c4 in __112-[EXConcreteExtensionContextVendor _beginRequestWithExtensionItems:listenerEndpoint:withContextUUID:completion:]_block_invoke ()
#6 0x000000019e75a6f0 in _dispatch_call_block_and_release ()
#7 0x000000019e75b6d8 in _dispatch_client_callout ()
#8 0x000000019e704cf0 in _dispatch_lane_serial_drain$VARIANT$mp ()
#9 0x000000019e7057cc in _dispatch_lane_invoke$VARIANT$mp ()
#10 0x000000019e70f170 in _dispatch_workloop_worker_thread ()
#11 0x000000019e7b25a4 in _pthread_wqthread ()



I created feedback FB7851894 for this. Hope it gets resolved soon, it's really painful to debug my extension now.
Getting the same error. Any luck solving it?
Also happens to me.
Xcode 12.0 beta 2 on a device and on a Simulator.
Reinstalling the app solves it, but it works only for one time. After one run I must reinstall again. Really painful.

Did anyone find the answer to this error?

Did anyone find the answer to this error?

Has anyone had success here? This is still happening on Xcode 14 beta 2 and blocking development of new widgets.

I had this error on M1 Macbook Air, but it turns out it's because I was running Xcode with Rosetta. Try unchecking Rosetta.

[_NSXPCDistantObject ___nsx_pingHost:]: unrecognized selector sent to instance
 
 
Q