CloudKit fails to fetch data from Public Container. Error 1/4000

331 Views Asked by At

I recently deployed an app update with CloudKit support. It has been working fine, and all of sudden I'm starting to get this error:

Internal Error" (4000); "Couldn't get a signing certificate"

And my app can't fetch the information from CloudKit.

My provisioning profiles are ok. I changed Apple IDs to check, and none works. I changed iPhone, and still no luck.

Development environment does work on simulator, but not on iPhone. Obviously production environment can't be fetch from simulator.

The most interesting part is that if I connect my iPhone to Mac, and go to Xcode -> Devices, open my app downloaded from App Store, and read the devices logs, when I attempt to fetch the records, it logs:

Sep 5 15:26:23 Rogers-6 cloudd[7493] <Error>: We didn't get a Mescal cert back from the server Sep 5 15:26:23 Rogers-6 cloudd[7493] <Error>: Couldn't renew Mescal session. Failing this request: <CKError 0x12eee3680: "Internal Error" (4000); "Couldn't get a signing certificate">

I searched for that Mescal error in Google with between quotation marks and got zero results.

There's only one Stack Overflow question regarding this issue:

  1. CloudKit: "Internal Error" (1/4000); "Couldn't get a signing certificate"> And it doesn't help.

Last, but most important, it is working for some users afaik. A friend of mine has my app installed, and it fetches the data with no problems at all.

Any clues?

Thanks in advance.

PS: If anyone wants to test and see if it's working for you, my app's named Sueca Drinking Game on the App Store.

2

There are 2 best solutions below

1
On

It seems anyone running iOS 10 trying to access data in a public iCloud database has to have iCloud enabled on their device. I have this issue going on as well and everyone affected has iCloud Drive OFF. I hope this helps!

0
On

September 14th: The problem has been solved. I got this answer by Apple, on my ticket:

We believe that this issue has been resolved through changes on our side.

If this issue still occurs, please update your bug report with relevant logs, and a test case if possible.

After all, it was really on their side. Hope this information helps.

EDIT (September 30th): I'm facing this issue again. Same diagnosis, no changed made on my side. Filled a new ticket to Apple, I hope it gets resolved soon, since I'm being financially affected by this error :/