Unable to login with Twitter if user name contains cyrillic symbols (iOS)

The code for twitter login:

let fieldsMapping = [
 "name" : "name",
 "profile_image_url": "avatarUrl",
 "id_str": "id_str"
]
Backendless.sharedInstance().userService.easyLoginWithTwitterFieldsMapping( fieldsMapping,
response: { (success: AnyObject!) -> Void in
//...
},
error: { (fault: Fault!) -> Void in
//...
})

Twitter users, whose name contains cyrillic symbols, cannot log in, as method userService.handleOpenUrl, which gets called in AppDelegate, throws an error:
UserService -> handleOpenURL: ERROR = Error Domain=NSCocoaErrorDomain Code=3840 “Unescaped control character around character <number>”
However, in the Users table an entry for this user is created.
After a twitter user’s name has been changed so that it contains only latin symbols, I can login with this user account successfully.
Is there any workaround? I cannot get rid of “name” field in fields mapping, as it is required info.

Hi Elena,

Could you please check if you’re using the latest build of the iOS SDK? If you do, I will assign this to an engineer to verify the behavior.

Regards,
Mark

Hello Mark,

I use the latest version of the iOS SDK (3.0.28).

Thank you!

Hi Elena,

The cause of this issue is a bug in Safari, now we are investigating it.
You could help us if you give us some logs:

  1. Add the line

DebLog.setIsActive(true)
just after the backendless.initApp(…)
2. Run Twitter login with your app
3. Add here all logs which are started with

“UserService -> handleOpenURL: …”

Regards,
Slava

Hi Slava,

These are all the logs which start with “UserService”

    2016-07-08 09:41:04.071 UserService -> easyLoginResponder: 'https://api.twitter.com/oauth/authenticate?oauth_token=X_fVCwAAAAAAPBsEAAABVck8984' -> 'https://api.twitter.com/oauth/authenticate?oauth_token=X_fVCwAAAAAAPBsEAAABVck8984' 1 2016-07-08 09:41:30.153 UserService -> handleOpenURL: url = 'backendless33F3170D-5404-FA20-FF66-342EFD174000://%7B%22lastLogin%22:%22Fri%20Jul%2008%2006:41:28%20UTC%202016%22,%22imageName%22:null,%22authData%22:null,%22avatarURL%22:%22http://pbs.twimg.com/profile_images/649621425507160064/uVdAwmAa_normal.jpg%22,%22created%22:%22Mon%20Jul%2004%2007:07:29%20UTC%202016%22,%22ownerId%22:%22A771FE4B-1CCF-2C65-FF35-B3D32994D400%22,%22socialNetworkType%22:null,%22__meta%22:%22%7B%5C%22relationRemovalIds%5C%22:%7B%7D,%5C%22selectedProperties%5C%22:%5B%5C%22imageName%5C%22,%5C%22authData%5C%22,%5C%22avatarURL%5C%22,%5C%22created%5C%22,%5C%22ownerId%5C%22,%5C%22socialNetworkType%5C%22,%5C%22__updated__meta%5C%22,%5C%22password%5C%22,%5C%22favoriteFeed%5C%22,%5C%22id_str%5C%22,%5C%22name%5C%22,%5C%22___class%5C%22,%5C%22updated%5C%22,%5C%22email%5C%22,%5C%22objectId%5C%22,%5C%22username%5C%22,%5C%22placeholderImage%5C%22%5D,%5C%22relatedObjects%5C%22:%7B%7D%7D%22,%22favoriteFeed%22:null,%22id_str%22:null,%22name%22:%22%1E;5=L%22,%22___class%22:%22Users%22,%22user-token%22:%2254380AF5-CB08-A927-FF32-6B6CF1BF1A00%22,%22updated%22:null,%22email%22:%223835008478%22,%22objectId%22:%22A771FE4B-1CCF-2C65-FF35-B3D32994D400%22,%22username%22:null,%22placeholderImage%22:null%7D' 016-07-08 09:41:30.154 UserService -> handleOpenURL: JSONObject = '{"lastLogin":"Fri Jul 08 06:41:28 UTC 2016","imageName":null,"authData":null,"avatarURL":"http://pbs.twimg.com/profile_images/649621425507160064/uVdAwmAa_normal.jpg","created":"Mon Jul 04 07:07:29 UTC 2016","ownerId":"A771FE4B-1CCF-2C65-FF35-B3D32994D400","socialNetworkType":null,"__meta":"{\"relationRemovalIds\":{},\"selectedProperties\":[\"imageName\",\"authData\",\"avatarURL\",\"created\",\"ownerId\",\"socialNetworkType\",\"__updated__meta\",\"password\",\"favoriteFeed\",\"id_str\",\"name\",\"___class\",\"updated\",\"email\",\"objectId\",\"username\",\"placeholderImage\"],\"relatedObjects\":{}}","favoriteFeed":null,"id_str":null,"name":";5=L","___class":"Users","user-token":"54380AF5-CB08-A927-FF32-6B6CF1BF1A00","updated":null,"email":"3835008478","objectId":"A771FE4B-1CCF-2C65-FF35-B3D32994D400","username":null,"placeholderImage":null}' 2016-07-08 09:41:30.154 UserService -> handleOpenURL: ERROR = Error Domain=NSCocoaErrorDomain Code=3840 "Unescaped control character around character 648." UserInfo={NSDebugDescription=Unescaped control character around character 648.}

Hi Vyacheslav,
Are there any updates?

Hi Elena,

This issue is fixed in the latest Backendless SDK (pod 3.0.32 release), but the server side fixes yet are not deployed. Hope we do this tomorrow. We will let you know when it will be done.

Regards,
Slava

Hi Elena,

We have deployed the server-side fixes, so you could update the latest Backendless SDK and check your app again.

Regards,
Slava

It works now, thank you!