Please log into this app again to reconnect your Facebook account
When logging in with Facebook, ParseFacebookUtilsV4 and Parse Server, I receive the message "Please log into this app again to reconnect your Facebook account", and then the app crashes on the line that gets the facebook results as an NSDictionary, is there anything that could be causing an issue
Parse Server is on the latest version facebookAppIds and fileKey is set correctly and working
Does this same code work when using Parse.com instead of Parse Server? If yes, can you show the request and response from your Parse Server?
Thanks for your reply, Yes the code works correctly when using Parse.com, the error only occurs when I use Parse Server. How would I be able to get the request and response from the Parse Server?
@mogsten What error are you getting from the console?
Which Console?
iOS? or another console
@mogsten iOS, Xcode
This is the issue that I am getting, The console won't print exactly what happened last time, as I have restarted the server since
@mogsten Can you try "print(error)" before the line that is crashing? (Before the 'let' statement). Let me know what it prints out.
ERROR: Error Domain=com.facebook.sdk.core Code=8 "(null)" UserInfo={NSRecoveryAttempter=<_FBSDKLoginRecoveryAttempter: 0x7fb7eb201da0>, NSLocalizedRecoverySuggestion=Please log into this app again to reconnect your Facebook account., com.facebook.sdk:FBSDKGraphRequestErrorGraphErrorCode=190, com.facebook.sdk:FBSDKErrorDeveloperMessageKey=Error validating access token: The session has been invalidated because the user has changed the password., com.facebook.sdk:FBSDKGraphRequestErrorHTTPStatusCodeKey=400, com.facebook.sdk:FBSDKGraphRequestErrorCategoryKey=2, com.facebook.sdk:FBSDKGraphRequestErrorGraphErrorSubcode=460, com.facebook.sdk:FBSDKGraphRequestErrorParsedJSONResponseKey={ body = { error = { code = 190; "error_subcode" = 460; "fbtrace_id" = C8G9qKdEqg8; message = "Error validating access token: The session has been invalidated because the user has changed the password."; type = OAuthException; }; }; code = 400; }, NSLocalizedRecoveryOptions=( OK, Cancel )} fatal error: unexpectedly found nil while unwrapping an Optional value
Has there been any resolution for this case?
@mogsten you're doing a force unpack (!) on your result that's why you crash
Your should do:
guard let result = result as? [NSObject:AnyObject] else {
if let error = error { print(error) }
return
}
// continue with the result
On another note, this is the Facebook SDK that tells you that the token has been invalidated, you should request another access_token to the Facebook SDK and then link/login with it in the ParseSDK.
User signed up and logged in through Facebook! ERROR: Error Domain=com.facebook.sdk.core Code=8 "(null)" UserInfo={NSRecoveryAttempter=<_FBSDKLoginRecoveryAttempter: 0x15e68e1c0>, NSLocalizedRecoverySuggestion=Please log into this app again to reconnect your Facebook account., com.facebook.sdk:FBSDKGraphRequestErrorGraphErrorCode=190, com.facebook.sdk:FBSDKErrorDeveloperMessageKey=Error validating access token: Session does not match current stored session. This may be because the user changed the password since the time the session was created or Facebook has changed the session for security reasons., com.facebook.sdk:FBSDKGraphRequestErrorHTTPStatusCodeKey=400, com.facebook.sdk:FBSDKGraphRequestErrorCategoryKey=2, com.facebook.sdk:FBSDKGraphRequestErrorGraphErrorSubcode=460, com.facebook.sdk:FBSDKGraphRequestErrorParsedJSONResponseKey={ body = { error = { code = 190; "error_subcode" = 460; "fbtrace_id" = EeL1NzTdqu0; message = "Error validating access token: Session does not match current stored session. This may be because the user changed the password since the time the session was created or Facebook has changed the session for security reasons."; type = OAuthException; }; }; code = 400; }, NSLocalizedRecoveryOptions=( OK, Cancel )} Error Domain=com.facebook.sdk.core Code=8 "(null)" UserInfo={NSRecoveryAttempter=<_FBSDKLoginRecoveryAttempter: 0x15e68e1c0>, NSLocalizedRecoverySuggestion=Please log into this app again to reconnect your Facebook account., com.facebook.sdk:FBSDKGraphRequestErrorGraphErrorCode=190, com.facebook.sdk:FBSDKErrorDeveloperMessageKey=Error validating access token: Session does not match current stored session. This may be because the user changed the password since the time the session was created or Facebook has changed the session for security reasons., com.facebook.sdk:FBSDKGraphRequestErrorHTTPStatusCodeKey=400, com.facebook.sdk:FBSDKGraphRequestErrorCategoryKey=2, com.facebook.sdk:FBSDKGraphRequestErrorGraphErrorSubcode=460, com.facebook.sdk:FBSDKGraphRequestErrorParsedJSONResponseKey={ body = { error = { code = 190; "error_subcode" = 460; "fbtrace_id" = EeL1NzTdqu0; message = "Error validating access token: Session does not match current stored session. This may be because the user changed the password since the time the session was created or Facebook has changed the session for security reasons."; type = OAuthException; }; }; code = 400; }, NSLocalizedRecoveryOptions=( OK, Cancel )}
This is what was returned, fixed the crashing but still having issues
This is an iOS Facebook SDK problem, try to reach out on stack overflow.
I have the same problem, have you solved this problem on your side ? @mogsten
Same problem... @Gegham @mogsten
Same problem.... Does anyone solve this?
Try updating to the latest version of the Facebook SDK, in the Facebook SDK changelog they mentioned this error. This is not a Parse problem.
I just got same problem. I upgrade to latest SDK. Then got this problem. Has anybody resolved. Does my privately hosted parse server need to have secure connection?
I just logged an issue Here is my scenario I have migrated to linux based Private parse environment in Rack space. I use PF Login for user login using Facebook.
Here is Latest versions Parse Server 2.2.6 FBSDKCoreKit 4.11.0 ParseUI (1.2.0) ParseFacebookUtilsV4 (1.11.1) IOS 8 and above
Everything have been working fine. Then I changed my Facebook password. When I am logging into app using Face book alert is coming up with message
"Please log into this app again to reconnect to your Facebook account."
I am logging out and login in again to get same message.
However other users who haven't changed password are able to login as usual.
To further check I pointed my app to parse.com. It is working fine .
@flovilmart Requesting another token doesn't help here (as well as displaying a login screen).
Anyway, in old Parse dashboard we were asked to provide facebook app id AND facebook secret. In open-source parse however, we don't need to provide facebook secret. Why is that, what is the difference between the old and new parse and the secret thing? Can it cause similar problems as described above?
@FilipZawada The secret is only used in particular cases, and is not required to validate the session token.