5 Replies Latest reply on Dec 17, 2013 10:20 AM by Lars Burgess

    Rhoconnect push error - Device failed during token check.

    Alpesh Budhia

      We're running Rhoconnect 4.0 and are using the rhoconnect push service.

       

      We've created a rhodes/rhoelements app running on android.

       

      Everytime we restart the device, the push service on the device errors with 'Device failed during token check (reg state) - see device administator (###) ###-#### (admin@my.company.com)'. Screenshot_2013-12-12-11-07-08.png

      It's fine after getting this error. We also get the error intermittenly.

       

      We're are using the default rhoconnect push server settings as below.

      ## Configuration settings                                                                                                                              

      { debugLevel: 3,                                                                                                                                       

        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:                                                                                                                                               

         { domain: null,                                                                                                                                     

           _events: { free: [Function] },                                                                                                                    

           _maxListeners: 10,                                                                                                                                

           options: {},                                                                                                                                      

           requests: {},                                                                                                                                     

           sockets: {},                                                                                                                                      

           maxSockets: 5,                                                                                                                                    

           createConnection: [Function],                                                                                                                     

           freeSocketQueue: [],                                                                                                                              

           addRequest: [Function] } }   

       

       

      Any ideas what might be causing this?

        • Re: Rhoconnect push error - Device failed during token check.

          This means that the service failed to obtain a push token from the rhoconnect push server.  Are you seeing this device properly registered in the rhoconnect web console?

            • Re: Rhoconnect push error - Device failed during token check.
              Alpesh Budhia

              Yes the device has registered correctly. i.e device_pin, phone_id e.t.c are all set.

               

              Why do you think we would get this every time after restarting the device? Does the push service try a verify/check the token on a restart?

               

              We've also had the message 3-4 time during the day. Does the push service check the token on a regular basis? if so how often?

                • Re: Rhoconnect push error - Device failed during token check.

                  Why do you think we would get this every time after restarting the device? Does the push service try a verify/check the token on a restart?

                   

                  It's interesting, could be a timing issue where it tries to connect to the push server before network connection is available?  We haven't seen anything like this in our automated tests that do a device reboot though so I can't say for sure.

                   

                   

                  We've also had the message 3-4 time during the day. Does the push service check the token on a regular basis? if so how often?

                   

                  Yes, you can think of the token like a session cookie.  It has a default timeout of 2592000 seconds (30 days).  Are you resetting the push server by any chance?  Note that resetting your rhoconnect server (if it's connected to same redis instance as your push server) will also reset the push server.  They both share the same redis db for persisting data by default if everything's on the same machine.

                   

                  -Lars