quickblox-android-sdk icon indicating copy to clipboard operation
quickblox-android-sdk copied to clipboard

Push subscription fails (422 “Client identification sequence is not valid”) — blocks background/terminated A/V calling

Open Kumar-Evoke-Github opened this issue 2 months ago • 2 comments

Hello QuickBlox Support Team,

We’re unable to create a push subscription on Android; this blocks incoming audio/video calls from ringing when the app is in background or terminated state.

Key note: We tested both your public Sample Android Chat project (from GitHub) and our own application — neither creates a subscription.

Error (from both apps) POST https://api.quickblox.com/subscriptions.json Status: 422 Unprocessable Entity Body: {"errors":{"base":["Client identification sequence is not valid."]}}

Recent request/response example (from our app):

Request

Endpoint: POST https://api.quickblox.com/subscriptions.json

Headers:

QuickBlox-REST-API-Version: 0.1.1 QB-SDK: Android 4.3.3 QB-Token: Content-Type: application/x-www-form-urlencoded; charset=UTF-8

Params:

notification_channels=gcm push_token[client_identification_sequence]=<FCM registration token from FirebaseMessaging.getInstance().token> device[udid]=139217073_ffffffff-c07b-44d8-0001-9f8b79428ae9 device[platform]=android push_token[environment]=production

Response

Status: 422

Body:

{"errors":{"base":["Client identification sequence is not valid."]}}

(We can attach full raw logs if helpful.)

What we’ve verified

FCM token used is the actual registration token (long string from FirebaseMessaging.getInstance().token), not Sender ID/App ID.

Firebase configured correctly with google-services.json; package name matches applicationId.

User is logged in (valid QB-Token present) before subscription call.

Environment matches (we tried both DEVELOPMENT and PRODUCTION).

Reproduces on QuickBlox sample app and our app (multiple devices).

Impact / Request

We need QuickBlox push subscriptions working so that WebRTC audio/video calls will ring and wake the app in background and terminated states (high-priority FCM data push).

Please help identify why FCM tokens are being rejected with “Client identification sequence is not valid.”

Questions / Things to check on your side

Is there any server-side configuration required on our QuickBlox app (e.g., Firebase Server Key (Legacy) / FCM credentials) that could cause this error if missing or mismatched?

Does the Android SDK 4.3.3 require any specific FCM mode (Legacy HTTP vs HTTP v1) or payload format for subscriptions?

Any known issues recently affecting /subscriptions.json validation for Android?

App details

QuickBlox App ID: [your-app-id]

QB SDK: Android 4.3.3

Android versions / devices tested: [list a few]

Package name(s): [com.your.app] (and the sample app’s)

Happy to provide:

Full request/response logs (headers & bodies, redacted as needed)

AndroidManifest.xml push meta-data section

Firebase project identifiers (redacted)

Test FCM tokens (redacted)

Thanks in advance for your help—this is currently blocking background/terminated A/V call reliability for our release.

Kumar-Evoke-Github avatar Sep 08 '25 12:09 Kumar-Evoke-Github

Hi @Kumar-Evoke-Github , I have received your query, kindly provide the complete request/response body. You may use my email address ([email protected]) to communicate sensitive data.

mohitquickblox avatar Sep 09 '25 16:09 mohitquickblox

Hi Mohit,

