I've just tried installing the 17.2 Public Beta (21C5029g) on my device. I have the profile installed. The error is different than it was on the 17.1 full release build, but still things are not working. My code looks like this:
Task {
print("creating THClient")
let cli = THClient() // on 17.1, this would log an XPC error and hang indefinitely, so...progress?
print("created THClient")
print("is preferred available: \(await cli.isPreferredAvailable())")
do {
let creds = try await cli.allCredentials()
print("All creds: \(creds)")
} catch {
print("Error: \(error)")
}
do {
try await cli.storeCredentials(forBorderAgent: borderAgentID, activeOperationalDataSet: dataset)
print("Added creds")
} catch {
print("Error adding creds: \(error)")
}
do {
let creds = try await cli.allCredentials()
print("All creds: \(creds)")
} catch {
print("Error: \(error)")
}
}
The logs I get are:
creating THClient
created THClient
is preferred available: false
Client: -[THClient getConnectionEntitlementValidity]_block_invoke - Error:
Error: Error Domain=ThreadCredentialsStore Code=3 "Failed to retrieve all active border router records" UserInfo={NSLocalizedDescription=Failed to retrieve all active border router records, NSUnderlyingError=0x28198aeb0 {Error Domain=NSOSStatusErrorDomain Code=0 "(null)"}}
Error adding creds: Error Domain=ThreadCredentialsStore Code=4 "Invalid parameter sent to server..." UserInfo={NSLocalizedDescription=Invalid parameter sent to server...}
Error: Error Domain=ThreadCredentialsStore Code=3 "Failed to retrieve all active border router records" UserInfo={NSLocalizedDescription=Failed to retrieve all active border router records, NSUnderlyingError=0x281980ff0 {Error Domain=NSOSStatusErrorDomain Code=0 "(null)"}}
-[THClient storeCredentialsForBorderAgent:activeOperationalDataSet:completion:]_block_invoke:660: - Response: Error Domain=ThreadCredentialsStore Code=4 "Invalid parameter sent to server..." UserInfo={NSLocalizedDescription=Invalid parameter sent to server...}