Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SASLError using PLAIN: not-authorized error #69

Closed
JoCodes opened this issue Feb 4, 2015 · 4 comments
Closed

SASLError using PLAIN: not-authorized error #69

JoCodes opened this issue Feb 4, 2015 · 4 comments

Comments

@JoCodes
Copy link

JoCodes commented Feb 4, 2015

Hi Team,

I m confronted with "SASLError using PLAIN: not-authorized" error while installing the Demo App created on a new mobile and registering as a new User. The same version of code works fine with the testing mobile device already been used. Its throwing error while trying to login to the Chat after successfully logged in as the User.

Please let help me in sorted this out . Below is the logcat request and responses captured for reference

02-04 20:37:32.688 23251-23354/technovibe.zone D/QBASDK﹕ =========================================================
=== REQUEST ==== 430e2f01-6699-4abb-bcbe-f1ffc3cfd546 ===
REQUEST
POST https://api.quickblox.com/login.json
HEADERS
QuickBlox-REST-API-Version=0.1.1
QB-SDK=Android 2.1
QB-Token=259cbcadebbed405123768dddb26f18963fb0f2d
PARAMETERS
login=+914333343
password=+914333343
INLINE
POST https://api.quickblox.com/login.json?login=%2B914333343&password=%2B914333343
02-04 20:37:38.357 23251-23354/technovibe.zone D/QBASDK﹕ *********************************************************
*** RESPONSE ** 430e2f01-6699-4abb-bcbe-f1ffc3cfd546 ***
STATUS : 202
HEADERS
Access-Control-Allow-Origin=