============================ QB-API-REQUEST ============================
                                                ID: ad774504-1db8-4e36-ae37-6ebdbba31ef9
                                                URL: https://api.quickblox.com/account_settings.json
                                                CONTENT TYPE: application/x-www-form-urlencoded; charset=UTF-8
                                                HEADERS:
                                                    QB-Account-Key=KV687WcL5i...... 
                                                PARAMETERS:
                                                
                                                INLINE:
                                                    https://api.quickblox.com/account_settings.json
                                                 
													Logging trace metric: _st_MainActivity (duration: 28817.204ms). In a minute, visit the Firebase console to view your data: https://console.firebase.google.com/project/sc-mobile-82a6a/performance/app/android:com.starchase.mapping.mappingsc.dev/troubleshooting/trace/SCREEN_TRACE/_st_MainActivity?utm_source=perf-android-sdk&utm_medium=android-ide
													Logging network request trace: https://api.quickblox.com/account_settings.json (responseCode: 200, responseTime: 1097.498ms)
												D  ============================ QB-API-RESPONSE ===========================
                                                ID: ad774504-1db8-4e36-ae37 
                                                URL: https://api.quickblox.com/account_settings.json
                                                CONTENT TYPE: application/json; charset=utf-8
                                                STATUS CODE: 200
                                                HEADERS:
                                                    Access-Control-Allow-Origin=*
                                                    Cache-Control=max-age=0, private, must-revalidate
                                                    Connection=close
                                                    Content-Length=124
                                                    Content-Security-Policy=default-src 'self' https:; font-src 'self' https: data:; img-src 'self' https: data: www.google-analytics.com; object-src 'none'; script-src 'self' https: 'unsafe-eval' 'unsafe-inline' www.google-analytics.com; style-src 'self' https: 'unsafe-inline'
                                                    Content-Type=application/json; charset=utf-8
                                                    Date=Wed, 03 Sep 2025 10:43:13 GMT
                                                    ETag=W/"e545561202e48f08eb 8ff"
                                                    QuickBlox-REST-API-Version=0.1.1
                                                    Referrer-Policy=strict-origin-when-cross-origin
                                                    Server=QuickBlox
                                                    Strict-Transport-Security=max-age=3153 ; includeSubDomains
                                                    X-Android-Received-Millis=17569
                                                    X-Android-Response-Source=NETWORK 200
                                                    X-Android-Selected-Protocol=http/1.1
                                                    X-Android-Sent-Millis=1756842
                                                    X-Content-Type-Options=nosniff
                                                    X-Download-Options=noopen
                                                    X-Frame-Options=SAMEORIGIN
                                                    X-Permitted-Cross-Domain-Policies=none
                                                    X-Request-Id=ac32a577-a0e7........
                                                    X-Runtime=0.007180
                                                    X-XSS-Protection=1; mode=block
                                                BODY:
                                                    '{"api_endpoint":"https://api.quickblox.com","chat_endpoint":"chat.quickblox.com","turnserver_endpoint":"turn.quickblox.com"}'
                                                 
												Retrieved custom endpoints. ApiEndpoint: https://api.quickblox.com, ChatEndpoint: chat.quickblox.com
													============================ QB-API-REQUEST ============================
                                                ID: 44f8cb3d-e9ce-4bac-a846-........
                                                URL: https://api.quickblox.com/session.json
                                                CONTENT TYPE: application/x-www-form-urlencoded; charset=UTF-8
                                                HEADERS:
                                                    QuickBlox-REST-API-Version=0.1.1
                                                    QB-SDK=Android 4.3.3
                                                PARAMETERS:
                                                    application_id=99999...
                                                    auth_key=PUPmQF....
                                                    nonce=1188..
                                                    timestamp=17568...
                                                    signature=5fc92b40a727c07db.......
                                                INLINE:
                                                    https://api.quickblox.com/session.json?application_id=98989&auth_key=PUPm9999&nonce=199&timestamp=17599996193&signature=5fc92b40a727c07db0e0968dc9999
                                                 
											Logging network request trace: https://api.quickblox.com/session.json (responseCode: 201, responseTime: 778.718ms)
													============================ QB-API-RESPONSE ===========================
                                                ID: 44f8cb3d-e9ce-4bac-a.......
                                                URL: https://api.quickblox.com/session.json
                                                CONTENT TYPE: application/json; charset=utf-8
                                                STATUS CODE: 201
                                                HEADERS:
                                                    access-control-allow-credentials=true
                                                    access-control-allow-origin=*
                                                    access-control-expose-headers=QB-Token-ExpirationDate
                                                    cache-control=max-age=0, private, must-revalidate
                                                    Connection=close
                                                    Content-Length=409
                                                    Content-Type=application/json; charset=utf-8
                                                    Date=Wed, 03 Sep 2025 10:43:14 GMT
                                                    QB-Token-ExpirationDate=2025-09-03 12:43:14 UTC
                                                    Server=QuickBlox
                                                    Strict-Transport-Security=max-age=31536000; includeSubDomains
                                                    X-Android-Received-Millis=17568961...
                                                    X-Android-Response-Source=NETWORK 201
                                                    X-Android-Selected-Protocol=http/1.1
                                                    X-Android-Sent-Millis=1756....
                                                    x-request-id=GGG_x8zNtDb3cqGpINCB
                                                BODY:
                                                    '{"session":{"_id":"0","application_id":96...,"created_at":"2025-09-03T10:43:14Z","id":0,"nonce":"118..058","token":"................eyJhY2Nlc3NfdHlwZSI6ImFwcGxpY2F0aW9uIiwiYXBwbGljYXRpb25faWQiOjk2MjE5LCJpYXQiOjE3NTY4OTYxOTQ1MTg2NTB9.bVui-qfHVDjVM_ST-5MpHXXJF18oCsjhMgTBmfeBUb-HQucLhtzaZyaGmcUNliPISZVtGuCC6bnwz2wx6UJ9fA","ts":1756896193,"updated_at":"2025-09-03T10:43:14Z","user_id":0}}'
                                                 
													============================ QB-API-REQUEST ============================
                                                ID: a2159667-6437-4e78-9363-8.
                                                URL: https://api.quickblox.com/login.json
                                                CONTENT TYPE: application/x-www-form-urlencoded; charset=UTF-8
                                                HEADERS:
                                                    QuickBlox-REST-API-Version=0.1.1
                                                    QB-SDK=Android 4.3.3
                                                    QB-Token=eyJhbGciOiJIUzUxMiIsIpY2F0aW9uIiwiYXBwbGljYXRpb25faWQiOjk2MjE5LCJpYXQiOjE3NTY4OTYxOTQ1MTg2NTB9.bVui-qfHVDjVM_ST-5MpHXXJF18oCsjhMgTBmfeBUb-HQucLhtzaZyaGmcUNliPISZVtGuCC6bnwz2wx6UJ9fA
                                                PARAMETERS:
                                                    login=KUMAR-EVO
                                                    password=Sta.....
                                                INLINE:
                                                    https://api.quickblox.com/login.json?login=KUMAR-EVO&password=Sta.......
												============================ QB-API-RESPONSE ===========================
                                                ID: a2159667-6437-4e78-936
                                                URL: https://api.quickblox.com/login.json
                                                CONTENT TYPE: application/json; charset=utf-8
                                                STATUS CODE: 202
                                                HEADERS:
                                                    access-control-allow-credentials=true
                                                    access-control-allow-origin=*
                                                    access-control-expose-headers=QB-Token-ExpirationDate
                                                    cache-control=max-age=0, private, must-revalidate
                                                    Connection=close
                                                    Content-Length=404
                                                    Content-Type=application/json; charset=utf-8
                                                    Date=Wed, 03 Sep 2025 10:43:16 GMT
                                                    QB-Token-ExpirationDate=2025-09-03 12:43:14 UTC
                                                    Server=QuickBlox
                                                    Strict-Transport-Security=max-age=31536000; includeSubDomains
                                                    X-Android-Received-Millis=1756
                                                    X-Android-Response-Source=NETWORK 202
                                                    X-Android-Selected-Protocol=http/1.1
                                                    X-Android-Sent-Millis=175
                                                    x-request-id=GGG_yC57
                                                BODY:
                                                    '{"user":{"age_over16":false,"blob_id":null,"created_at":"2023-12-12T00:15:10Z","custom_data":null,"email":"[email protected]","external_user_id":null,"facebook_id":null,"full_name":"KUMAR-EVOKE","id":0000,"last_request_at":"2025-09-03T10:43:16Z","login":"KUMAR-EVO","parents_contacts":"","phone":null,"twitter_id":null,"updated_at":"2025-09-03T10:43:16Z","user_tags":"","website":null}}'
                                                 
												Logging network request trace: https://api.quickblox.com/login.json (responseCode: 202, responseTime: 618.086ms)
												============================ QB-API-REQUEST ============================
                                                ID: 54a735ba-886e-4002-914c-344e
                                                URL: https://api.quickblox.com/users/139217073.json
                                                CONTENT TYPE: application/x-www-form-urlencoded; charset=UTF-8
                                                HEADERS:
                                                    QuickBlox-REST-API-Version=0.1.1
                                                    QB-SDK=Android 4.3.3
                                                    QB-Token=mFwcGxpY2F0aW9uIiwiY 
                                                PARAMETERS:
                                                    user[login]=KUMAR-EVO
                                                    user[tag_list]=
                                                INLINE:
                                                    https://api.quickblox.com/users/139.json?user[login]=KUMAR-EVO&user[tag_list]=
                                                 
													============================ QB-API-REQUEST ============================
                                                ID: 285d75e0-984e-4888-bbdd-7a
                                                URL: https://api.quickblox.com/subscriptions.json
                                                CONTENT TYPE: application/x-www-form-urlencoded; charset=UTF-8
                                                HEADERS:
                                                    QuickBlox-REST-API-Version=0.1.1
                                                    QB-SDK=Android 4.3.3
                                                    QB-Token=OTQ1MTg2NT 
                                                PARAMETERS:
                                                    notification_channels=gcm
                                                    push_token[client_identification_sequence]=cuaKtcO5TWG 
                                                    device[udid]=139217073_ffffffff-
                                                    device[platform]=android
                                                    push_token[environment]=production
                                                INLINE:
                                                    https://api.quickblox.com/subscriptions.json?notification_channels=gcm&push_token[client_identification_sequence]=cgXVw0&device[udid]=7942 &device[platform]=android&push_token[environment]=production

