ASAuthorizationController performRequest returns 4097 error

Hi all,

Trying to create a Passkeys registration in my app. This is the implementation I have:

ASAuthorizationPlatformPublicKeyCredentialProvider *provider = [[ASAuthorizationPlatformPublicKeyCredentialProvider alloc] initWithRelyingPartyIdentifier:[[jsonDict objectForKey:@"rp"] objectForKey:@"id"]];
                ASAuthorizationPlatformPublicKeyCredentialRegistrationRequest *request = [provider createCredentialRegistrationRequestWithChallenge: [jsonDict objectForKey:@"challenge"] name:[[jsonDict objectForKey:@"user"] objectForKey:@"name"] userID:[[jsonDict objectForKey:@"user"] objectForKey:@"id"]];
                ASAuthorizationController *controller = [[ASAuthorizationController alloc] initWithAuthorizationRequests:[NSArray arrayWithObject:request]];
                controller.delegate = self;
                controller.presentationContextProvider = self;
                [controller performRequests];

But I get this error:

Remote proxy object error handler invoked with error: Error Domain=NSCocoaErrorDomain Code=4097 "Couldn’t communicate with a helper application."
Connection to agent service interrupted with error: Error Domain=NSCocoaErrorDomain Code=4097 "Couldn’t communicate with a helper application."
ASAuthorizationController credential request failed with error: Error Domain=NSCocoaErrorDomain Code=4097 "Couldn’t communicate with a helper application."

And this is the NSError I get in authorizationController:didCompleteWithError:

authorizationController error: Error Domain=NSCocoaErrorDomain Code=4097 "connection to service named com.apple.AuthenticationServicesCore.AuthenticationServicesAgent" UserInfo={NSDebugDescription=connection to service named com.apple.AuthenticationServicesCore.AuthenticationServicesAgent}

Everything is defined right (associated domains in project and .well-known).

Any reason I can't continue?

Edit: I'm with iOS 17.0 (21A5248v) and Xcode-Beta (15A5160n) if it matters.

Thanks

Opened a feedback: FB12334503 with sysdiagnose

Saw you ask in another thread so copying my response here: I had this same error, but it was caused by switching to a different webauthn library in the backend server. The new library encodes things slightly differently which I think doesn't play nicely with AuthenticationServices.

I'm getting this error too. The passkey sign-in request isn't even reaching my server, so the problem must be on the device. Has anyone found a solution yet?

I have this problem as well, but it happens intermittently. I don't know what exactly triggers it.

ASAuthorizationController performRequest returns 4097 error
 
 
Q