Parse error codes 209 and -34018

2020-06-30 05:06发布

I have spent several hours learning user management on Parse, thinking it would be easy considering it's been an established service for so long.

There is poor documentation around 'automatic user' and sessions.

I am trying to build an App that allows the user to exist anonymously (using [PFUser enableAutomaticUser]), before they decide to sign up.

Registration Steps:

  1. Gather user details from the UI
  2. Log out current automatic user and wait for success
  3. Upon success create a user object using [PFUser user] and assign values
  4. Call signUpInBackgroundWithBlock on the new user instance

I sometimes get the following errors (yes, only sometimes), when doing the above.

[Error]: PFKeychainStore failed to get object for key 'currentUser', with error: -34018

[Error]: invalid session token (Code: 209, Version: 1.7.0)

I also end up with a dirty database, because I don't know how to delete the automatic user that was previously created. I tried keeping the object id of the old user around and using deleteEventually but that didn't work?

Any advice on how you would go about achieving this would be great.

2条回答
乱世女痞
2楼-- · 2020-06-30 05:20

Take a look at this issue with parse on iOS: https://github.com/ParsePlatform/Parse-SDK-iOS-OSX/issues/437. I believe this was an issue in iOS and is now fixed

查看更多
3楼-- · 2020-06-30 05:29

Actually, this is a bug of keychain, you can search it at github.

Github 34018 issues

A few months ago, some apple's staff came our company to give us a course, after course,we asked this question, they also did't give us a solution

查看更多
登录 后发表回答