EDIT: inconsistent results
Post
Replies
Boosts
Views
Activity
I had this issue after a change in the model. In my case, removing the app and re-installing did the trick.
The 'async' in the accepted answer did it for me. I changed from context.performAndWait({ delete action }) to await context.perform({ delete action }). and this fixed it for me.