Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-28079] Android: ACA module no longer loaded first on startup as of 8.1.0

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2020-10-27T22:44:11.000+0000
Affected Version/sRelease 8.1.0
Fix Version/sRelease 9.3.0, Release 9.2.2
ComponentsAndroid
LabelsACA, analytics, android, crash
ReporterJoshua Quick
AssigneeGary Mathews
Created2020-08-11T22:12:41.000+0000
Updated2020-10-27T22:44:11.000+0000

Description

*Summary:* The ACA (AMPLIFY Crash Analytics) module, if included, was intended to be loaded on app startup before requiring/importing any other JS file on app startup. This way, if a crash occurs in any of the operations that happen before the "app.js" gets loaded, it will be handled by the ACA module. This is no longer happening as of Titanium 8.1.0. *Cause:* Most of the JS files loaded in our "ti.main.js" were switched over from using require() to import statements as of Titanium 8.1.0. JavaScript's import statements are "hoisted", which means they are effectively executed at the top of the source file and not where they're actually written. https://github.com/appcelerator/titanium_mobile/blob/master/common/Resources/ti.main.js When you do a build of the SDK, you can see the babel transpiled/polyfilled result in the following directories. Here you can see the actual load order.
titanium_mobile/dist/tmp/common/Resources/<Platform>/ti.main.js

Comments

  1. Gary Mathews 2020-10-22

    master: https://github.com/appcelerator/titanium_mobile/pull/12205
  2. Lokesh Choudhary 2020-10-26

    FR Passed. Waiting for jenkins.
  3. Christopher Williams 2020-10-26

    merged to master for 9.3.0 target. Backport PR for 9_2_X merged for 9.2.2 target.
  4. Lokesh Choudhary 2020-10-27

    Verified the fix in SDK 9.2.2.v20201026120850 & 9.3.0.v20201027120230. Closing.

JSON Source