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)
Does deleting the app from the device or erasing the simulator help with this issue?

If not, please submit a feedback with Xcode, and simulator or device diagnostics.

Thank you
Thanks! Unfortunately, deleting the app from the device and/or erasing the simulator did not help.

It's likely to be a build configuration issue on my end. I am using bazel to build the extension, starting from a working old-style Today extension and from the "EmojiRangerWidget" sample code. Presumably there's some subtle difference between how old-style extensions are built and how WidgetKit extensions are built.

So far the only difference I've seen is that the Info.plist has a NSExtensionPointIdentifier in the WidgetKit world.
OK, I figured it out. The bazel iosextension rule needs to be updated to generate iOS 14-compatible extensions.

Currently it is using -e
NSExtensionMain when linking, which is correct for pre-iOS 14 extensions.

That needs to be changed (removed) in order for iOS 14 style WidgetKit extensions (that use @main to mark the entrypoint) to be linked correctly.

I'll contact the bazel folks and to let them know they need to update enhance bazel to handle iOS 14-compatible extensions.
(Sorry for the italic formatting in my previous message. The symbol is "ios_extension", which is being interpreted as italics.)
Glad you figured it out!
I have the same problem, I just add a new widget to my old Objective-C project. when run this widget, crash, then give me the same details.
I fixed this issue by change to New Build System settings in File -> Workspace settings:
  • Shared workspace settings: change to New Build System (Default)

  • Per-user workspace settings: change to Use Shared Setting.

Note: using New Build System (Default), I got some error due to duplicated file - just remove those files or change name


@letiendungbk is right, this works for me.
I added a Widget Extension to my app, tried to run the example provided when creating the extension, and did what @letiendungbk suggested and still getting the error:

SendProcessControlEvent:toPid: encountered an error: Error Domain=com.apple.dt.deviceprocesscontrolservice Code=8 "Failed to show Widget 'com.fisher-price.smart-connect.CartwheelWidget' error: Error Domain=SBAvocadoDebuggingControllerErrorDomain Code=1 "Failed to get descriptors for extensionBundleID (com.fisher-price.smart-connect.CartwheelWidget)" UserInfo={NSLocalizedDescription=Failed to get descriptors for extensionBundleID (com.fisher-price.smart-connect.CartwheelWidget)}." UserInfo={NSLocalizedDescription=Failed to show Widget 'com.fisher-price.smart-connect.CartwheelWidget' error: Error Domain=SBAvocadoDebuggingControllerErrorDomain Code=1 "Failed to get descriptors for extensionBundleID (com.fisher-price.smart-connect.CartwheelWidget)" UserInfo={NSLocalizedDescription=Failed to get descriptors for extensionBundleID (com.fisher-price.smart-connect.CartwheelWidget)}., NSUnderlyingError=0x102e0c060 {Error Domain=SBAvocadoDebuggingControllerErrorDomain Code=1 "Failed to get descriptors for extensionBundleID (com.fisher-price.smart-connect.CartwheelWidget)" UserInfo={NSLocalizedDescription=Failed to get descriptors for extensionBundleID (com.fisher-price.smart-connect.CartwheelWidget)}}}

Domain: DTXMessage

Code: 1
  • -





System Information



macOS Version 10.15.6 (Build 19G73)

Xcode 12.0 (17189.4)


Any suggestion?
I have the same problem, cleaning or building with new build system etc - nothing helps.
The problem is present in the newest iOS 14 beta 4 and in the newest build of Xcode.

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=0x10f953420 {Error Domain=SBAvocadoDebuggingControllerErrorDomain Code=1 "Failed to get descriptors for extensionBundleID (*)" UserInfo={NSLocalizedDescription=Failed to get descriptors for extensionBundleID (*)}}}
Domain: DTXMessage
Code: 1
System Information
macOS Version 10.15.6 (Build 19G73)
Xcode 12.0 (17189.4) BlockQuote

Someone can help?



I'm using XCode 12 beta 4 and creating a new SwiftUI project. I also get this error trying to run on simulator the first time. I uninstalled the app, checked @letiendungbk suggestion but all the settings are exactly like what he said so I didn't change anything. I reran and it (the sample) works now. Strange