============================ QB-API-RESPONSE =========================== ID: 54a735ba-886e-4002-914 URL: https://api.quickblox.com/users/139217073.json CONTENT TYPE: application/json; charset=utf-8 STATUS CODE: 200 HEADERS: Access-Control-Allow-Origin=* Access-Control-Expose-Headers=QB-Token-ExpirationDate Cache-Control=max-age=0, private, must-revalidate Connection=close Content-Length=388 Content-Security-Policy=default-src 'self' https:; font-src 'self' https: data:; img-src 'self' https: data: www.google-analytics.com; object-src 'none'; script-src 'self' https: 'unsafe-eval' 'unsafe-inline' www.google-analytics.com; style-src 'self' https: 'unsafe-inline' Content-Type=application/json; charset=utf-8 Date=Wed, 03 Sep 2025 10:43:17 GMT ETag=W/"4eb3a74928eafdcbabacd72c8acba2b6" QB-Token-ExpirationDate=2025-09-03 12:43:17 UTC QuickBlox-REST-API-Version=0.1.1 Referrer-Policy=strict-origin-when-cross-origin Server=QuickBlox Strict-Transport-Security=max-age=31536000; includeSubDomains X-Android-Received-Millis=1756896197250 X-Android-Response-Source=NETWORK 200 X-Android-Selected-Protocol=http/1.1 X-Android-Sent-Millis=1756896196641 X-Content-Type-Options=nosniff X-Download-Options=noopen X-Frame-Options=SAMEORIGIN X-Permitted-Cross-Domain-Policies=none X-Request-Id=2843aa16-0009-420e-be63-d3e9314a25a2 X-Runtime=0.060432 X-XSS-Protection=1; mode=block BODY: '{"user":{"login":"KUMAR-EVO","email":"[email protected]","full_name":"KUMAR-EVO","website":null,"facebook_id":null,"custom_data":null,"id":000,"phone":null,"created_at":"2023-12-12T00:15:10Z","updated_at":"2025-09-03T10:43:17Z","last_request_at":"2025-09-03T10:43:17Z","external_user_id":null,"blob_id":null,"age_over16":false,"parents_contacts":"","user_tags":null}}'

													Logging network request trace: https://api.quickblox.com/users/139217073.json (responseCode: 200, responseTime: 613.136ms)
													============================ QB-API-RESPONSE ===========================
                                                ID: 285d75e0-984e-4888-bb
                                                URL: https://api.quickblox.com/subscriptions.json
                                                CONTENT TYPE: application/json; charset=utf-8
                                                STATUS CODE: 422
                                                HEADERS:
                                                    Access-Control-Allow-Origin=*
                                                    Access-Control-Expose-Headers=QB-Token-ExpirationDate
                                                    Cache-Control=no-cache
                                                    Connection=close
                                                    Content-Length=68
                                                    Content-Security-Policy=default-src 'self' https:; font-src 'self' https: data:; img-src 'self' https: data: www.google-analytics.com; object-src 'none'; script-src 'self' https: 'unsafe-eval' 'unsafe-inline' www.google-analytics.com; style-src 'self' https: 'unsafe-inline'
                                                    Content-Type=application/json; charset=utf-8
                                                    Date=Wed, 03 Sep 2025 10:43:17 GMT
                                                    QB-Token-ExpirationDate=2025-09-03 12:43:17 UTC
                                                    QuickBlox-REST-API-Version=0.1.1
                                                    Referrer-Policy=strict-origin-when-cross-origin
                                                    Server=QuickBlox
                                                    Strict-Transport-Security=max-age=31536000; includeSubDomains
                                                    X-Android-Received-Millis=1756896197556
                                                    X-Android-Response-Source=NETWORK 422
                                                    X-Android-Selected-Protocol=http/1.1
                                                    X-Android-Sent-Millis=1756896196739
                                                    X-Content-Type-Options=nosniff
                                                    X-Download-Options=noopen
                                                    X-Frame-Options=SAMEORIGIN
                                                    X-Permitted-Cross-Domain-Policies=none
                                                    X-Request-Id=fc3b5f26-ddf1-412d-be1d-78ad31f384c3
                                                    X-Runtime=0.142483
                                                    X-XSS-Protection=1; mode=block
                                                BODY:
                                                    '{"errors":{"base":["Client identification sequence is not valid."]}}'

