Debugging WidgetKit install error "Failed to get descriptors for extensionBundleID"

I'm trying to create an iOS 14 WidgetKit widget. It's compiling, but when I try to run it, on either simulator or device, I get the error below:

Any suggestions on how to debug this?

Details

SendProcessControlEvent:toPid: encountered an error: Error Domain=com.apple.dt.deviceprocesscontrolservice Code=8
"Failed to show Widget 'com.myapp.dev.WidgetKitExtension'
error: Error Domain=SBAvocadoDebuggingControllerErrorDomain Code=1
"Failed to get descriptors for extensionBundleID (com.myapp.dev.WidgetKitExtension)"
UserInfo={NSLocalizedDescription=Failed to get descriptors for extensionBundleID (com.myapp.dev.WidgetKitExtension)}."
UserInfo={NSLocalizedDescription=Failed to show Widget 'com.myapp.dev.WidgetKitExtension'
error: Error Domain=SBAvocadoDebuggingControllerErrorDomain Code=1 "Failed to get descriptors for extensionBundleID (com.myapp.dev.WidgetKitExtension)"
UserInfo={NSLocalizedDescription=Failed to get descriptors for extensionBundleID (com.myapp.dev.WidgetKitExtension)}.,
NSUnderlyingError=0x7fc0b0d12540 {Error Domain=SBAvocadoDebuggingControllerErrorDomain
Code=1 "Failed to get descriptors for extensionBundleID (com.myapp.dev.WidgetKitExtension)"
UserInfo={NSLocalizedDescription=Failed to get descriptors for extensionBundleID (com.myapp.dev.WidgetKitExtension)}}}
Domain: DTXMessage
Code: 1
  • -


System Information

macOS Version 10.15.5 (Build 19F101)
Xcode 12.0 (17177)

Xcode 13.0, M1 cpu

On M1 cpu, at least "Widget" and "Watch" extensions don't work when Xcode is running in Rosetta.

I did a tiny experiment with a test iOS app with a simple widget (the default templates generated by Xcode) - if Xcode is running in Rosetta when the test app is created, it will not work; if I disable Rosetta for Xcode and run again the test project, the widget is working fine.

Is there any workaround? We are blocked... Thank you!

SendProcessControlEvent:toPid: encountered an error: Error Domain=com.apple.dt.deviceprocesscontrolservice Code=8 "Failed to show Widget 'com.tibi.TestExt3.Ext3Widget' error: Error Domain=SBAvocadoDebuggingControllerErrorDomain Code=1 "Failed to get descriptors for extensionBundleID (com.tibi.TestExt3.Ext3Widget)" UserInfo={NSLocalizedDescription=Failed to get descriptors for extensionBundleID (com.tibi.TestExt3.Ext3Widget)}." UserInfo={NSLocalizedDescription=Failed to show Widget 'com.tibi.TestExt3.Ext3Widget' error: Error Domain=SBAvocadoDebuggingControllerErrorDomain Code=1 "Failed to get descriptors for extensionBundleID (com.tibi.TestExt3.Ext3Widget)" UserInfo={NSLocalizedDescription=Failed to get descriptors for extensionBundleID (com.tibi.TestExt3.Ext3Widget)}., NSUnderlyingError=0x6000015704e0 {Error Domain=SBAvocadoDebuggingControllerErrorDomain Code=1 "Failed to get descriptors for extensionBundleID (com.tibi.TestExt3.Ext3Widget)" UserInfo={NSLocalizedDescription=Failed to get descriptors for extensionBundleID (com.tibi.TestExt3.Ext3Widget)}}} Domain: DTXMessage Code: 1

Same happened to me and the issue was because the Runpath Search Paths (LD_RUNPATH_SEARCH_PATHS) was empty. I cleared that build setting by mistake. I added @executable_path/Frameworks to the Runpath Search Paths, which was the right setting for my case, and the widget started working again.

I resolved this error by setting the Deployment Info to the correct version of iOS (15.0) for the Widget Extension - it was previously set to 16.0 which the widget and app don't support. Took a while to figure it out. There might be multiple causes for this error and one expects a better description from XCode to help developers identify the issue.

Same issue. It always happens when new Xcode version and you haven't change the default deployment os version is target build General settings I found it may happens for many reasons, here will be one. Extension target version is higher than running device.(Minimum deployment version) For example , target setting 17.2 but running OS is 17.0

then it will fail for installing("Failed to get descriptors for extensionBundleID")

Change to your supported minimum version or the running device that is satisfy the minimum version.

Here my device is 17.0, I change the Minimum Deployments to 17.0 then running again success.

Debugging WidgetKit install error "Failed to get descriptors for extensionBundleID"
 
 
Q