Googling and Parse docs didn't give too much info about this exception, but There are few common mistakes I found. You should treat users as ParseUser
, not ParseObject
.
ParseQuery<ParseUser> query = ParseUser.getQuery();
One more case: need to specify what to find in background. If it is username
, so write:
parseQuery.whereEqualTo("username", userName);
And finally callback will contain List
with ParseUser
s, not ParseObject
s
query.findInBackground(new FindCallback<ParseUser>() {
public void done(List<ParseUser> objects, ParseException e) {
}
});
I'm not sure exception will be gone, but I hope this answer will be useful anyways.
Some useful links: doc with example, answer, Doc for class ParseQuery
with examples
UPDATE
This is the official doc how to handle this error, also as I commented try to use ParseUser.enableRevocableSessionInBackground()
after Parse.initialize();
According to the SDK Documentation it is gonna update session token and only one case it could be invalid - ParseObject
was removed.
Hope that helps.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…