[TIMOB-19083] Windows: New analytics session ID is generated every time an app is opened
| GitHub Issue | n/a |
| Type | Bug |
| Priority | High |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2015-07-10T21:04:11.000+0000 |
| Affected Version/s | Release 4.1.0 |
| Fix Version/s | Release 5.0.0 |
| Components | Windows |
| Labels | qe-4.1.0 |
| Reporter | Ewan Harris |
| Assignee | Gary Mathews |
| Created | 2015-06-26T17:39:21.000+0000 |
| Updated | 2017-03-16T21:56:41.000+0000 |
Description
Description
When opening an closing and reopening an application, each time the app is reopened a new session ID is generated. As per iOS and Android a new session ID should only be generated when an app has been backgrounded and not reopened for 30 seconds or longer
Steps To Reproduce
*Using the staging environment for analytics*
1. Open an app
2. Close the app using the Windows hardware button
3. Reopen the app in less than 30 seconds
Actual Result
A new session ID is generated
Expected Result
A new session ID should not be generated
Attachments
| File | Date | Size |
| events.json | 2015-06-26T17:53:48.000+0000 | 1334 |
Added events.json that includes two events, a ti.background and ti.foreground. Note the SID is different in both despite the timestamp showing the events are less than 30 seconds apart
I can't reproduce this. Could you test using this PR : https://github.com/appcelerator/titanium_mobile_windows/pull/332
Issue still occurs using: Windows 8.1 Appc CLI (NPM): 4.1.0-1 Appc CLI (Registry): 4.1.0-5 Ti SDK: 4.1.0.v20150706111546 Lumia 1020: 8.1
--First launch-- {"city":"San Francisco","region_code":"CA","country_code":"US","country_name":"United States","postal_code":"","latitude":37.774898529053,"longitude":-122.41940307617,"area_code":415,"continent_code":"NA","ip_address":"38.110.144.252","region_name":"California","id":"506b73ef-428b-42bc-bd1f-208c3f643b53:c6ea39484a1632ff590c24a7d6b144f3","sid":"c15e7b2c-c8ec-429d-88a4-99c04f8f5b4f","ts":"2015-07-06T18:47:42.616Z","event":"ti.enroll","seq":0,"mid":"c6ea39484a1632ff590c24a7d6b144f3","ver":"3","aguid":"547a9c0f-dd82-4f5c-9aaa-c91d61bbd208","data":"{\"platform\":\"windows\",\"osarch\":\"arm\",\"model\":\"NOKIA RM-877_lta_lta_266\",\"oscpu\":2,\"ostype\":\"arm\",\"deploytype\":\"test\",\"app_id\":\"com.appc.project\",\"app_name\":\"classicProject\",\"os\":\"windowsphone\",\"tz\":-420,\"nettype\":\"UNKNOWN\",\"app_version\":\"1.0\",\"osver\":\"0.0\",\"sdkver\":\"\"}","source":"mobile-track"} {"city":"San Francisco","region_code":"CA","country_code":"US","country_name":"United States","postal_code":"","latitude":37.774898529053,"longitude":-122.41940307617,"area_code":415,"continent_code":"NA","ip_address":"38.110.144.252","region_name":"California","id":"ab79c983-2f29-48b9-ac27-bdf9cfe0f599:c6ea39484a1632ff590c24a7d6b144f3","sid":"c15e7b2c-c8ec-429d-88a4-99c04f8f5b4f","ts":"2015-07-06T18:47:42.631Z","event":"ti.foreground","seq":1,"mid":"c6ea39484a1632ff590c24a7d6b144f3","ver":"3","aguid":"547a9c0f-dd82-4f5c-9aaa-c91d61bbd208","data":"{\"platform\":\"windows\",\"osarch\":\"arm\",\"model\":\"NOKIA RM-877_lta_lta_266\",\"oscpu\":2,\"ostype\":\"arm\",\"deploytype\":\"test\",\"app_id\":\"com.appc.project\",\"app_name\":\"classicProject\",\"os\":\"windowsphone\",\"tz\":-420,\"nettype\":\"UNKNOWN\",\"app_version\":\"1.0\",\"osver\":\"0.0\",\"sdkver\":\"\"}","source":"mobile-track"} --App backgrounded-- {"id":"f15e2214-02cb-482d-9af9-f9eaff9a12cb:c6ea39484a1632ff590c24a7d6b144f3","sid":"c15e7b2c-c8ec-429d-88a4-99c04f8f5b4f","ts":"2015-07-06T18:47:57.194Z","event":"ti.background","seq":2,"mid":"c6ea39484a1632ff590c24a7d6b144f3","ver":"3","aguid":"547a9c0f-dd82-4f5c-9aaa-c91d61bbd208","source":"mobile-track"} --App reopened-- {"city":"San Francisco","region_code":"CA","country_code":"US","country_name":"United States","postal_code":"","latitude":37.774898529053,"longitude":-122.41940307617,"area_code":415,"continent_code":"NA","ip_address":"38.110.144.252","region_name":"California","id":"7db78d03-edb9-4486-bdde-d3a5cd4febd1:c6ea39484a1632ff590c24a7d6b144f3","sid":"37c33795-713e-4e38-aef2-f348ce1c50c3","ts":"2015-07-06T18:48:04.787Z","event":"ti.foreground","seq":0,"mid":"c6ea39484a1632ff590c24a7d6b144f3","ver":"3","aguid":"547a9c0f-dd82-4f5c-9aaa-c91d61bbd208","data":"{\"platform\":\"windows\",\"osarch\":\"arm\",\"model\":\"NOKIA RM-877_lta_lta_266\",\"oscpu\":2,\"ostype\":\"arm\",\"deploytype\":\"test\",\"app_id\":\"com.appc.project\",\"app_name\":\"classicProject\",\"os\":\"windowsphone\",\"tz\":-420,\"nettype\":\"UNKNOWN\",\"app_version\":\"1.0\",\"osver\":\"0.0\",\"sdkver\":\"\"}","source":"mobile-track"}PR: https://github.com/appcelerator/titanium_mobile_windows/pull/360
Closing ticket as fixed.