Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-28408] iOS: App with remote policy encryption crashes when offline

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2021-04-08T15:19:27.000+0000
Affected Version/sRelease 10.0.0
Fix Version/sRelease 10.0.0
ComponentsiOS
Labelsregression
ReporterSatyam Sekhri
AssigneeChristopher Williams
Created2021-03-30T23:33:48.000+0000
Updated2021-04-08T15:19:27.000+0000

Description

This is a regression in 10.0. When an app with remote policy encryption enabled is launched without network then it crashes. Steps to Reproduce: 1. Create a Titanium app project. 2. Add the following line to the "tiapp.xml" file. remote 3. Disable the internet connection on the iOS device 4. Build and run the app to the iOS device. Actual Result: The app crashes on launch with following error in log
[ERROR] :  TypeError: undefined is not an object
[ERROR] :      Foundation 0x000000018fefe940 _NSDescriptionWithLocaleFunc + 96
[ERROR] :      CoreFoundation 0x000000018ebb8fe4 96F8386D-D88A-3C89-A323-A17975C3317F + 778212
[ERROR] :      CoreFoundation 0x000000018ebba154 _CFStringCreateWithFormatAndArgumentsReturningMetadata + 160
[ERROR] :      TitaniumKit 0x00000001031d59cc TiLogMessage + 60
[ERROR] :      TitaniumKit 0x0000000103210fec -[TiExceptionHandler reportScriptError:] + 76
[ERROR] :      TitaniumKit 0x00000001031e9ac4 -[KrollBridge didStartNewContext:] + 560
[ERROR] :      TitaniumKit 0x000000010321f660 -[KrollContext main] + 1068
[ERROR] :      libdispatch.dylib 0x000000018e84d298 6C143C51-288F-3CD0-84DD-17B9A0AAEE62 + 393880
[ERROR] :      libdispatch.dylib 0x000000018e84e280 6C143C51-288F-3CD0-84DD-17B9A0AAEE62 + 397952
[ERROR] :      libdispatch.dylib 0x000000018e7fd05c 6C143C51-288F-3CD0-84DD-17B9A0AAEE62 + 65628
[ERROR] :      CoreFoundation 0x000000018eb955d0 96F8386D-D88A-3C89-A323-A17975C3317F + 632272
[ERROR] :      CoreFoundation 0x000000018eb8fa78 96F8386D-D88A-3C89-A323-A17975C3317F + 608888
[ERROR] :      CoreFoundation 0x000000018eb8eb90 CFRunLoopRunSpecific + 572
[ERROR] :      GraphicsServices 0x00000001a4eb1598 GSEventRunModal + 160
[ERROR] :      UIKitCore 0x0000000191478638 71B59F62-19DA-3CFF-89E1-DACF333BAB0D + 11716152
[ERROR] :      UIKitCore 0x000000019147dbb8 UIApplicationMain + 164
[ERROR] :      testTicket 0x0000000102e62e1c testTicket + 28188
[ERROR] :      libdyld.dylib 0x000000018e86d588 E31C0887-C999-3047-9B80-203248EC2396 + 5512
Expected Result: The app should launch without a crash and show a message related to Security Violation Detected

Comments

  1. Vijay Singh 2021-04-02

    On SDK 9.3.3, it is working fine. This seems regression from PR https://github.com/appcelerator/titanium_mobile/pull/11693. In SDK 10.0.0, from above PR it is failing. cc [~cwilliams].
  2. Christopher Williams 2021-04-07

    https://github.com/appcelerator/titanium_mobile/pull/12700
  3. Christopher Williams 2021-04-07

    Note that for local testing I was able to reproduce and verify my fix by using the iPhone simulator: - create project - appc new --import - modify the tiapp.xml to add the <property name="appc-sourcecode-encryption-policy">remote</property> tag - appc run -p ios --log-level trace --deploy-type test - Then just after I saw the files get encrypted, and during the xcodebuild section of building the app, I'd toggle off my macOS wifi so when the app was done building and was launched on simulator is was offline.
  4. Satyam Sekhri 2021-04-07

    FR Passed. Waiting for Jenkins build.
  5. Christopher Williams 2021-04-08

    merged to master and 10_0_X branch

JSON Source