Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-27583] iOS: Crash with MobileIron wrapped app

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionFixed
Resolution Date2019-11-21T23:47:21.000+0000
Affected Version/sn/a
Fix Version/sRelease 8.3.0
Componentsn/a
LabelsengSchedule
ReporterShuo Liang
AssigneeGary Mathews
Created2019-11-14T02:03:04.000+0000
Updated2019-11-21T23:47:21.000+0000

Description

The customer is using the MobileIron MDM tool for app deployment and using mobileiron wrapper tool for enabling apptunnel for our app (VPN less app) when we upload the iOS 13 app to MDM the app crashes. After logged a support call with Mobileiron and the root cause for the crash was identified that APSanalytics library trying to send the synchronous request on the main thread which is against Apple's recommendation Attached the response from MobileIron support below. Currently, we have disabled the Analytics module (in tiapp.xml) in our app and the app is not crashing. But we are losing the Appcelerator analytics data. can you please take a look at the issue and fix it the SDK. {quote} Mobileiron Support engineer response We have identified why your wrapped app is crashing. The app uses Appcelerator's APSAnalytics library to send requests on app launch before AppConnect is initialized. By design, AppConnect blocks any network requests until any AppTunnel Rules are received. However, APSAnalytics makes a synchronous request on the main thread, which is against Apple's recommendations. default 12:54:03.431961 +0200 mPeople [ERROR] APSAnalytics: error sending request: The operation couldn’t be completed. Request timed out earlier than tunneling config was received. default 12:54:03.434021 +0200 mPeople [INFO] APSAnalyticsStore: session.start default 12:54:03.439620 +0200 mPeople [INFO] APSAnalyticsStore: mPeople_iphone_12.4.1_Home debug process_assertion 12:54:03.444635 +0200 mPeople Request for backgroundTimeRemaining from pid -1 default 12:54:03.444799 +0200 mPeople [DEBUG] APSAnalytics: Attempting to send 2 analytics event(s) Why the issue happened in 4.4.1: AppConnect 4.0 introduced networking changes for requests being processed without any AppConnect configuration. Now, we pause these until the config has been received. This was done to improve security of data-in-transit. This works for requests off the main thread, but for synchronous requests blocking the main thread, those are deadlocked. Note that even in the unwrapped app, we can force an identical crash by setting "Network Link Conditioner" to "100% Loss", then launched the unwrapped application, minimized it, and open it again. Then, with "Network Link Conditioner" set to "Very Bad Network" the app also freezes, but for less than 10 seconds, so iOS doesn't kill it. Conclusion: This looks like an Appcelerator bug. Perhaps they have a newer version available, or perhaps you can init APSAnalytics later in the app launch sequence, or not use it at all. {quote}

Comments

  1. Gary Mathews 2019-11-19

    aps_sdk: https://github.com/appcelerator/aps_sdk/pull/339 master: https://github.com/appcelerator/titanium_mobile/pull/11345 8_3_X: https://github.com/appcelerator/titanium_mobile/pull/11356
  2. Lokesh Choudhary 2019-11-21

    FR Passed. PR's merged.
  3. Lokesh Choudhary 2019-11-21

    Verified the fix with SDK 8.3.0.v20191120160657 & 9.0.0.v20191121074219. Closing.

JSON Source