Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-18674] Windows: Analytics is crashing during second invocation of sendAnalytics method

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2015-03-17T21:25:30.000+0000
Affected Version/sn/a
Fix Version/sRelease 4.1.0
ComponentsWindows
Labelsn/a
ReporterChristopher Williams
AssigneeKota Iguchi
Created2015-03-10T18:13:36.000+0000
Updated2017-03-16T22:21:39.000+0000

Description

Running the corporate directory app from the CLI, the app reliably crashes when it tries to send the app.feature event (after having sent an enroll event). Here's the output from the logs during launch:
[INFO]  Connected to app
-- Start application log -----------------------------------------------------
[INFO]  creating instance of Analytics class
[INFO]  checking if database exists
[INFO]  databaseExists
[INFO]  creating database
[INFO]  createDatabase
[INFO]  sendAppEnrollEvent
[INFO]  createAppEnrollEvent
[INFO]  createAnalyticsEvent
[INFO]  postAnalyticsEvent
[INFO]  needsEnrollEvent
[INFO]  getProps
[INFO]  addEvent
[INFO]  getProps
[INFO]  Sequence: 0
[INFO]  Inserting: {"type":"ti.enroll","timestamp":"2015-03-10T18:04:27.819Z","m
id":"","sid":"{d13d8cb9-6d9e-4045-893c-fd6a87c0a0fd}","appGUID":"__GUID__","payl
oad":"{\"app_name\":\"__NAME__\",\"oscpu\":0,\"platform\":\"windows\",\"app_id\"
:\"__ID__\",\"ostype\":\"x86\",\"osarch\":\"x86\",\"model\":\"Microsoft Virtual\
",\"deploytype\":\"development\",\"app_version\":\"__VERSION__\",\"tz\":240,\"os
\":\"windowsphone\",\"osver\":\"0.0\",\"sdkver\":\"__TITANIUM_VERSION__\",\"nett
ype\":\"LAN\"}","expandPayload":true}
[INFO]  updateProps
[INFO]  sendAnalytics
[INFO]  updateProps
[INFO]  featureEvent
[INFO]  createEvent
[INFO]  createAnalyticsEvent
[INFO]  postAnalyticsEvent
[INFO]  addEvent
[INFO]  getProps
[INFO]  Sequence: 1
[INFO]  Inserting: {"type":"app.feature","timestamp":"2015-03-10T18:04:27.820Z",
"mid":"","sid":"{d13d8cb9-6d9e-4045-893c-fd6a87c0a0fd}","appGUID":"__GUID__","pa
yload":"{\"eventName\":\"windows.directory.viewed\"}","expandPayload":true}
[INFO]  updateProps
[INFO]  sendAnalytics
[INFO]  Disconnected from app
-- End application log -------------------------------------------------------

Comments

  1. Christopher Williams 2015-03-10

    I should note that when we spit out "[INFO] sendAnalytics" to the log, right after that we fire a setTimeout(this.run.bind(this), delay); I _think_ the first invocation isn't firing and the second seems to cause the crash. This works fine under VS 2013 debugger, though.
  2. Kota Iguchi 2015-03-16

    I think I am able to reproduce this issue but I am not sure if I am doing it right. [~cwilliams] Can you provide more info about how to reproduce this please? I did like below. It did installs/launches app, and it crashes immediately after displaying splash screen for me. 1. Install the Titanium CLI from the git master branch: npm install -g git://github.com/appcelerator/titanium.git#master 2. Install latest Titanium SDK from master: ti sdk install -b master -d 3. Run ti create -p windows and create a new app. 4. cd into project directory 5. Copy all corporate app files into Resources/ directory 6. Run ti build -p windows -T wp-device --wp-publisher-guid 00000000-0000-1000-8000-000000000000
  3. Kota Iguchi 2015-03-17

    I can not reproduce this issue when the device is connected to Internet. The corporate app runs fine on my device. But when I turn Airplane mode on, it did not run, it crashes immediately after splash screen. Now I suspect it crashes because it does not property catches exception on connection error. I'll look into more on that.
  4. Kota Iguchi 2015-03-17

    https://github.com/appcelerator/titanium_mobile_windows/pull/169
  5. Lee Morris 2017-03-16

    Closing ticket as fixed.

JSON Source