16:13:17.574 Firebas...ormance com...pingsc.dev I Logging network request trace: https://api.quickblox.com/subscriptions.json (responseCode: 422, responseTime: 820.045ms) 16:13:17.600 QBASDK com...pingsc.dev D ============================ QB-API-REQUEST ============================ ID: 3eff00ef-ffe1-4226-b684 URL: https://api.quickblox.com/subscriptions.json CONTENT TYPE: application/x-www-form-urlencoded; charset=UTF-8 HEADERS: QuickBlox-REST-API-Version=0.1.1 QB-SDK=Android 4.3.3 QB-Token=g2NTB9.bVu PARAMETERS: notification_channels=gcm push_token[client_identification_sequence]=...........uerDCbMNrKSnf_DqU5F device[udid]=139217073_ffffffff......... device[platform]=android push_token[environment]=production INLINE: https://api.quickblox.com/subscriptions.json?notification_channels=gcm&push_token[client_identification_sequence]=/...... 7t667&device[udid]=7b-44d8-0001-9f8b79428ae9&device[platform]=android&push_token[environment]=production

16:13:18.770 TRuntim...Backend com...pingsc.dev I Making request to: https://firebaselogging-pa.googleapis.com/v1/firelog/legacy/batchlog 16:13:19.009 Firebas...ormance com...pingsc.dev I Logging network request trace: https://api.quickblox.com/subscriptions.json (responseCode: 422, responseTime: 511.959ms) 16:13:19.011 QBASDK com...pingsc.dev D ============================ QB-API-RESPONSE =========================== ID: 3eff00ef-ffe1-4226-b68 URL: https://api.quickblox.com/subscriptions.json CONTENT TYPE: application/json; charset=utf-8 STATUS CODE: 422 HEADERS: Access-Control-Allow-Origin=* Access-Control-Expose-Headers=QB-Token-ExpirationDate Cache-Control=no-cache Connection=close Content-Length=68 Content-Security-Policy=default-src 'self' https:; font-src 'self' https: data:; img-src 'self' https: data: www.google-analytics.com; object-src 'none'; script-src 'self' https: 'unsafe-eval' 'unsafe-inline' www.google-analytics.com; style-src 'self' https: 'unsafe-inline' Content-Type=application/json; charset=utf-8 Date=Wed, 03 Sep 2025 10:43:19 GMT QB-Token-ExpirationDate=2025-09-03 12:43:18 UTC QuickBlox-REST-API-Version=0.1.1 Referrer-Policy=strict-origin-when-cross-origin Server=QuickBlox Strict-Transport-Security=max-age=31536000; includeSubDomains X-Android-Received-Millis=1756896198988 X-Android-Response-Source=NETWORK 422 X-Android-Selected-Protocol=http/1.1 X-Android-Sent-Millis=1756896198479 X-Content-Type-Options=nosniff X-Download-Options=noopen X-Frame-Options=SAMEORIGIN X-Permitted-Cross-Domain-Policies=none X-Request-Id=fd3c378a-4d X-Runtime=0.169400 X-XSS-Protection=1; mode=block BODY: '{"errors":{"base":["Client identification sequence is not valid."]}}'

I’m getting the error {"errors":{"base":["Client identification sequence is not valid."]}}, and the subscriptions.json API keeps getting called continuously in the background while the app is running.

Note: You can run the sample project "chat-kotlin" from GitHub and observe the same issues. It is not creating subscriptions by default, and even when done manually, it is not working with version 2.3.3.

Kumar-Evoke-Github avatar Sep 10 '25 13:09 Kumar-Evoke-Github