Push Messages no longer working on Rhodes 4.0

// Expert user has replied.
S Steve Harman 3 years 6 months ago
1 3 0

Hi,

We're in need of some help getting Push Messaging working again in 4.0.

We have migrated our app from 2.2 to 4.0. This application had previously had push sync working ok via rho-connect-push.
Updated RhoConnect to 4.0.0 and verified
Updated RhoPush to 1.2.2 and verified
Ensured test devices have uninstalled and reinstalled the rhoconnect-push-service.apk (although still appears to be version 1.0?)

Discovered the new settings changes in mobile app are required so updated (replacing old format - add to migration guide?)
Push.rhoconnect.pushAppName = 'pdc1'
Push.rhoconnect.pushServer = 'http://x.x.x.x:8675'

Application is logging on, connecting and manually syncing ok, however no push messages work, including a manual push from the RhoConnect Console.
We are seeing the device register with the push service. All appnames and rhoconnect side service identifiers appear ok.

Log from RHO PUSH performing only a logon, then a manual ping from Rho Console.
C:\Users\mdn_admin\Desktop\Services & Applications>rhoconnect-push -d 10## Configuration settings{ debugLevel: 10,  httpSecure: 'n',  certificateAuthorityFile: undefined,  appAuthHost: 'localhost',  appAuthPort: '9292',  appAuthUrl: '/rc/v1/system/rps_login',  userAuthHost: 'localhost',  userAuthPort: '9292',  userAuthUrl: '/rc/v1/app/rps_login',  ansServerPort: '8675',  socketPoolSize: 5,  ansResponseTimeout: 300000,  authCredentialCacheEnabled: 'y',  authCredentialCacheSize: 10,  authCredentialLifetime: 60000,  registrationTimeout: 2592000,  clearDataBase: 'n',  redisToGoUrl: 'redis://localhost:6379' }&&&& userAuthOptions : { host: 'localhost',  path: '/rc/v1/app/rps_login',  port: '9292',  method: 'GET',  headers: { connection: 'keep-alive', 'content-type': 'application/json' },  agent:   { options: {},     requests: {},     sockets: {},     maxSockets: 5,     _events: { free: [Function] },     createConnection: [Function],     freeSocketQueue: [],     addRequest: [Function] } }## ANS server: Listening on port 8675RhoConnect push server started...## ANS server: New connection from 192.168.5.225
***** 0 POST /instanceId {}## handleCreateInstanceID header(s) {"connection":"keep-alive","authorization":"Basic ZGV2eXl5OnA=","cookie":"rhoconnect_session=BAh7CEkiD3Nlc3Npb25faWQGOgZFRiJFYThmOWFmMmNmOGEzMmMzN2I1Njdj%0ANjFkNTY2M2Y0ZTE0NTM4OTU3ZjRlNWE4MjhjNmE4N2ViMzMyMTdkODIzZkki%0ACmxvZ2luBjsARkkiC2Rldnl5eQY7AFRJIg1hcHBfbmFtZQY7AEZJIhBhcHBs%0AaWNhdGlvbgY7AEY%3D%0A--14b45597de53f956586c12b8ab6040d72385f4e6;","content-length":"0","host":"192.168.5.131:8675"}## Decoded credentials devyyy:p## Generated instanceID for devyyy = db4ed759-3377-4163-9221-4c64507c07d4:0bafaef56e6ac1a513fb9404e1134a52## Created new instance ID## InstanceID db4ed759-3377-4163-9221-4c64507c07d4:0bafaef56e6ac1a513fb9404e1134a52## ANS server: New connection from 192.168.5.225
***** 1 GET /instanceId/db4ed759-3377-4163-9221-4c64507c07d4:0bafaef56e6ac1a513fb9404e1134a52## handleGetCookie header(s) {"connection":"keep-alive","authorization":"Basic ZGV2eXl5OnA=","cookie":"rhoconnect_session=BAh7CEkiD3Nlc3Npb25faWQGOgZFRiJFYThmOWFmMmNmOGEzMmMzN2I1Njdj%0ANjFkNTY2M2Y0ZTE0NTM4OTU3ZjRlNWE4MjhjNmE4N2ViMzMyMTdkODIzZkki%0ACmxvZ2luBjsARkkiC2Rldnl5eQY7AFRJIg1hcHBfbmFtZQY7AEZJIhBhcHBs%0AaWNhdGlvbgY7AEY%3D%0A--14b45597de53f956586c12b8ab6040d72385f4e6;","host":"192.168.5.131:8675"}## Decoded credentials devyyy:p## Generated cookie for db4ed759-3377-4163-9221-4c64507c07d4:0bafaef56e6ac1a513fb9404e1134a52 = c1b50b96-1527-4605-862b-698bd4812a68:b1c7381d19f907b007240cb290870c46## Created new cookie## Cookie c1b50b96-1527-4605-862b-698bd4812a68:b1c7381d19f907b007240cb290870c46## ANS server: New connection from 192.168.5.225
***** 2 PUT /registrations/db4ed759-3377-4163-9221-4c64507c07d4:0bafaef56e6ac1a513fb9404e1134a52/devyyy/pdc1## handleRegistration header(s){"connection":"keep-alive","authorization":"Basic ZGV2eXl5OnA=","cookie":"instance=c1b50b96-1527-4605-862b-698bd4812a68:b1c7381d19f907b007240cb290870c46, rhoconnect_session=BAh7CEkiD3Nlc3Npb25faWQGOgZFRiJFYThmOWFmMmNmOGEzMmMzN2I1Njdj%0ANjFkNTY2M2Y0ZTE0NTM4OTU3ZjRlNWE4MjhjNmE4N2ViMzMyMTdkODIzZkki%0ACmxvZ2luBjsARkkiC2Rldnl5eQY7AFRJIg1hcHBfbmFtZQY7AEZJIhBhcHBs%0AaWNhdGlvbgY7AEY%3D%0A--14b45597de53f956586c12b8ab6040d72385f4e6;","content-length":"0","host":"192.168.5.131:8675"}## Decoded credentials devyyy:p## InstanceID-appname registration not found - generating new token## instanceID db4ed759-3377-4163-9221-4c64507c07d4:0bafaef56e6ac1a513fb9404e1134a52 appname pdc1## Generated token for pdc1 = 3425b312-6823-4065-8f4f-29435c716044:555c689c066ae1a1f08c624a032560ff## Multi reply to create a registration OK,1,OK,1,1,1## Created registration for instanceID db4ed759-3377-4163-9221-4c64507c07d4:0bafaef56e6ac1a513fb9404e1134a52 and token 3425b312-6823-4065-8f4f-29435c716044:555c689c066ae1a1f08c624a032560ff
## STATE OF TOKEN->INSTANCEID mapping db4ed759-3377-4163-9221-4c64507c07d4:0bafaef56e6ac1a513fb9404e1134a52## Token / InstanceID## 3425b312-6823-4065-8f4f-29435c716044:555c689c066ae1a1f08c624a032560ffdb4ed759-3377-4163-9221-4c64507c07d4:0bafaef56e6ac1a513fb9404e1134a52
## STATE OF INSTANCEID->TOKEN:APPNAME mapping db4ed759-3377-4163-9221-4c64507c07d4:0bafaef56e6ac1a513fb9404e1134a52## InstanceID                                                           TOKEN:APPNAME## db4ed759-3377-4163-9221-4c64507c07d4:0bafaef56e6ac1a513fb9404e1134a52   {"token":"3425b312-6823-4065-8f4f-29435c716044:555c689c066ae1a1f08c624a032560ff","appname":"pdc1"}## ANS server: New connection from 192.168.5.225
***** 3 GET /nextMessage/db4ed759-3377-4163-9221-4c64507c07d4:0bafaef56e6ac1a513fb9404e1134a52## handleNextMessage header(s): {"connection":"keep-alive","cookie":"instance=c1b50b96-1527-4605-862b-698bd4812a68:b1c7381d19f907b007240cb290870c46","host":"192.168.5.131:8675"}## Remove messages from queue with messageIDINSTANCEID mapping db4ed759-3377-4163-9221-4c64507c07d4:0bafaef56e6ac1a513fb9404e1134a52## Token / InstanceID## 3425b312-6823-4065-8f4f-29435c716044:555c689c066ae1a1f08c624a032560ffdb4ed759-3377-4163-9221-4c64507c07d4:0bafaef56e6ac1a513fb9404e1134a52
## STATE OF INSTANCEID->TOKEN:APPNAME mapping db4ed759-3377-4163-9221-4c64507c07d4:0bafaef56e6ac1a513fb9404e1134a52## InstanceID                                                           TOKEN:APPNAME## db4ed759-3377-4163-9221-4c64507c07d4:0bafaef56e6ac1a513fb9404e1134a52   {"token":"3425b312-6823-4065-8f4f-29435c716044:555c689c066ae1a1f08c624a032560ff","appname":"pdc1"}## ANS server: New connection from 127.0.0.1
***** 5 POST /messageQueue/3425b312-6823-4065-8f4f-29435c716044:555c689c066ae1a1f08c624a032560ff {"collapseId":1,"data":{"alert":"push message","sound":"welcome.mp3","vibrate":"2000","do_sync":["ServiceMessage"]}}## handleMessageQueue header(s): {"accept":"*/*; q=0.5, application/xml","accept-encoding":"gzip, deflate","content-type":"application/json","content-length":"116","user-agent":"Ruby","authorization":"Basic cGRjMTo=","host":"localhost:8675"}## message from app server { collapseId: 1,  data:   { alert: 'push message',     sound: 'welcome.mp3',     vibrate: '2000',     do_sync: [ 'ServiceMessage' ] } }## Decoded credentials pdc1:## CACHE - adding authenticated credential## CREDENTIAL CACHE:## pdc1: 1381387780920## About to add message to queue with token: 3425b312-6823-4065-8f4f-29435c716044:555c689c066ae1a1f08c624a032560ff and instanceID db4ed759-3377-4163-9221-4c64507c07d4:0bafaef56e6ac1a513fb9404e1134a52## A message DOES NOT exist on queue with collapseID 1## Multi reply to update expire times 1,1,0,0,1## Add message to queue, add collapseID to queue## Message added to queue {"id":1,"token":"3425b312-6823-4065-8f4f-29435c716044:555c689c066ae1a1f08c624a032560ff","data":{"alert":"push message","sound":"welcome.mp3","vibrate":"2000","do_sync":["ServiceMessage"]}}## Message successfully enqueued for later delivery## Client responded to with message {"id":1,"token":"3425b312-6823-4065-8f4f-29435c716044:555c689c066ae1a1f08c624a032560ff","data":{"alert":"push message","sound":"welcome.mp3","vibrate":"2000","do_sync":["ServiceMessage"]}}## Multi reply to add msg to queue 1,1
## STATE OF MESSAGE QUEUE db4ed759-3377-4163-9221-4c64507c07d4:0bafaef56e6ac1a513fb9404e1134a52## MessageID / Message## 1         {"id":1,"token":"3425b312-6823-4065-8f4f-29435c716044:555c689c066ae1a1f08c624a032560ff","data":{"alert":"push message","sound":"welcome.mp3","vibrate":"2000","do_sync":["ServiceMessage"]}}
## STATE OF COLLAPSE ID QUEUE db4ed759-3377-4163-9221-4c64507c07d4:0bafaef56e6ac1a513fb9404e1134a52## MessageID / CollapseID## 1         1:pdc1
***** 5 GET /nextMessage/db4ed759-3377-4163-9221-4c64507c07d4:0bafaef56e6ac1a513fb9404e1134a52?lastMessage=1## handleNextMessage header(s): {"connection":"keep-alive","cookie":"instance=c1b50b96-1527-4605-862b-698bd4812a68:b1c7381d19f907b007240cb290870c46","host":"192.168.5.131:8675"}## Remove messages from queue with messageID Connection already exists for http://192.168.5.131:8675
D/ANSApplication-ANS( 5633): @@@@@ WARNING - element not found @@@@@
I/ConnectionHandler-ANS( 5633): ===> Response code = 200 from http://192.168.5.131:8675

