Start a new topic

Unable to query users

I'm new to Kinvey, so this is probably a simple fix. For whatever reason, I am unable to return any results when querying the user collection. I don't get any errors, just a blank array. I can query other collections fine, so this problem seems specific to the user collection. I've set-up the userStore like this.



self.userStore = [KCSAppdataStore storeWithCollection:[KCSCollection userCollection] options:nil];



Here's an example query that should return all of the users, but returns zero objects instead.



KCSQuery *userQuery = [KCSQuery query];

[self.userStore queryWithQuery:userQuery withCompletionBlock:^(NSArray *users, NSError *errorOrNil) {

if (!errorOrNil) {

int numberUsers = users.count;

NSLog(@"no error -- found %i users", numberUsers);

} else {

NSLog(@"error: %@", errorOrNil);

}

} withProgressBlock:nil];



I'm using Kinvey 1.25. Thanks for any help.

I need to revise my question a bit--I actually am getting an error on the query now. I don't think I was before, but maybe I read the log wrong. Anyway, here's the error I get now.



Error Domain=KCSAppDataErrorDomain Code=404 "This user does not exist for this app backend"



This is strange since I've got multiple users showing in the backend. All help is appreciated.
I switched to Kinvey 1.24 and the user query works fine. There seems to be a bug related to user queries in 1.25.
HI Tyler,



This is a bug in KinveyKit 1.25. We are working on a fix.
Hi Tyler,

The 1.26 releas is out. http://devcenter.kinvey.com/ios/downloads
Login or Signup to post a comment