Setting up iCloud results in cloudd error messages

I too am experiencing this problem. It seems to be user-specific; i.e., not related to the iCloud account as the same iCloud account used under a different (system) user will not experience the problem and a different iCloud account used under the same (system) user will experience the problem.

I'm getting slightly different console messages, but yeah, they're all about PCS identity creation failures, keyset decoding failures & blah blah blah.

I had a bit of a brain-wave & just checked under ~/Library/Logs in Console and lo & behold, there are a heap of ProtectedCloudStorage-SignIn logs. Here's the contents of the latest of them with redacted hostname & AppleID values:

Oct 17 00:38:17 hostname.local com.apple.iCloudHelper[1284] <Debug>: PCSIdentityCollectionSetup: <CFBasicHash 0x7f86a17330c0 [0x7fff7953fed0]>{type = mutable dict, count = 3,
    entries =>
        0 : <CFString 0x7fff77f7e1e0 [0x7fff7953fed0]>{contents = "kPCSSetupUsername"} = <CFString 0x7f86a1461cf0 [0x7fff7953fed0]>{contents = "appleID"}
        1 : <CFString 0x7fff77f7e2c0 [0x7fff7953fed0]>{contents = "kPCSSetupDSID"} = <CFString 0x7fff77f7e800 [0x7fff7953fed0]>{contents = "<<VALUE>>"}
        2 : <CFString 0x7fff77f7e240 [0x7fff7953fed0]>{contents = "kPCSSetupPassword"} = <CFString 0x7fff77f7e800 [0x7fff7953fed0]>{contents = "<<VALUE>>"}
    }
Oct 17 00:38:17 hostname.local com.apple.iCloudHelper[1284] <Debug>: __PCSAccountHasStingrayIdentities
Oct 17 00:38:19 hostname.local com.apple.iCloudHelper[1284] <Error>: PCSHasStingrayIdentities: YES
Oct 17 00:38:21 hostname.local com.apple.iCloudHelper[1284] <Error>: PCSCopyStingrayIdentity: <CFData 0x7f86a300c000 [0x7fff7953fed0]>{length = 1845, capacity = 1845, bytes = 0x628207313082072d0c0f67616d63616c ... ab42b25d58020101} (error: (null))
Oct 17 00:38:21 hostname.local com.apple.iCloudHelper[1284] <Error>: PCSIdentityCollectionSetup failed The operation couldn’t be completed. (OSStatus error -25244 - SecItem failed to delete on private identity)

It looks like iCloudHelper is having trouble with the PCS Identity for some reason. Hopefully someone who knows a bit more about these things may shed some more light on this.


My suspicions are still that it has got to do something with my keychain but I couldn’t figure out what exactly was wrong.

I finally fixed it by signing out, then signing in again with a different iCloud account, signing out again, and, at last, signing in with my original account.

(Before using a different account, signing in with my original account would log me out immediately after logging me in.)