iOS: Initial EasyFB login returns nil user object


When a user logs into the app for the first time, using easyLoginWithFacebookFieldsMapping, it redirects to Safari, asks the user to grant permission to the app, then redirect back to the app. This all works fine until I call [backendless.userService handleOpenURL:url] which always returns nil.

I get the following error from the SDK, when trying to parse the URL:

UserService -> handleOpenURL: ERROR = Error Domain=NSCocoaErrorDomain Code=3840 "No value for key in object around character 789." UserInfo={NSDebugDescription=No value for key in object around character 789.}

I saw it was an issue with another user, but have been fixed in SDK 3.0.21 (as per link)

Call being done for login:

[backendless.userService easyLoginWithFacebookFieldsMapping:@{@"id":@"username", @"name":@"name"}
                                                    permissions:@[@"email", @"public_profile"]
                                                       response:^(id response) {
                                                           NSLog(@"%@", response);
                                                           [self.hud hide:YES];
                                                          error:^(Fault *fault) {
                                                              NSLog(@"%@", fault.detail);
                                                              [self handleLogInError:fault.];


Details of the URL being returned below:


Decoded String: 

backendlessBA6D604B-62A6-4A96-FF25-51317857DA00://{"lastLogin":"Mon May 23 23:09:28 UTC 2016","created":"Mon May 23 22:45:19 UTC 2016","isAdmin":false,"ownerId":"717689B0-4E8F-74AE-FF10-506DA4E1E500","deviceId":null,"__meta":"{\"relationRemovalIds\":{},\"selectedProperties\":[\"created\",\"isAdmin\",\"ownerId\",\"deviceId\",\"__updated__meta\",\"password\",\"twitter_name\",\"name\",\"___class\",\"isTwitter\",\"profileImageThumbUrl\",\"profileImageUrl\",\"updated\",\"objectId\",\"email\",\"username\"],\"relatedObjects\":{}}","twitter_name":null,"name":"Niel Joubert","___class":"Users","isTwitter":null,"user-token":"F2757E6D-43CB-5382-FF3D-A8F126F5FB00","profileImageThumbUrl":null,"profileImageUrl":null,"updated":null,"objectId":"717689B0-4E8F-74AE-FF10-506DA4E1E500","email":"","username"#_=_

Hi Niel,

This problem is associated with your Facebook account. To investigate it we need your Facebook login & password. Could you provide them to

Vyacheslav Vdovichenko,
Backendless Support Team


This happens with any Facebook account that is used.

I have emailed my testing profile’s details to

Hi Guys

Any ideas when this issue will be sorted as we have a live application up and running and this is not good for business?



We reproduced this issue, now we are working with it, and let your know about a solution.

Internal ticket - BKNDLSS-12553

Niel, Wayne, please try again. Maybe you have some other accounts with this bug - could you send them to


The beginning of the returned URL is not correct now.

Getting the following error:

UserService -> handleOpenURL: ERROR = Error Domain=NSCocoaErrorDomain Code=3840 "No value for key in object around character 12." UserInfo={NSDebugDescription=No value for key in object around character 12.}

For URL:

backendlessba6d604b-62a6-4a96-ff25-51317857da00://{"lastLogin"//","profileImageUrl":"","updated":"Thu May 26 19:20:43 UTC 2016","objectId":"74F6DC77-B3D4-B59D-FFCA-9F3F3A8CFB00","email":"","username":"10154520832965839"}#_=_

Here is my result with your account:</img>

I just got it with our UserSocial sample from iOS-Samples github. Please check it too, and let me know how it goes for you.

It does return the correct values if the user has been logged in before, but not on the first time the user goes through the process of allowing the FB app access to his account etc.

I can remove the app for my FB user if you can test again. (I removed both Backendless apps from the profile now)

Niel, I do got the bug one time, but now it works fine again! What are you doing with your account to retrieve the bug? Could you describe a scenario?

  1. Delete app from FB user’s account (Settings -> Apps -> delete app)

  2. Open app on phone or simulator

  3. Login using FB

  4. Approve access to profile in browser

  5. Tap ‘Open’ on popup

  6. Returned to app and user will be nil if URL is parsed.

If you log in again, with the same account it will work. Its very weird :frowning:

Thanks, Niel, this indeed can be reproduced.

Hi Guys

Any news on when this will be fixed?



Hi Wayne,

We are still working with this issue, looks like this is a Safari bug.


Thanks for the feedback

@Vyacheslav Seems like the URL being returned does not return the LastLogin value, which then breaks the next key (profileImageURL in our case).

Will logging in via the Facebook SDK route work better, or with the bug be present there as well?

I just checked - login with Facebook SDK works fine (and first and next times)
You could try our FacebookLogin sample .

We have found the solution: if the first request is returned with a broken url, this request is repeated.

To use this feature you should update the latest Backendless SDK from CocoaPods (3.0.24 release) or from ios-SDK github.