CloudKit data purged again and now I cannot sort on creationDate - cloudkit

This morning I suddenly got this error:
Error Domain=CKInternalErrorDomain Code=2016 "Field '___createTime'
is not marked sortable"
This was caused by this statement:
query.sortDescriptors = [NSSortDescriptor(key: "creationDate", ascending: false)]
Going to the CloudKit Dashboard I noticed that all my records were purged and apparently the model was recreated. When clicking on metadata index fields I could see that none of those are sortable anymore. From the Dashboard it's not possible to enable this. Is there any other way to enable this? Or do I just have to add my own sortable date field?

Now a couple of hours later I am able to change the searchable and sortable of these fields. So this was probably a temporary CloudKit Dashboard hickup

I am getting an error today that I didn't get yesterday, so it may be that they are changing things on us...
This is the error I am seeing today:
X-MMe-Client-Info/X-Apple-Client-Info header did not meet the minimum build version, rejecting request
I haven't made any changes to my code, so it's not me.
I also noticed the records I had stored are gone. I'm wondering if this is normal. I realize it's still in beta, so perhaps it is to be expected.

Related

How to get SvelteKit forms working in Vercel/Netlify/etc

I'm pretty new to Svelte but it is nice and straightforward in general with this form submission I have spent hours and it is driving me crazy as it doesn't make any sense why it is not sometimes working in Vercel.
I created a separate minimal SvelteKit project that submits the form to this webhook.site endpoint and it works perfectly in localhost but in Vercel deployment it works sometimes. Works once, then doesn't work three times, ten works four times in a row, then doesn't work again. Random. Sometimes Vercel gives an error, sometimes not. Here's the error:
[POST] /?/create
22:12:29:53
TypeError: fetch failed
at fetch (/var/task/node_modules/undici/index.js:105:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
cause: ConnectTimeoutError: Connect Timeout Error
at onConnectTimeout (/var/task/node_modules/undici/lib/core/connect.js:176:24)
at /var/task/node_modules/undici/lib/core/connect.js:123:46
at Immediate._onImmediate (/var/task/node_modules/undici/lib/core/connect.js:164:9)
at process.processImmediate (node:internal/timers:471:21) {
code: 'UND_ERR_CONNECT_TIMEOUT'
}
}
Then, without doing anything I tested again and it was working like 20 times in a row. I left it like that and came back after ~1h and it was still working like 10 times per row. I was here.
Then I decided to start experimenting again and in the next commit I removed the header authentication that isn't needed for the webhook.site but I had it there because, during the endless hours of hassling with it, I got at some point "feeling" that if the not used HASURA_ADMIN_SECRET ENV variable is there then it works more often. I know it is nonsense. It stopped working for good. Tested at least 20+ times with some breaks to be sure. Also tried multiple other endpoints that work brilliantly from a simple PHP script I created, from reqbin.com or from Postman. I have tried everything.
Allright, then I thought I was right - that magical HASURA_ADMIN_SECRET is needed so I added it back. That didn't fix the issue. Tried dozen of times and then although I made sure I added that header auth back properly I decided also to roll back to the version where it was stable working for so long as seen here. Now even that doesn't work anymore.
I tried long ago to deploy to Netlify and CloudFare, too as I suspected it is Netlify issue but I failed to even get the site working. So I decided to spend more time on getting it working in Netlify and when I got it working I got exactly the same error as in Netlify https://i.imgur.com/repNxyf.png so here's my dead end.
(I will make this post shorter once I get sorted)

Whether or not your action is for families is required before publishing a Google Assistant action?

I was on the process of publishing my first google assitant action and after filling all the required details I am receiveing two errors.
1.Whether or not your action is for families is required
I have already checked and accepted the terms and conditions for families question. The data is saved also. Still I do not know why the error keeps popping up.
2.For en: Your sample invocations are structured incorrectly.
I have tested my invocations in the emulator and it seems to be working. And this error appears to be random. Sometimes, it does not happen even if I just save the same details again.
Any help appreciated as I am a complete new-bie to this.
I think this was a problem from the console itself. I updated today again and it seems to be saved.

Github Issue 'locked' event doesn't update the Issue itself

