QuickBlox / quickblox-android-sdk

QuickBlox Android SDK includes code snippets with main use cases and framework JAR library.
BSD 3-Clause "New" or "Revised" License
417 stars 697 forks source link

base Unexpected signature #38

Closed omamapk closed 9 years ago

omamapk commented 9 years ago

Hi,

I am migrating from 1.2 to 2.0 because i am unable to logout already login chat user. I have download sample code for chat 2.0 and i have replace app id, auth secret and auth key in my sample app along with new user login and password but creating session it returns base Unexpected signature. what could be the reason? Either quide me to logout already login user using 1.2 sdk or help me with this.

devloper64 commented 6 years ago

no option in admin panel . like (Home -> app name -> Settings)..please help me

tatanka987 commented 6 years ago

Sorry, it is my mistake, you need path Home -> app name -> Users -> Users Settings (see screenshot)

devloper64 commented 6 years ago

Thank you..

aces2808 commented 6 years ago

Hi,

I'm currently using a different approach in integrating to QB, I have an API gateway to control the sequence of all of my request, currently I was able to create a session token with the following the example:

HMAC-SHA application_id=22&auth_key=wJHd4cQSxpQGWx5&nonce=33432&timestamp=1326966962

As for the user token, I followed the format application_id=22&auth_key=wJHd4cQSxpQGWx5&nonce=33432&timestamp=1326966962&user[login]=amigo30&user[password]=amigo30pass

And I keep on getting the unexpected signature. I'm using java

here is the sequence I made:

User endpoint : https://[url]/session.json application_id=X&auth_key=XXXXXXXX&nonce=70513&timestamp=1509694081&user[login]=User1&user[password]=pass1&signature=530d1bc856dc436482cc90ece7309cde4678e1ea {Content-Type=[application/json], QuickBlox-REST-API-Version=[0.1.1]} {"application_id":"X","auth_key":"XXXXXXXX","timestamp":"1509694081","nonce":"57475","signature":"530d1bc856dc436482cc90ece7309cde4678e1ea","user":{"login":"User1","password":"pass1"}} {"errors":{"base":["Unexpected signature"]}}

Do I have to encode the parameters for user and password?

sinhavicky4 commented 6 years ago

Getting below error.Help would be appriciated

D/Request build:: application_id=65665&auth_key=EeRgCNntPjqEyWD&nonce=828652578&timestamp=1520329519 03-06 15:15:19.216 22049-24229/com.quickblox.q_municate D/QBASDK: ========================================================= === REQUEST ==== 92051121-5e66-43b9-947b-fc11979901e3 === REQUEST POST https://api.quickblox.com/session.json HEADERS QuickBlox-REST-API-Version=0.1.1 QB-SDK=Android 3.5.2 PARAMETERS application_id=65665 auth_key=EeRgCNntPjqEyWD nonce=828652578 timestamp=1520329519 signature=f61a2e60f8cba32a753df431c9b6c3c3c145ff57 INLINE POST https://api.quickblox.com/session.json?application_id=65665&auth_key=EeRgCNntPjqEyWD&nonce=828652578&timestamp=1520329519&signature=f61a2e60f8cba32a753df431c9b6c3c3c145ff57 03-06 15:15:19.217 22049-22049/com.quickblox.q_municate D/BaseActivity: onAttachFragment 03-06 15:15:20.513 22049-24229/com.quickblox.q_municate D/QBASDK: *** * RESPONSE 92051121-5e66-43b9-947b-fc11979901e3 STATUS : 422 HEADERS X-Runtime=0.007544 Cache-Control=no-cache QuickBlox-REST-API-Version=0.1.1 X-Android-Selected-Protocol=http/1.1 Set-Cookie=_mkra_ctxt=021a3e545e6107adcc006d62de27e8ad--422; path=/; max-age=5; HttpOnly; secure Status=422 Unprocessable Entity X-Request-Id=bc89dd8a-b51d-4aa2-9fd8-63a5fadf9a78 X-Android-Response-Source=NETWORK 422 Connection=Close X-Android-Sent-Millis=1520329519834 Content-Type=application/json; charset=utf-8 Date=Tue, 06 Mar 2018 09:45:21 GMT X-Content-Type-Options=nosniff Server=openresty/1.9.15.1 Content-Length=44 Strict-Transport-Security=max-age=31536000 X-XSS-Protection=1; mode=block X-Frame-Options=SAMEORIGIN X-Android-Received-Millis=1520329520511 Access-Control-Allow-Origin=* BODY '{"errors":{"base":["Unexpected signature"]}}' 03-06 15:15:20.514 22049-24229/com.quickblox.q_municate D/QBASDK: base Unexpected signature

