Crash in WidgetExtensionContext.getDescriptors(completion:)

Hi,

I've been working on a Widget Extension which works great locally (when installed via Xcode) but it crashes when distributed via TestFlight. Most of the crashes occur at WidgetExtensionContext.getDescriptors(completion:)

Here's the crash log:

Code Block
0 WidgetKit 0x00000001e556952c closure #1 in WidgetExtensionContext.getDescriptors(completion:) + 208 (WidgetExtensionContext.swift:85)
1 WidgetKit 0x00000001e55694ac closure #1 in WidgetExtensionContext.getDescriptors(completion:) + 80 (WidgetExtensionContext.swift:85)
2 WidgetKit 0x00000001e55688dc thunk for @escaping @callee_guaranteed () -> () + 28 (<compiler-generated>:0)
3 libdispatch.dylib 0x00000001a4aac410 _dispatch_call_block_and_release + 32 (init.c:1454)
4 libdispatch.dylib 0x00000001a4aadf08 _dispatch_client_callout + 20 (object.m:559)
5 libdispatch.dylib 0x00000001a4abb480 _dispatch_main_queue_callback_4CF + 836 (inline_internal.h:2548)
6 CoreFoundation 0x00000001a4d8e634 CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 16 (CFRunLoop.c:1790)
7 CoreFoundation 0x00000001a4d88c34 __CFRunLoopRun + 1940 (CFRunLoop.c:3118)
8 CoreFoundation 0x00000001a4d88090 CFRunLoopRunSpecific + 564 (CFRunLoop.c:3242)
9 Foundation 0x00000001a5124310 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 232 (NSRunLoop.m:374)
10 Foundation 0x00000001a5156d68 -[NSRunLoop(NSRunLoop) run] + 92 (NSRunLoop.m:399)
11 libxpc.dylib 0x00000001a4a0a6ac _xpc_objc_main + 688 (main.m:265)
12 libxpc.dylib 0x00000001a4a0c984 xpc_main + 180 (init.c:1198)
13 Foundation 0x00000001a5159068 -[NSXPCListener resume] + 316 (NSXPCListener.m:448)
14 PlugInKit 0x00000001b44658a0 -[PKService run] + 424 (PKService.m:186)
15 PlugInKit 0x00000001b44654e0 +[PKService main] + 576 (PKService.m:115)
16 PlugInKit 0x00000001b4465cac +[PKService _defaultRun:arguments:] + 24 (PKService.m:233)
17 ExtensionKit 0x00000001e77f7d8c EXExtensionMain + 84 (EXExtensionMain.m:23)
18 Foundation 0x00000001a52a02b8 NSExtensionMain + 200 (NSExtensionMain.m:13)
19 libdyld.dylib 0x00000001a4c13f08 start + 4


I've seen multiple reports about the 3rd party widgets not appearing for TestFlight builds in the PB3, but I am not sure if this is related.

What can I do to solve this? Thank you!

Accepted Reply

Ah, the widgets now show up. I archived the project using Xcode beta 2 using old placeholder API.

Replies

Yes, this is the same issue that is reported in multiple different threads. WidgetKit crashes when a widget is installed from
a TestFlight build that was compiled with Xcode 12 beta 3.
I am gonna try building it with Xcode 12 beta 2 to see if this is related to Xcode or iOS. Will post the results soon.
Ah, the widgets now show up. I archived the project using Xcode beta 2 using old placeholder API.
Hi,

I'm having the same issue, test it on Xcode Beta 5.

WidgetKit: closure #1 in WidgetExtensionContext.getDescriptors(completion:) + 208

On Organizer.

The new beta 5 needs to implement in the TimeLineProvider a new method called getSnapshot. Despite being implemented, the same thing happens.

Locally the widget shows in the widget gallery, but when upload to TestFlight, doesn't appear on the gallery.


Has anyone seen this recently? I get the same WidgetExtensionContext.getDescriptors(completion:) error using Xcode 12.0.1. Locally and TestFlight show no issues, but I am seeing the crashes via Organizer/Crashes in production.

Any help would be greatly appreciated.
Hi, I am also having the same issue the code was compiled on Xcode 12 stable version. Can someone help in explaining the root cause of this issue
Still no fix for this...
The problem is not solved yet. I have the same problem in xcode 12.2

I see crashes for this too, and in production not just TestFlight. If anyone ever finds a solution or how to debug further please share 🙏