Failed to get descriptors for extensionBundleID

Viewed 5253

After adding an extension target to Xcode project and trying to run it on iOS 14, I'm getting an error:

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

Any idea what is going wrong?

9 Answers

I resolved this problem. Clean Builder Folder(maybe it's not necessary), then restart your iPhone. Run your project again.

For me the problem was the excluded arm64 architecture for any iOS simulator on the widget target build settings (Added because of my M1 development device).

When removing this excluded architecture, the widget is running without any problem.

For me it was that my device was on iOS 14.1 and the Deployment Target was set to 14.3 for the widget target. The solution was to update the Deployment Target to match your device or lower. The Deployment Target setting is in the General tab and under Deployment Info (in my case I set it to 14.0).

If you have 2 widgets within your target, comment out the widget(s) you arent currently testing

@main
struct Widgets: WidgetBundle
{
    @WidgetBundleBuilder
    var body: some Widget
    {
        Widget1()
//        Widget2()
    }
}

If the extension target you added was for a Widget...

I did follow some of the suggestions here and restarted my phone to some success but the error kept happening over and over, and restarting my phone is intrusive and takes kind of a long time. For me, the workaround when I get this popup error is to..

1. On my iPhone, I find the Widget I'm working on and delete it by pressing and holding the widget until it gives me the option to remove it from my device.

2. In Xcode, I build and run the Widget Scheme again, and no more error!

It's a little faster, and I don't have to restart my phone.

Note: If for some reason that doesn't work, I switch my build Scheme back to my iPhone Scheme, build and run, then change the Scheme back to my widget Scheme, and that usually does the trick.

Try to go to Setting -> General -> Profiles & Device Management -> Trust your cert, and then rebuild and rerun app.

This happened to me after moving my entitlements file from the root directory into the widget's directory. I tried this answer but the problem persisted.

I had to manually install the widget on the Home Screen. After that running from Xcode worked again.

I ran into the exact same issue.

For me it happens when I ran an extension widget from an M1 computer.

Turns out the issue was I was running Xcode with Rosetta, turning that off fixed it for me.

To enable / disable rosetta:

  1. Right click on the Xcode app
  2. Click on Get Info
  3. Untick Open using Rosetta
  4. Clean project => Restart Xcode

As mentioned here https://developer.apple.com/forums/thread/651611, setting New Build System in File -> Workspace/Project settings (for both Shared and Per User settings) seems to do the trick. You won't get rid of the warning, but the widget might (see notes) run.

Note 1 - even after this change, there seems to be about 30 % chance that it wont run. Just hit Run again ‍♂️. (Debug Navigator stuck on Waiting to Attach)

Note 2 - sometimes this doesn't work altogether. Setting Build System to Legacy and back to New worked for me ‍♂️.

Note 3 - running on device is so far without these problems (iOS 14 beta 7)

Tested on Xcode 12 beta v6.

Related