A Sample Notification Service Extension on macOS Crashes

I created a sample Mac OS app with Notification Service Extension. The Extension is triggered when the push notification arrives and crashes while loading.


default    17:05:09.036408+0530    NotificationExtensionTest    Hello, I’m launching as euid = 501, uid = 501, (persona not available)
error    17:05:09.043664+0530    NotificationExtensionTest    Bootstrapping; external subsystem UIKit_PKSubsystem refused setup
default    17:05:09.043723+0530    NotificationExtensionTest    Bootstrapping; Bootstrap complete. Ready for handshake from host.
default    17:05:09.044303+0530    NotificationExtensionTest    [u 3F92D0CB-9A8F-4A8B-83C4-00F78A68C24C] [(null)((null))] Prepare received as euid = 501, uid = 501, (persona not available)
default    17:05:09.044646+0530    NotificationExtensionTest    [u CCC8F807-11C3-4FB0-94DD-408AF5B202FA] [()] Set sole personality.
default    17:05:09.045083+0530    usernoted    [u 3F92D0CB-9A8F-4A8B-83C4-00F78A68C24C:m (null)] [()] Begin using sent as euid = 501, uid = 501, (persona not available)
default    17:05:09.045185+0530    NotificationExtensionTest    [u CCC8F807-11C3-4FB0-94DD-408AF5B202FA] [()] Begin using received as euid = 501, uid = 501, (persona not available)
default    17:05:09.045453+0530    usernoted    [u 3F92D0CB-9A8F-4A8B-83C4-00F78A68C24C:m (null)] [()] plugin loaded and ready for host
error    17:05:11.010545+0530    usernoted    Extension will be killed due to sluggish startup
error    17:05:11.010710+0530    usernoted    [u 3F92D0CB-9A8F-4A8B-83C4-00F78A68C24C:m (null)] [()] Connection to plugin interrupted while in use.
default    17:05:11.010802+0530    usernoted    [u 3F92D0CB-9A8F-4A8B-83C4-00F78A68C24C:m (null)] [()] terminating
error    17:05:11.011120+0530    usernoted    [u 3F92D0CB-9A8F-4A8B-83C4-00F78A68C24C:m (null)] [()] Connection to plugin invalidated while in use.
error    17:05:14.049864+0530    NotificationExtensionTest    WARNING: Did not receive handshake message from the host after waiting ~2 seconds. THIS MAY BE A SPURIOUS LAUNCH OF THE PLUGIN due to a message to an XPC endpoint other than the main service endpoint, or the CPU is highly contended and this extension or its host is not getting enough CPU time

Replies

Sorry I can't help, but FWIW I see this from the Today Simulator when trying to test a new Widget under Xcode:


objc[4240]: Class NCJSONTransformer is implemented in both /System/Library/Frameworks/NotificationCenter.framework/Versions/A/NotificationCenter and /System/Library/Frameworks/NotificationCenter.framework/Versions/A/Resources/Widget Simulator.app/Contents/MacOS/Widget Simulator. One of the two will be used. Which one is undefined.

2019-12-06 12:57:01.531782-0600 Widget Simulator[4240:151789] Metal API Validation Enabled

2019-12-06 12:57:02.894576-0600 Widget Simulator[4240:151789] Could not find image named 'GreenAdd'.

2019-12-06 12:57:03.874307-0600 TodayStickyExt[4242:152238] [subsystems ] Bootstrapping; external subsystem UIKit_PKSubsystem refused setup


The 'refused setup' does not seem to be an issue.