System Information

macOS Version 11.0 (Build 20A5343i)
Xcode 12.0 (17200.1)
I keep getting the same error. It seems that maybe 1 in 5 times it will work.
I managed to solve it in my case. I had recently configured my app to run on Mac as well as a test. To do that, I had to add a Runpath Search Path @executable_path/../Frameworks in the Widget Extension's Build Settings.

Removing that resolved the issue.
I have the same issue. The message that I get is

Code Block
SendProcessControlEvent:toPid: encountered an error: Error Domain=com.apple.dt.deviceprocesscontrolservice Code=8 "Failed to show Widget 'com.ferdinandgoeldner.breadme.release.BreadMe-Widget' error: Error Domain=SBAvocadoDebuggingControllerErrorDomain Code=1


Funny thing is that for my beta and my debug build configuration it works just fine.
I noticed this only after the AppStore Review came to me and said that my widget did not show up in the library on the release build.

Does anyone have an idea where this could come from?
Do I need to specify some value in the info.plist?

P.S.: I recently tried to run the app on iPad but found that I was not yet ready to support iPad. Don't know if it worked before but turning that toggle on and off might have changed some build settings.
Quick check in, I just downloaded Xcode Beta 5 and installed the new iOS Beta 5 and now the issues are gone.
I am on Xcode beta 5 with new build system and am still getting the same error, any other suggestions?
This is still happening for me, none of the provided solutions have been able to resolve it either.

Simulator iPhone 8
macOS Version 10.15.6 (Build 19G2021)
Xcode 12.0 (17210.1)
So I think I figured out a potential solution ...originally with beta 1 when my project was created, the scheme included the Intent configuration target in the scheme build step....when I removed this, it seems to have stopped spitting out this error. I'm not sure if the configuration target needs to be included for this to work, but so far it doesn't seem so.
Got the same error and had no idea to solve it.
I noticed since I mixed OC with Swift to build the widget, this problem arose. Is this the reason why this error occurred?
I have downloaded xCode 12 GM and iOS 14 GM for my device. So the problem is that widget doesn't appear on a real device in the list you get after clicking "+" button on a home screen, meaning that it is impossible to add it. But at the same time it appears in the same list and works as intended in the simulator !. I did play around with scheme, target settings and also tried to use other tips mentioned in this thread, but no luck....Other thing to note is that widget stopped working on a real device starting from iOS14 beta 8. So I really have no idea what I am supposed to do at the moment.
So I was getting this error as well, it went away in beta3 and then came back in the other betas and in the released Xcode. I discovered that it was being caused by a custom framework we use throughout our app that was included in widget extension's Frameworks, Libraries, and embedded content section. We use the framework in all our other extensions with no issue so not really sure what is going wrong with it and the widget extension. The framework also seemed to be causing issues with swiftUI previews too. If anyone else encounters this or has any idea why a framework might do this it would be very helpful! Thanks!
I’m getting this error on Xcode Version 12.2 beta 3 (12B5035g) with iOS 14.2 beta 4. It works partially in the simulator but not on a real device.
I'm using Xcode(Version 12.1 (12A7403)),this issue is still happen in real device,but I can ignore the issue, you can see the widget that you create can add successful.
Not sure what the root cause of this error, but it happened for me when I replaced widget description string with a variable. After it went back to a string without a variable, it disappeared.

Code Block
   public var body: some WidgetConfiguration {
        StaticConfiguration(kind: kind, provider: ListProvider()) { entry in
            MyWidgetEntryView(entry: entry)
        }
        .configurationDisplayName(displayName)
        .description("widget description here.") // An error occurred when it was .description(myDescriptionString)

 This is really crazy and no idea why, but the workaround for me was to use a description string without variables....

I have the same issue too, I fixed it by removing inside project.pbxproj.
Code Block
EXCLUDED_ARCHS = "";
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
ONLY_ACTIVE_ARCH = YES;

If that can help...
Debugging WidgetKit install error "Failed to get descriptors for extensionBundleID"
 
 
Q