UNNotificationServiceExtension suddenly stopped working

Hi, I have a UNNotificationServiceExtension, which was running perfectly fine for more than a year. Last week, it has suddenly stopped working, with no apparent changes to the server-side application sending the notification to APNS. The strange part is that it works on some devices and it doesn't work on others. I have confirmed that notifications are enabled for the app in iOS system preferences.

com.company.product is the bundle identifier of the main app

com.company.product.yyyyy is the bundle identifies of the NSE

appname.app and nse.appex are the placeholders for the name of the app and name of the NSE respectively

Following is the NSE info.plist:

<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>CFBundleDisplayName</key>
	<string>yyyy</string>
	<key>CFBundleName</key>
	<string>yyyy</string>
	<key>CFBundleIdentifier</key>
	<string>com.company.product.yyyy</string>
	<key>CFBundleDevelopmentRegion</key>
	<string>en</string>
	<key>CFBundleInfoDictionaryVersion</key>
	<string>6.0</string>
	<key>CFBundlePackageType</key>
	<string>XPC!</string>
	<key>CFBundleShortVersionString</key>
	<string>y.y.y</string>
	<key>MinimumOSVersion</key>
	<string>13.0</string>
	<key>NSExtension</key>
	<dict>
		<key>NSExtensionPointIdentifier</key>
		<string>com.apple.usernotifications.service</string>
		<key>NSExtensionPrincipalClass</key>
		<string>NotificationService</string>
	</dict>
	<key>CFBundleVersion</key>
	<string>yyy</string>
</dict>
</plist>

Model: iPhone 15 Pro Max

iOS Version: 17.3

Console.log