I'm using GitHub API v3 to connect to a repository and get the list of issues that were update/created since a specific date. I use these parameters to get a filtered result:
filter: all
labels: bug
state: all
sort: updated
direction: ascendent
since: date
If i find any result, for each issue I get the issue events that triggered a change (filtering for the ones that happened since date).
Everything works fine for every issue event except for locked and unlocked
events that, for some reason, don't update the issue updated field.
This leads to the inability to get then the list of issues that were updated since that specific date and therefore I don't check for the issue events.
Questions:
Is there a reason why these two events don't update the issue?
Is there an acceptable solution, except for the one where I should get all the issues and query them manually?
As of today (4th of October, 2015), I cannot reproduce this issue. If it was reproducible when the question was posted, probably it was a bug, not a feature.
Is there a reason why these two events don't update the issue?
They do update the issue (see the updated_at field) and the since parameter works fine.
Is there an acceptable solution, except for the one where I should get all the issues and query them manually?
Just use the since parameter, the way how it is supposed to work, but keep in mind the timezone could be different. Since you're in Romania (like me! :-)) and your server could be into another timezone, you may want to modify the date to match the Romanian time. That's most probably your issue. Just add/substract few hours and see if that helps.
curling the issues, I cannot reproduce the behavior you have.
On the other side, you may want to use the locked parameter which is anyway updated.

iOS 8 CloudKit: CKNotifications keep showing up, marked as CKNotificationTypeReadNotification

Whenever I query for past CKNotifications using CKFetchNotificationChangesOperation, I keep on getting a whole bunch that are marked as CKNotificationTypeReadNotification. And indeed, I have read them before, marked them as read (using CKMarkNotificationsReadOperation), and am updating my lastServerChangeToken when querying.
Why do they keep showing up?
Thanks.
This started working…and, unfortunately, I'm not sure why.

How to debug 'no entities specified' when working with ZSync and CoreData Syncing

I'm trying to get ZSync to work between a desktop and iPhone app. I've got my schemas set up and all info matches between my MOM and my schema so I should be good to go. When I initiate my sync, however, I get this error.
|Miscellaneous|Error| SyncServices
precondition failure in [ISyncSession
_validateClient:entityNames:beforeDate:clientHasTruthForEntityNames:target:selector:]:
no entities specified
Anyone know what this means, and how to debug it?
I'm a novice with this SyncServices stuff.
Cheers!
Update
Ok, I've got it showing in syncrospector, but still getting the unrecognized error.
What do you mean by my clientdescription at the Daemon is wrong?
Thanks.
Update
Alright, I had the clientDescription working , but now when this fires:
ZAssert([[ISyncManager sharedManager]
registerSchemaWithBundlePath:path],
#"Failed to register sync schema");
I get this error :(
[NOTE: this exception originated in
the server.]
*** -[NSCFArray insertObject:atIndex:]: attempt to
insert nil
This is an issue in your Sync Services settings. It means that you have not declared what entities need to be synced. I suggest comparing your SyncSchema subproject (for your desktop app side) to the one included in the SampleDesktop project.
update
I checked all that, to no avail. I am using a versioned mom, would that make a difference? In my ManagedObjectModels, should I use the name of the version or the collection? (mom or momd?) Thanks, I'm almost there!
No, the schema should point to your latest model. Are you certain that it is pointing to it correctly? That can be one of the trickiest bits. Are you including the model in the schema bundle or are you making a reference to it?
update
First, please put these updates into your question, the comment section is really not meant for them.
Alright, got past this problem. Syncing starts now I get "failed to register client because: client named Xmac wants to sync unrecognized entity named: X.Entity" This happens with all my entities, sadly.
This error means that your sync schema is still not completely valid. Does your desktop client sync?
Can you see its data in the syncrospector?
If so then your clientdescription at the Daemon is wrong. If it doesn't sync then solve that first as it sounds like your SyncSchema bundle is still incorrect. I suggest trying to compare it against the sampleDesktop application that is included in the project.
update Syncrospector
Ok, I've got it showing in syncrospector, but still getting the unrecognized error. What do you mean by my clientdescription at the Daemon is wrong? Thanks.
In the syncrospector I am guessing that you are seeing all of your entities and data?
On the Daemon, there is a clientDescription.plist. This plist describes what data that the Daemon is going to sync with. That plist needs to be updated (since the default one refers to the sample app, etc.) to reference your data structures just like your desktop application does.
In the very near future, this piece will be moved to a plugin so that you are not modifying the daemon directly. Expect to see updates on the project itself during the next couple of weeks. But for now, (and will be reusable), modify the plist inside of the daemon and you should be ready to sync.
update ZAssert
That line unwinds into:
BOOL success = [[ISyncManager sharedManager] registerSchemaWithBundlePath:path];
NSAssert(success, #"Failed to register sync schema");
A few things can cause this:
Your path is nil, check that in the debugger
There is something wrong with your sync schema.
What other debug comments are you seeing?