Cache-Control=no-cache
Connection=keep-alive
Content-Type=application/json; charset=utf-8
Date=Wed, 04 Feb 2015 15:07:38 GMT
QB-Token-ExpirationDate=2015-02-04 17:07:33 UTC
QuickBlox-REST-API-Version=0.1.1
Server=nginx/1.0.15
Status=202 Accepted
Transfer-Encoding=chunked
X-Rack-Cache=invalidate, pass
X-Request-Id=295489253bf86a03a0c478e1dff581f0
X-Runtime=0.023690
X-UA-Compatible=IE=Edge,chrome=1
BODY
'{"user":{"id":2270982,"owner_id":13263,"full_name":"technovibe","email":null,"login":"+914333343","phone":null,"website":null,"created_at":"2015-02-02T18:19:34Z","updated_at":"2015-02-02T18:19:37Z","last_request_at":"2015-02-04T15:07:38Z","external_user_id":null,"facebook_id":null,"twitter_id":null,"blob_id":null,"custom_data":"{avatar_url: "", status: "", is_import: 0}","user_tags":null}}'
02-04 20:37:38.461 23251-23354/technovibe.zone I/System.out﹕ instanceofenumlogin_typePHONE
02-04 20:37:38.527 23251-23354/technovibe.zone I/System.out﹕ instanceofenumuser_login+914333343
02-04 20:37:38.572 23251-23354/technovibe.zone I/System.out﹕ COmpositeServiceCommand:bundle:Bundle[{user=QBUser{id=2270982, createdAt=Mon Feb 02 23:49:34 GMT+05:30 2015, updatedAt=Mon Feb 02 23:49:37 GMT+05:30 2015, fullName='technovibe', email='null', login='+914333343', phone='null', website='null', lastRequestAt='Wed Feb 04 20:37:38 GMT+05:30 2015', externalId=null, facebookId=null, twitterId=null, blobId=null, tags='null', password='+914333343', oldPassword='null', customData='{avatar_url: "", status: "", is_import: 0}'}
02-04 20:37:38.573 23251-23354/technovibe.zone I/System.out﹕ COmpositeServiceCommand:bundle:Bundle[{user=QBUser{id=2270982, createdAt=Mon Feb 02 23:49:34 GMT+05:30 2015, updatedAt=Mon Feb 02 23:49:37 GMT+05:30 2015, fullName='technovibe', email='null', login='+914333343', phone='null', website='null', lastRequestAt='Wed Feb 04 20:37:38 GMT+05:30 2015', externalId=null, facebookId=null, twitterId=null, blobId=null, tags='null', password='+914333343', oldPassword='null', customData='{avatar_url: "", status: "", is_import: 0}'}
02-04 20:37:38.574 23251-23354/technovibe.zone I/System.out﹕ currentUserQBUser{id=2270982, createdAt=Mon Feb 02 23:49:34 GMT+05:30 2015, updatedAt=Mon Feb 02 23:49:37 GMT+05:30 2015, fullName='technovibe', email='null', login='+914333343', phone='null', website='null', lastRequestAt='Wed Feb 04 20:37:38 GMT+05:30 2015', externalId=null, facebookId=null, twitterId=null, blobId=null, tags='null', password='+914333343', oldPassword='null', customData='{avatar_url: "", status: "", is_import: 0}'}
02-04 20:37:38.575 23251-23354/technovibe.zone I/System.out﹕ QBChatRestHelper:QBUser{id=2270982, createdAt=Mon Feb 02 23:49:34 GMT+05:30 2015, updatedAt=Mon Feb 02 23:49:37 GMT+05:30 2015, fullName='technovibe', email='null', login='+914333343', phone='null', website='null', lastRequestAt='Wed Feb 04 20:37:38 GMT+05:30 2015', externalId=null, facebookId=null, twitterId=null, blobId=null, tags='null', password='+914333343', oldPassword='null', customData='{avatar_url: "", status: "", is_import: 0}'}
02-04 20:37:38.576 23251-23354/technovibe.zone D/QBASDK﹕ Connected. Login to chat, currentUser JID: 2270982-13610, resource: d869a2dbbd2c0295
02-04 20:37:39.068 23251-23354/technovibe.zone W/System.err﹕ at org.jivesoftware.smack.tcp.XMPPTCPConnection.login(XMPPTCPConnection.java:244)
02-04 20:37:39.068 23251-23354/technovibe.zone W/System.err﹕ at com.quickblox.chat.QBChatService.login(QBChatService.java:244)
02-04 20:37:39.070 23251-23354/technovibe.zone W/System.err﹕ at com.quickblox.chat.QBChatService.login(QBChatService.java:218)
02-04 20:37:39.070 23251-23354/technovibe.zone W/System.err﹕ at technovibe.zone.Core.qb.helpers.QBChatRestHelper.login(QBChatRestHelper.java:53)
02-04 20:37:39.070 23251-23354/technovibe.zone W/System.err﹕ at technovibe.zone.Core.qb.commands.QBLoginChatCommand.tryLogin(QBLoginChatCommand.java:59)
02-04 20:37:39.070 23251-23354/technovibe.zone W/System.err﹕ at technovibe.zone.Core.qb.commands.QBLoginChatCommand.perform(QBLoginChatCommand.java:46)
02-04 20:37:39.075 23251-23354/technovibe.zone I/System.out﹕ sendResult:Bundle[{action=login_fail_action, error=org.jivesoftware.smack.sasl.SASLErrorException: SASLError using PLAIN: not-authorized}]
02-04 20:37:39.078 23251-23354/technovibe.zone W/System.err﹕ at org.jivesoftware.smack.tcp.XMPPTCPConnection.login(XMPPTCPConnection.java:244)
02-04 20:37:39.078 23251-23354/technovibe.zone W/System.err﹕ at com.quickblox.chat.QBChatService.login(QBChatService.java:244)
02-04 20:37:39.079 23251-23354/technovibe.zone W/System.err﹕ at com.quickblox.chat.QBChatService.login(QBChatService.java:218)
02-04 20:37:39.079 23251-23354/technovibe.zone W/System.err﹕ at technovibe.zone.Core.qb.helpers.QBChatRestHelper.login(QBChatRestHelper.java:53)
02-04 20:37:39.080 23251-23251/technovibe.zone D/STEPS﹕ executing login_fail_action
02-04 20:37:39.080 23251-23354/technovibe.zone W/System.err﹕ at technovibe.zone.Core.qb.commands.QBLoginChatCommand.tryLogin(QBLoginChatCommand.java:59)
02-04 20:37:39.080 23251-23354/technovibe.zone W/System.err﹕ at technovibe.zone.Core.qb.commands.QBLoginChatCommand.perform(QBLoginChatCommand.java:46)
02-04 20:37:39.090 23251-23251/technovibe.zone W/System.err﹕ at org.jivesoftware.smack.tcp.XMPPTCPConnection.login(XMPPTCPConnection.java:244)
02-04 20:37:39.090 23251-23251/technovibe.zone W/System.err﹕ at com.quickblox.chat.QBChatService.login(QBChatService.java:244)
02-04 20:37:39.090 23251-23251/technovibe.zone W/System.err﹕ at com.quickblox.chat.QBChatService.login(QBChatService.java:218)
02-04 20:37:39.091 23251-23251/technovibe.zone W/System.err﹕ at technovibe.zone.Core.qb.helpers.QBChatRestHelper.login(QBChatRestHelper.java:53)
02-04 20:37:39.091 23251-23251/technovibe.zone W/System.err﹕ at technovibe.zone.Core.qb.commands.QBLoginChatCommand.tryLogin(QBLoginChatCommand.java:59)
02-04 20:37:39.091 23251-23251/technovibe.zone W/System.err﹕ at technovibe.zone.Core.qb.commands.QBLoginChatCommand.perform(QBLoginChatCommand.java:46)
02-04 20:37:39.092 23251-23251/technovibe.zone I/System.out﹕ Splash:onFailAction:login_fail_action

@soulfly
Copy link
Contributor

soulfly commented Feb 4, 2015

Just curious, does it work without + in password?

@JoCodes
Copy link
Author

JoCodes commented Feb 4, 2015

Its working with + in the password for User login and Chat login for another User and another phone installed with the same version.

@soulfly
Copy link
Contributor

soulfly commented Oct 13, 2015

This is fixed, try our latest version of SDK

@soulfly soulfly closed this as completed Oct 13, 2015
@sachin-shelke
Copy link

sachin-shelke commented Apr 18, 2016

The issue is still there with Android SDK 2.5.

D: RECV (0):
E: SASLError using PLAIN: not-authorized
com.quickblox.core.exception.QBResponseException: SASLError using PLAIN: not-authorized
at org.jivesoftware.smack.SASLAuthentication.authenticationFailed(SASLAuthentication.java:365)
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.parsePackets(XMPPTCPConnection.java:1044)
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.access$300(XMPPTCPConnection.java:948)
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader$1.run(XMPPTCPConnection.java:963)
at java.lang.Thread.run(Thread.java:803)
W: Long monitor contention event with owner method=java.net.InetAddress[] libcore.io.Posix.android_getaddrinfo(java.lang.String, android.system.StructAddrinfo, int) from Posix.java:-2 waiters=0 for 1.274s
D: Connecting to chat: chat.quickblox.com
D: Connected. Login to chat, currentUser JID: -1-32837, resource: android_f6e7eefb0a593aa0
D: SENT (0): AC0xLTMyODM3AA==
D: RECV (0):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants