ACAccountStore Error 5
Asked Answered
C

3

10

When attempting to save an account into an ACAccountStore, I sometimes receive this error. Later, if I attempt to access this account, I find that it's actually been saved. So far, I've yet to find any information about this nondescript error. Does anyone know what it means?

Error Domain=com.apple.accounts Code=5 "The operation couldn't be completed. (com.apple.accounts error 5.)"

Cathay answered 11/7, 2012 at 16:33 Comment(3)
I am getting this Error Domain=com.apple.accounts Code=6 "The operation couldn’t be completed. (com.apple.accounts error 6.)"Wedded
for me it's error 6 too. Worked on iOS 5 and stopped working on iOS 6 GM. If I find the solution I'll report it...Ruckus
I just posted something similar here #12630566Durfee
F
9

This question is a little dated, but I'm struggling in the same area. Here's one thing that should help: I did find documentation on the error codes:

typedef enum ACErrorCode {
   ACErrorUnknown = 1,
   ACErrorAccountMissingRequiredProperty,
   ACErrorAccountAuthenticationFailed,
   ACErrorAccountTypeInvalid,
   ACErrorAccountAlreadyExists,
   ACErrorAccountNotFound,
   ACErrorPermissionDenied,
   ACErrorAccessInfoInvalid
} ACErrorCode;

I found this in the documentation under the Accounts.framework link.

Interpreting this gives error=5 being "Account already exists" and error=6 being "Account not found." I'm hopeful this makes the errors a little less "nondescript."

Faceless answered 5/11, 2012 at 19:24 Comment(0)
A
2

This error occurs because you didn't set the Facebook account in the settings. The settings are available in iOS 6. Set that account and then try again.

Also give proper alert message on error.

Acreage answered 8/10, 2012 at 7:22 Comment(1)
Nope. First of all, this error occurs when writing accounts to the account store, so it isn't required for the user to have any previous accounts. Secondly, there were accounts added on this particular device when the error occurred. Either way, your answer is incorrect.Cathay
B
2

While I didn't find any documentation to support (or contradict) my findings, here is what seems be changed (since iOS 5):

  • In iOS 5, the user is prompted with access request even when there are no Twitter accounts setup. In iOS 6 it seems the request is declined with error code 6 when there are no accounts setup.

  • In iOS 5 the user is prompted again (and again) with access request if the user had previously disabled access to said account from Settings > Twitter. Now, in iOS 6, it seems access request is silently declined (with no error, i.e. nil error) if user has removed access to app from Settings

If anyone else finds a better answer, do comment, please.

Baudekin answered 12/10, 2012 at 20:1 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.