Error Domain=NSCocoaErrorDomain Code=4097 "connection to service named com.apple.AuthenticationServicesCore.AuthenticationServicesAgent"

Hi devs!!!

Calling createCredentialRegistrationRequestWithChallenge returns the following error:

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

What can be the potential reason?

Post not yet marked as solved Up vote post of asmbaty Down vote post of asmbaty
1.9k views
  • It's hard to say what's going on here without additional information. Can you file this through Feedback Assistant? To provide the most useful information: reproduce the issue, trigger a sysdiagnose shortly after, then attach the sysdiagnose and note the time when you hit the issue in the feedback. Feel free to share the feedback number here. We'll happily take a look :)

Add a Comment

Replies

Did you find a solution? I have the same issue

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.

  • Some updates- url safe encoding (using - and _ and no padding) causes this issue, fixed by replacing unsupported characters and adding padding.

  • Thanks. This helped solve my issue. Today I learned that there is regular base64 and URL-safe base64. This answer on StackOverflow details the differences between the two nicely: https://stackoverflow.com/a/55389212

    I originally passed a URL-safe base64 string into createCredentialRegistrationRequestWithChallenge, which caused this error to occur. After converting it into regular base64, the issue was resolved.

Add a Comment