[TIMOB-28079] Android: ACA module no longer loaded first on startup as of 8.1.0
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2020-10-27T22:44:11.000+0000 |
Affected Version/s | Release 8.1.0 |
Fix Version/s | Release 9.3.0, Release 9.2.2 |
Components | Android |
Labels | ACA, analytics, android, crash |
Reporter | Joshua Quick |
Assignee | Gary Mathews |
Created | 2020-08-11T22:12:41.000+0000 |
Updated | 2020-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
master: https://github.com/appcelerator/titanium_mobile/pull/12205
FR Passed. Waiting for jenkins.
merged to master for 9.3.0 target. Backport PR for 9_2_X merged for 9.2.2 target.
Verified the fix in SDK 9.2.2.v20201026120850 & 9.3.0.v20201027120230. Closing.