WidgetKit keep crashing and widgets not displaying

So I have a MacOS application that was working just fine before Xcode 16. The Widgets are not working anymore.
The main application and the widgets share a file in a common App Group.
The widget app now get a permission error when accessing the file.
Also, the Widget Kit simulator keeps crashing.

I also try to start a new project in Xcode, add a target with a Widget extension with an App Intent and run it, and it also crashes.
Sometimes, it doesn't crash but just display the error: "Failed to load widget. The operation couldn't be completed. (WidgetKit_Simulator.WidgetDocument.Error error 2.).

Edited to attach WidgetKit error log

The best first course of action here would be to use Console.app to monitor to the relevant processes related to your app and extensions.

A good way to start would be with filtering by the BundleID of the target and / or the target name itself (the process name).

Also be sure to check the system processes for additional information. This will vary based on what and where you are looking but some examples:
To debug APNS you'll want to monitor apnd along with other relevant processes.
To debug WidgetKit, LiveActivities, Dynamic Island you'll want to monitor springboardd, liveactivitiesd along with other relevant processes.

Rico

WWDR - DTS - Software Engineer

Hi Rico. I tried all of the above you mentioned. I cleaned everything, reinstalled Xcode and remove my widgets from my app and recreated them.
The simulator is not crashing anymore but any widget with intent get a CHSErrorDomain error 1103.
You can even start a fresh project and a widget with intent and run it and you'll get the same error.

In the console, I only get errors from chronod : Requested to add extension, but purging instead because we shouldn't cache I

And one from runningboardd : Memorystatus failed with unexpected error: Invalid argument (22).

I'm out of idea.

WidgetKit keep crashing and widgets not displaying
 
 
Q