Weird NSCocoaErrorDomain errow when trying to autorize Screen Time API

Hello,

we have rare case of AuthorizationCenter.shared.requestAuthorization(for: .individual) failing to autorize user on real device - iPhone XR (iOS 16.1.2).

It does not throw the standard FamilyControlsError which we are handling, but NSCocoaErrorDomain.

This is the entire po description:

Error Domain=NSCocoaErrorDomain Code=4864 "The given data was not a valid property list." UserInfo={NSCodingPath=(), NSDebugDescription=The given data was not a valid property list., NSUnderlyingError=0x283af4d80 {Error Domain=NSCocoaErrorDomain Code=3840 "Cannot parse a NULL or zero-length data" UserInfo={NSDebugDescription=Cannot parse a NULL or zero-length data}}}

The localized one says:

"The data couldn’t be read because it isn’t in the correct format."

This sounds like some error deep in iOS. The testing device has Apple ID logged in and uses passcode.

Anything we can do on our end to solve this issue?

Replies

We managed to "fix it" by resetting the device to factory settings. Unfortunately this does not look like good solution to offer in support communications with our users.

Please file a bug report using Feedback Assistant. Before filing the bug report, please reproduce the issue and collect a sysdiagnose shortly after the bug occurs; then attach the sysdiagnose to the bug report. Thanks in advance!

@Kmart Any updates on this issue? The bug is still present a year later and reported by users every day on our app. We've also filed a bug report (FB13549454) on this matter.