Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-2491] iOS: analytics error when backgrounding app

GitHub Issuen/a
Resolution Date2011-04-17T01:59:15.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.5.0 M04
Labelsanalytics, ios, regression
ReporterThomas Huelbert
AssigneeBlain Hamon


seen using 1.5.0 faa27c7, ipod and ipad, sim or device

1.launch KS, connect to console
2.tap the home button to background the app and check for output

Fri Dec  3 08:54:49 Mr-Pink-iPod UIKitApplication:com.appcelerator.KitchenSink[0xd50f][2572] : [ERROR] Will re-queue analytics

Fri Dec  3 08:54:49 Mr-Pink-iPod KitchenSink[2572] : [ERROR] A SQLite database error occurred on database '/var/mobile/Applications/AB87BA17-8362-4618-A03B-821285153A24/Library/Application Support/analytics/analytics.db': Error Domain=com.plausiblelabs.pldatabase Code=2 "An error occurred executing an SQL update." UserInfo=0x4a4680 {com.plausiblelabs.pldatabase.error.vendor.code=1, NSLocalizedDescription=An error occurred executing an SQL update., com.plausiblelabs.pldatabase.error.query.string=BEGIN DEFERRED, com.plausiblelabs.pldatabase.error.vendor.string=cannot start a transaction within a transaction} (SQLite #1: cannot start a transaction within a transaction) (query: 'BEGIN DEFERRED')

Fri Dec  3 08:54:49 Mr-Pink-iPod UIKitApplication:com.appcelerator.KitchenSink[0xd50f][2572] : [DEBUG] attempt to send analytics event but no network. will try again in 15 seconds

not seen using 1.4.2


  1. Stephen Tramer 2011-04-15

    Probably expected behavior, as part of better error handling for 1.5.0. But I'll add in an error logging flag for analytics so this can be suppressed if wanted.

    Note that analytics events are now requeued on SQL errors now as well - previously they were just dropped.

  2. Jeff Haynie 2011-04-15

    (from [bdcec24a71089760ab74af83339aff6f8dad6e9f]) [#2491 state:fixed-in-qa] Rollback analytics transactions before re-queuing on network errors. https://github.com/appcelerator/titanium_mobile/commit/bdcec24a71089760ab74af83339aff6f8dad6e9f"> https://github.com/appcelerator/titanium_mobile/commit/bdcec24a7108...

  3. Thomas Huelbert 2011-04-15

    unable to repro using Titanium SDK version: 1.5.0 (12/04/10 08:46 b7b9e78) and 4gt ipod touch running 4.2.1

JSON Source