Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-14059

Analytics: Ti.end event not sent after killing and relaunching the app on Android

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: Release 3.2.0
    • Component/s: Android
    • Environment:

      SDK : 3.1.1.v20130529114554
      Appcelerator Studio: 3.1.1.201305232424

      Description

      Repro steps:

      1. Create a default app from appcelerator studio
      2. Install it on Android device
      3. Go to dashboard.appcelerator.com
      4. Look up your app and go to Analytics.Realtime tab
      5. Launch the app on the android device
      6. After few minutes, background the app on device and then go to settings->apps->select your app
      7. tap on Force stop
      8. Wait for few moments, look up dashboard and you will see the active session count go up by 1.
      9. Repeat the steps from 5 to 8 multiple times
      10. The active session count will go increasing with avg session length still N/A

      To ensure this is not a bug in PEM or dashboard, I had a custom build which spits out analytics sent by SDK and I kept on seeing ti.start being sent when the app was relaunched after force stop but not ti.end.

      1. At first launch:

      TiAnalyticsSvc(26293): (Thread-896) [56,29758] ------------------------------ Sending :: [{"id":"ab8e5597-8882-4454-8b26-94d99d22a0a4:df9547607f27ccd6","sid":"a01e30a5-676d-41c8-8776-285ddf2d7976","ts":"2013-05-31T01:00:50.288+0000","event":"ti.enroll","data":

      {"platform":"android","osarch":"ARMv7 Processor rev 2 (v7l)","model":"Nexus 4","mac_addr":"10:68:3f:47:90:54","previous_mid":"","oscpu":4,"ostype":"32bit","deploytype":"test","app_id":"com.appcelerator.testAnalytics2","app_name":"testAnalytics2"}

      ,"seq":1,"mid":"df9547607f27ccd6","ver":"2","type":"ti.enroll","aguid":"d8504b70-8106-4423-b35a-128a56fb30db"},{"id":"fbb7b410-b8ed-49eb-b303-f0793bfdf370:df9547607f27ccd6","sid":"a01e30a5-676d-41c8-8776-285ddf2d7976","ts":"2013-05-31T01:00:50.312+0000","event":"ti.start","data":

      {"platform":"android","os":"Android","model":"Nexus 4","tz":-480,"nettype":"WIFI","deploytype":"test","app_version":"1.0","osver":"4.2.1","version":"3.1.1"}

      ,"seq":2,"mid":"df9547607f27ccd6","ver":"2","type":"ti.start","aguid":"d8504b70-8106-4423-b35a-128a56fb30db"}] analytics events.

      2. After first stop and relaunch ( ignore the featureEvent.testButton custom event)

      AnalyticsSvc(26293): (Thread-901) [31,3353] ------------------------------ Sending :: [{"id":"a44df8d1-2436-4a64-b938-7d2f70a67b87:df9547607f27ccd6","sid":"5ab6425c-1aad-41eb-87ba-3f451c139c21","ts":"2013-05-31T01:10:37.163+0000","event":"ti.start","data":

      {"platform":"android","os":"Android","model":"Nexus 4","tz":-480,"nettype":"WIFI","deploytype":"test","app_version":"1.0","osver":"4.2.1","version":"3.1.1"}

      ,"seq":6,"mid":"df9547607f27ccd6","ver":"2","type":"ti.start","aguid":"d8504b70-8106-4423-b35a-128a56fb30db"},{"id":"b5fc2594-889f-4345-badf-84a2a59c116d:df9547607f27ccd6","sid":"5ab6425c-1aad-41eb-87ba-3f451c139c21","ts":"2013-05-31T01:10:39.364+0000","event":"featureEvent.testButton","data":

      {"value":""}

      ,"seq":7,"mid":"df9547607f27ccd6","ver":"2","type":"app.feature","aguid":"d8504b70-8106-4423-b35a-128a56fb30db"},{"id":"48040511-a642-49db-8ddf-cec6f1d6c156:df9547607f27ccd6","sid":"5ab6425c-1aad-41eb-87ba-3f451c139c21","ts":"2013-05-31T01:10:54.915+0000","event":"featureEvent.testButton","data":

      {"value":""}

      ,"seq":8,"mid":"df9547607f27ccd6","ver":"2","type":"app.feature","aguid":"d8504b70-8106-4423-b35a-128a56fb30db"}] analytics events.

      3. After second force stop and relaunch

      TiAnalyticsSvc(27929): (Thread-923) [51,29711] ------------------------------ Sending :: [{"id":"3af41073-e621-4749-bd36-63ed5f823bbc:df9547607f27ccd6","sid":"7b4861e2-a06f-4814-b8c8-21f218fd78ee","ts":"2013-05-31T01:32:44.902+0000","event":"ti.start","data":

      {"platform":"android","os":"Android","model":"Nexus 4","tz":-480,"nettype":"WIFI","deploytype":"test","app_version":"1.0","osver":"4.2.1","version":"3.1.1"}

      ,"seq":10,"mid":"df9547607f27ccd6","ver":"2","type":"ti.start","aguid":"d8504b70-8106-4423-b35a-128a56fb30db"}] analytics events.

      4. After third force stop and relaunch

      TiAnalyticsSvc(28357): (Thread-935) [29660,29660] Analytics Service Started
      I/TiAnalyticsSvc(28357): (Thread-935) [85,29745] ------------------------------ Sending :: [{"id":"18dd716b-8cde-42e6-aaf9-5c21f39beb94:df9547607f27ccd6","sid":"3ab44924-a342-427b-810c-b7273c28ae57","ts":"2013-05-31T01:35:48.447+0000","event":"ti.start","data":

      {"platform":"android","os":"Android","model":"Nexus 4","tz":-480,"nettype":"WIFI","deploytype":"test","app_version":"1.0","osver":"4.2.1","version":"3.1.1"}

      ,"seq":14,"mid":"df9547607f27ccd6","ver":"2","type":"ti.start","aguid":"d8504b70-8106-4423-b35a-128a56fb30db"}] analytics events.

      5. After fourth force stop and relaunch

      TiAnalyticsSvc(28785): (Thread-956) [57,29651] ------------------------------ Sending :: [{"id":"59624ade-44c8-428a-99d0-b700d4c91c7f:df9547607f27ccd6","sid":"e334d3f5-2440-4a27-a24f-5729a82e01eb","ts":"2013-05-31T01:37:39.577+0000","event":"ti.start","data":

      {"platform":"android","os":"Android","model":"Nexus 4","tz":-480,"nettype":"WIFI","deploytype":"test","app_version":"1.0","osver":"4.2.1","version":"3.1.1"}

      ,"seq":15,"mid":"df9547607f27ccd6","ver":"2","type":"ti.start","aguid":"d8504b70-8106-4423-b35a-128a56fb30db"}] analytics events.

      As it can be seen, the ti.end events are not being sent successfully and hence dashboard does not know that the session has ended and hence messes up session results like active number of sessions, avg session length calculations.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ingo Ingo Muschenetz
                Reporter:
                mgadiya Mukesh Gadiya
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-16613
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Integration