default	11:55:38.178328-0500	SpringBoard	[com.company.product] Received remote notification request <request_id> [ waking: 0, hasAlertContent: 1, hasSound: 0 hasBadge: 0 hasContentAvailable: 0 hasMutableContent: 1 pushType: Alert]
default	11:55:38.178386-0500	SpringBoard	[com.company.product] Remote notification request <request_id> can be modified: 1
default	11:55:38.183924-0500	pkd	Mapped bundleID com.company.product to personal: PKDPersona: personaID: 1000, isEnterprise: NO
default	11:55:38.186093-0500	runningboardd	Executing launch request for xpcservice<com.company.product.yyyyy([osservice<com.apple.SpringBoard>:33])> (Launching extension com.company.product.yyyyy(134589AC-5665-4423-B56D-46F8C8DB18CA) for host 33)
default	11:55:38.186208-0500	runningboardd	Skipping preflight as <RBSLaunchRequest| xpcservice<com.company.product.yyyyy([osservice<com.apple.SpringBoard>:33])>; "Launching extension com.company.product.yyyyy(134589AC-5665-4423-B56D-46F8C8DB18CA) for host 33"> is not an app
default	11:55:38.186271-0500	runningboardd	Creating and launching job for: xpcservice<com.company.product.yyyyy([osservice<com.apple.SpringBoard>:33])>
default	11:55:38.186691-0500	runningboardd	'(null)' Submitting extension overlay (host PID 33, path /private/var/containers/Bundle/Application/<app_id>/appname.app/PlugIns/nse.appex/nse):
<dictionary: 0xaf4a6d870> { count = 4, transaction: 0, voucher = 0x0, contents =
	"_AdditionalProperties" => <dictionary: 0xaf4ae22c0> { count = 1, transaction: 0, voucher = 0x0, contents =
		"RunningBoard" => <dictionary: 0xaf4ae6f30> { count = 3, transaction: 0, voucher = 0x0, contents =
			"Managed" => <bool: 0x262f9c9e0>: true
			"RunningBoardLaunchedIdentity" => <dictionary: 0xaf4aed8c0> { count = 4, transaction: 0, voucher = 0x0, contents =
				"TYPE" => <int64: 0x87ebed049aadc05f>: 4
				"h" => <int64: 0x87ebed049aadc177>: 33
				"i" => <string: 0xaf4afd320> { length = 33, contents = "com.company.product.yyyyy" }
				"r" => <int64: 0x87ebed049aadc06f>: 2
			}
			"RunningBoardLaunched" => <bool: 0x262f9c9e0>: true
		}
	}
	"XPCService" => <dictionary: 0xaf4a23830> { count = 8, transaction: 0, voucher = 0x0, contents =
		"Platform" => <int64: 0x87ebed049aadc06f>: 2
		"RunLoopType" => <string: 0xaf4a26470> { length = 9, contents = "NSRunLoop" }
		"_SandboxProfile" => <string: 0xaf4ae2620> { length = 10, contents = "silent-nse" }
		"_AdditionalSubServices" => <dictionary: 0xaf4a66530> { count = 1, transaction: 0, voucher = 0x0, contents =
			"apple-extension-service" => <bool: 0x262f9c9e0>: true
		}
		"PersonaEnterprise" => <int64: 0x87ebed049aaddf3f>: 1000
		"EnvironmentVariables" => <dictionary: 0xaf4aef6d0> { count = 3, transaction: 0, voucher = 0x0, contents =
			"TMPDIR" => <string: 0xaf4a604b0> { length = 92, contents = "/private/var/mobile/Containers/Data/PluginKitPlugin/<plugin_id>/tmp" }
			"HOME" => <string: 0xaf4a713e0> { length = 88, contents = "/private/var/mobile/Containers/Data/PluginKitPlugin/<plugin_id>" }
			"CFFIXED_USER_HOME" => <string: 0xaf4a5e790> { length = 88, contents = "/private/var/mobile/Containers/Data/PluginKitPlugin/<plugin_id>" }
		}
		"_OmitSandboxParameters" => <bool: 0x262f9c9e0>: true
		"ProgramArguments" => <array: 0xaf4aac460> { count = 3, capacity = 8, contents =
			0: <string: 0xaf4abd760> { length = 149, contents = "/private/var/containers/Bundle/Application/<app_id>/appname.app/PlugIns/nse.appex/nse" }
			1: <string: 0xaf4aa90e0> { length = 15, contents = "-AppleLanguages" }
			2: <string: 0xaf4aa1f20> { length = 9, contents = "("en-GB")" }
		}
	}
	"RunningBoard" => <dictionary: 0xaf4ae6f30> { count = 3, transaction: 0, voucher = 0x0, contents =
		"Managed" => <bool: 0x262f9c9e0>: true
		"RunningBoardLaunchedIdentity" => <dictionary: 0xaf4aed8c0> { count = 4, transaction: 0, voucher = 0x0, contents =
			"TYPE" => <int64: 0x87ebed049aadc05f>: 4
			"h" => <int64: 0x87ebed049aadc177>: 33
			"i" => <string: 0xaf4afd320> { length = 33, contents = "com.company.product.yyyyy" }
			"r" => <int64: 0x87ebed049aadc06f>: 2
		}
		"RunningBoardLaunched" => <bool: 0x262f9c9e0>: true
	}
	"CFBundlePackageType" => <string: 0xaf4a73b30> { length = 4, contents = "XPC!" }
}
error	11:55:38.195184-0500	SpringBoard	[u 134589AC-5665-4423-B56D-46F8C8DB18CA:m (null)] [<private>(<private>)] Failed to start plugin; pkd returned an error: Error Domain=PlugInKit Code=4 "RBSLaunchRequest error trying to launch plugin com.company.product.yyyyy(134589AC-5665-4423-B56D-46F8C8DB18CA): Error Domain=RBSRequestErrorDomain Code=5 "Launch failed." UserInfo={NSLocalizedFailureReason=Launch failed., NSUnderlyingError=0x770bc46b0 {Error Domain=NSPOSIXErrorDomain Code=111 "Unknown error: 111" UserInfo={NSLocalizedDescription=Launchd job spawn failed}}}" UserInfo={NSLocalizedDescription=RBSLaunchRequest error trying to launch plugin com.company.product.yyyyy(134589AC-5665-4423-B56D-46F8C8DB18CA): Error Domain=RBSRequestErrorDomain Code=5 "Launch failed." UserInfo={NSLocalizedFailureReason=Launch failed., NSUnderlyingError=0x770bc46b0 {Error Domain=NSPOSIXErrorDomain Code=111 "Unknown error: 111" UserInfo={NSLocalizedDescription=Launchd job spawn failed}}}}
error	11:55:38.195359-0500	SpringBoard	Plugin <id<PKPlugIn>: 0xa0ce884a0; core = <[u 134589AC-5665-4423-B56D-46F8C8DB18CA] [com.company.product.yyyyy(version)],[d CC34D016-FF8A-4917-AB20-6F9BD00D97FE] [/private/var/containers/Bundle/Application/<app_id>/appname.app/PlugIns/nse.appex]>, instance = [(null)], state = 3, useCount = 0> must have pid! Extension request will fail
error	11:55:38.195425-0500	SpringBoard	Failed to acquire assertion for plugin: <id<PKPlugIn>: 0xa0ce884a0; core = <[u 134589AC-5665-4423-B56D-46F8C8DB18CA] [com.company.product.yyyyy(version)],[d CC34D016-FF8A-4917-AB20-6F9BD00D97FE] [/private/var/containers/Bundle/Application/<app_id>/appname.app/PlugIns/nse.appex]>, instance = [(null)], state = 3, useCount = 0> pid: 0

Based on the log snippets you posted, this is due to a known issue currently being investigated. Sometimes some devices get into a state where the system is unable to launch the extension. The only available solution at this time is to reboot the device to clear the problem state.

[@Gualtier Malde](https://developer.apple.com/forums/profile/Gualtier Malde) We've experienced this when trying to reload CallKit extension; restarts don't reliably solve it. Are there any other workarounds? It's affecting many of our production users, dating back to at least iOS 16.6.1.

NSError: RBSLaunchRequest error trying to launch plugin com.***.yyy.anonymous(6C58B414-A0CB-47A3-832B-8CB5E677027C): Error Domain=RBSRequestErrorDomain Code=5 "Launch failed." UserInfo={NSLocalizedFailureReason=Launch failed., NSUnderlyingError=0x604c3e9e0 {Error Domain=NSPOSIXErrorDomain Code=111 "Unknown error: 111" UserInfo={NSLocalizedDescription=Launchd job spawn failed}}}
UNNotificationServiceExtension suddenly stopped working
 
 
Q