3 Replies Latest reply on Apr 23, 2013 9:38 AM by Lars Burgess

    Rhoconnect push message from .net backend app: collapseid undefined

    Tahir Zamir

      Hi,

       

      I have a problem trying to initiate a sync on a device if it is initiated from a .net backend app. 

       

      The sync works fine if it is initiated from the web console. 

       

      The only difference that is immediately apparent is that push server output window shows that the collapseid is either missing or undefined. 

       

      I have included the output from both sync requests below.

       

      Can anyone shed any light on this.

       

      Regards,

       

      Tahir

       

      Output from the web console sync:-

       

      ***** 38 POST /messageQueue/4dfa98c1-0977-49d8-8144-cc94fc2512e8:3212c905179c2795d62f9048bf635c26 {"collapseId":1,"data":{"alert":"pushmessage","sound":"welcome.mp3","vibrate":"2","do_sync":["MessageReceived","MessageToSend"]}}

      ## handleMessageQueue header(s): {"accept":"*/*; q=0.5, application/xml","accept-encoding":"gzip, deflate","content-type":"application/json","content-length":"130","user-agent":"Ruby","authorization":"Basic c29tZWFwcG5hbWU6","host":"192.6.12.171:8675"}

      ## message from app server { collapseId: 1,

        data:

         { alert: 'push message',

           sound: 'welcome.mp3',

           vibrate: '2',

           do_sync: [ 'MessageReceived', 'MessageToSend' ] } }

      ## Decoded credentials someappname:

      ## About to add message to queue with token: 4dfa98c1-0977-49d8-8144-cc94fc2512e8:3212c905179c2795d62f9048bf635c26 and instanceID da656b9c-ae54-41b0-baf2-0d3e9a47de45:6f9cf8066cb626571dfc708ff44b69e7

      ## 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":4,"token":"4dfa98c1-0977-49d8-8144-cc94fc2512e8:3212c905179c2795d62f9048bf635c26","data":{"alert":"push message","sound":"welcome.mp3","vibrate":"2","do_sync":["MessageReceived","MessageToSend"]}}

      ## Message successfully enqueued for later delivery

      ## Client responded to with message {"id":4,"token":"4dfa98c1-0977-49d8-8144-cc94fc2512e8:3212c905179c2795d62f9048bf635c26","data":{"alert":"push message","sound":"welcome.mp3","vibrate":"2","do_sync":["MessageReceived","MessageToSend"]}}

      ## Multi reply to add msg to queue 1,1

       

       

      ## STATE OF MESSAGE QUEUE da656b9c-ae54-41b0-baf2-0d3e9a47de45:6f9cf8066cb626571dfc708ff44b69e7

      ## MessageID / Message

      ## 4         {"id":4,"token":"4dfa98c1-0977-49d8-8144-cc94fc2512e8:3212c905179c2795d62f9048bf635c26","data":{"alert":"push message","sound":"welcome.mp3","vibrate":"2","do_sync":["MessageReceived","MessageToSend"]}}

       

       

      ## STATE OF COLLAPSE ID QUEUE da656b9c-ae54-41b0-baf2-0d3e9a47de45:6f9cf8066cb626571dfc708ff44b69e7

      ## MessageID / CollapseID

      ## 4         1:someappname

       

       

      Output from the .net backend app sync:-

       

      ***** 40 POST /messageQueue/4dfa98c1-0977-49d8-8144-cc94fc2512e8:3212c905179c2795d62f9048bf635c26 {"data":{"alert":"sync message","sound":"beep.mp3","vibrate":"500","do_sync":"all"}}

      ## handleMessageQueue header(s): {"accept":"*/*; q=0.5, application/xml","accept-encoding":"gzip, deflate","content-type":"application/json","content-length":"84","user-agent":"Ruby","authorization":"Basic c29tZWFwcG5hbWU6","host":"192.6.12.171:8675"}

      ## message from app server { data:

         { alert: 'sync message',

           sound: 'beep.mp3',

           vibrate: '500',

           do_sync: 'all' } }

      ## Decoded credentials someappname:

      ## About to add message to queue with token: 4dfa98c1-0977-49d8-8144-cc94fc2512e8:3212c905179c2795d62f9048bf635c26 and instanceID da656b9c-ae54-41b0-baf2-0d3e9a47de45:6f9cf8066cb626571dfc708ff44b69e7

      ## A message DOES NOT exist on queue with collapseID undefined

      ## Multi reply to update expire times 1,1,0,0,1

      ## Add message to queue, add collapseID to queue

      ## Message added to queue {"id":5,"token":"4dfa98c1-0977-49d8-8144-cc94fc2512e8:3212c905179c2795d62f9048bf635c26","data":{"alert":"sync message","sound":"beep.mp3","vibrate":"500","do_sync":"all"}}

      ## Message successfully enqueued for later delivery

      ## Client responded to with message {"id":5,"token":"4dfa98c1-0977-49d8-8144-cc94fc2512e8:3212c905179c2795d62f9048bf635c26","data":{"alert":"sync message","sound":"beep.mp3","vibrate":"500","do_sync":"all"}}

      ## Multi reply to add msg to queue 1,1

       

       

      ## STATE OF MESSAGE QUEUE da656b9c-ae54-41b0-baf2-0d3e9a47de45:6f9cf8066cb626571dfc708ff44b69e7

      ## MessageID / Message

      ## 5         {"id":5,"token":"4dfa98c1-0977-49d8-8144-cc94fc2512e8:3212c905179c2795d62f9048bf635c26","data":{"alert":"sync message","sound":"beep.mp3","vibrate":"500","do_sync":"all"}}

       

       

      ## STATE OF COLLAPSE ID QUEUE da656b9c-ae54-41b0-baf2-0d3e9a47de45:6f9cf8066cb626571dfc708ff44b69e7

      ## MessageID / CollapseID

      ## 5         undefined:someappname

        • Re: Rhoconnect push message from .net backend app: collapseid undefined

          collapsed should not be required.  It is strange though that it isn't working, can you paste the output from your device logs?  Is the push message delivered to the device?

           

          -Lars

            • Re: Rhoconnect push message from .net backend app: collapseid undefined
              Tahir Zamir

              Hi Lars,

               

              The push message is delivered on both occasions; when syncing from the back end and when syncing from the web console. 

               

              The device log does seem to indicate that the sync is not happening when triggered from the back end though I can't determine the reason for it.  I have attached the log file.  The first time (line 49262) is when the sync is initiated by the back end and the second time (line 50320) is when it is triggered from the web console.

               

              Tahir

                • Re: Rhoconnect push message from .net backend app: collapseid undefined

                  It looks like there are some errors in the push message processing that may be causing this:

                  I/APP     (19753): E 04/23/2013 10:54:51:703 00004d29           RhoFileApi| Can not open file descriptor: /data/data/com.rhomobile.pfmerhodes6/rhodata/apps/public/alerts/beep.mp3: open failed: ENOENT (No such file or directory)

                  I/APP     (19753): E 04/23/2013 10:54:51:703 00004d29                Alert| Call of "playFile" failed: null

                  I/APP     (19753): E 04/23/2013 10:54:51:704 00004d29                Alert| Call of "vibrate" failed: VIBRATE disabled

                  I/APP     (19753): I 04/23/2013 10:54:51:704 00004d29 AndroidFunctionality| Pause WebView

                  E/SQLiteLog(19753): (14) cannot open file at line 30241 of [00bb9c9ce4]

                  E/SQLiteLog(19753): (14) os_unix.c:30241: (2) open(/FileSyetmQuota.db) -

                  D/WebKit  (19753): ERROR:

                  D/WebKit  (19753): SQLite database failed to load from /FileSyetmQuota.db

                  D/WebKit  (19753): Cause - unable to open database file

                   

                  Maybe try sending a simple push message with only the sync instruction and no play file or vibrate values.