tatanka987 commented 6 years ago

@sinhavicky4, please check time settings on your device, they should be set to Automatic

sinhavicky4 commented 6 years ago

Its set to automatic

On 07-Mar-2018 2:07 PM, "tatanka987" notifications@github.com wrote:

@sinhavicky4 https://github.com/sinhavicky4, please check time settings on your device, they should be set to Automatic

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/QuickBlox/quickblox-android-sdk/issues/38#issuecomment-371063855, or mute the thread https://github.com/notifications/unsubscribe-auth/AGgM9Y_KNoxLbiO5nose3s_PPqrrKXuuks5tb5xTgaJpZM4C-Okg .

tatanka987 commented 6 years ago

please specify there time zone of your devise and check in your code auth_key and auth_secret

sinhavicky4 commented 6 years ago

Where I need to specify the time zone.Help would be appriacated.Tried finding for the time zone in code but can not found any

On Fri, Mar 9, 2018 at 2:13 PM, tatanka987 notifications@github.com wrote:

please specify there time zone of your devise and check in your code auth_key and auth_secret

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/QuickBlox/quickblox-android-sdk/issues/38#issuecomment-371749555, or mute the thread https://github.com/notifications/unsubscribe-auth/AGgM9QBQDQqamzeengmiOk4P8bIiEK6fks5tckClgaJpZM4C-Okg .

-- Priyanshu

sinhavicky4 commented 6 years ago

I can see below in BaseAuthActivity 03-23 20:28:11.534 1735-1735/com.quickblox.q_municate D/BaseAuthActivity: onActivityResult, result code = 456 03-23 20:28:11.535 1735-1735/com.quickblox.q_municate D/BaseAuthActivity: Login success priyansu -1 03-23 20:28:11.539 1735-1735/com.quickblox.q_municate D/BaseAuthActivity: Login success -1 03-23 20:28:11.572 1735-1735/com.quickblox.q_municate D/BaseAuthActivity: FirebaseAuthCallback onSuccess() 03-23 20:28:11.666 1735-1735/com.quickblox.q_municate D/BaseAuthActivity: appSharedHelper.getFirebaseProjectId() video-call-6be0a 03-23 20:28:13.709 1735-1735/com.quickblox.q_municate D/BaseAuthActivity: onError base Unexpected signaturecom.quickblox.core.exception.QBResponseException: base Unexpected signature

On Fri, Mar 23, 2018 at 7:54 PM, Priyanshu Singh sinhavicky4@gmail.com wrote:

Where I need to specify the time zone.Help would be appriacated.Tried finding for the time zone in code but can not found any

On Fri, Mar 9, 2018 at 2:13 PM, tatanka987 notifications@github.com wrote:

please specify there time zone of your devise and check in your code auth_key and auth_secret

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/QuickBlox/quickblox-android-sdk/issues/38#issuecomment-371749555, or mute the thread https://github.com/notifications/unsubscribe-auth/AGgM9QBQDQqamzeengmiOk4P8bIiEK6fks5tckClgaJpZM4C-Okg .

-- Priyanshu

-- Priyanshu

haris15 commented 6 years ago

09-04 14:50:00.676 2762-2762/com.miream.miream W/System.err: com.quickblox.core.exception.QBResponseException: base Unexpected signature 09-04 14:50:00.676 2762-2762/com.miream.miream W/System.err: at com.quickblox.core.parser.QBJsonParser.parse(Unknown Source) 09-04 14:50:00.677 2762-2762/com.miream.miream W/System.err: at com.quickblox.auth.session.Query$VersionEntityCallback.completedWithResponse(Unknown Source) 09-04 14:50:00.677 2762-2762/com.miream.miream W/System.err: at com.quickblox.auth.session.Query.completedWithResponse(Unknown Source) 09-04 14:50:00.677 2762-2762/com.miream.miream W/System.err: at com.quickblox.core.server.HttpRequestRunnable$1.handleMessage(Unknown Source) 09-04 14:50:00.677 2762-2762/com.miream.miream W/System.err: at android.os.Handler.dispatchMessage(Handler.java:102) 09-04 14:50:00.677 2762-2762/com.miream.miream W/System.err: at android.os.Looper.loop(Looper.java:163) 09-04 14:50:00.677 2762-2762/com.miream.miream W/System.err: at android.app.ActivityThread.main(ActivityThread.java:6239) 09-04 14:50:00.677 2762-2762/com.miream.miream W/System.err: at java.lang.reflect.Method.invoke(Native Method) 09-04 14:50:00.677 2762-2762/com.miream.miream W/System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904) 09-04 14:50:00.677 2762-2762/com.miream.miream W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:794)

please help me to solve this