Please Register or Login to post a reply

3 Replies

S Steve Harman

An Update,

I've now noticed my devices getting periodic pop up messages saying:

"Asynchronous Notification"
Error - Device failed during token check (reg state) - see device administrator (###) ###-####. (admin@mycompany.com).

Not sure how to correct this?

Thanks
Steve

A Alexander Babichev

Your device is still sending old ANS token to push-server and it fails to check it(no token found for a current registration). You should cleanup old push data on device for push-service and reinstall both app push-service and app.   

B Bhakta Ranjan Satapathy

Hi,

To make rhoconnect push work on android, you need to follow below steps.
1: Install rhoconnect-push-service.apk in device.
2: Now build your application with following settings in your rhoconfig.txt and build.yml.
rhoconfig.txt:
Push.rhoconnect.pushAppName = 'pdc1'
Push.rhoconnect.pushServer = 'http://x.x.x.x:8675'
syncserver = 'http://x.x.x.x:9292'

Build.yml:
extensions:
- rhoconnect-push
- rhoconnect-client

3: Rhoconnect server side settings.yml should contains
:redis: localhost:6379
:syncserver: http://localhost:9292
: push_server: http://pdc1@localhost:8675/
:api_token: my-rhoconnect-token

Could you please re verify all these settings are correct in your application (client and server)?

And if everything okay then just try to uninstall your application and push service, then install
1st : rhoconnect-push-service.apk
2nd : your_app.apk

Thanks

CONTACT
Can’t find what you’re looking for?