Titanium JIRA Archive
Appcelerator Community (AC)

[AC-3389] iOS: app crash on device for appc-sourcecode-encryption-policy property

GitHub Issuen/a
TypeBug
Priorityn/a
StatusResolved
ResolutionCannot Reproduce
Resolution Date2016-04-18T06:15:46.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsadhoc, crash, debug, ios, skip-js-minify
ReporterParijat sahai
AssigneeMostafizur Rahman
Created2016-03-18T03:50:19.000+0000
Updated2016-04-18T06:15:46.000+0000

Description

My Titanium app that was last compiled for iOS in Feb was running fine in adhoc distribution mode. However, for some reason, the same app rebuilt now is crashing right after splash screen shows in adhoc distrib mode or "run" mode on the iOS device (iPhone 6s Plus). The same app when run in debug mode on the same device runs just fine without crashing. There is no crash in the Simulator either (for 6s Plus). Please advise why the app crashes in run or distrib mode but runs just fine in debug mode. Need this resolved asap as I have spent over 2 days trying to figure that out with no success. I have seen various JIRA tickets and discussions on old Appcelerator support pages about the difference between run and debug mode being the "javascript minification" that can cause such issue. But even when I try to run or build adhoc distrib using the "--skip-js-minify" option on CLI or modify the Run Configuration in Studio to uncheck the "Enable Javascript Minification", the issue remains. Please help!

Comments

  1. Sharif AbuDarda 2016-03-18

    Hello, Please provide a sample test code to test. It will be helpful to provide a valid solution if we are also able to regenerate the issue in our environment. If you are using any module in your app try using the latest version of the module. Please provide a sample regeneratable code. and also steps to follow. Thanks.
  2. Parijat sahai 2016-03-20

    It took me a while to figure out the culprit. Here are the steps to reproduce the issue: 1) In Titanium Studio, create a new Mobile App project using Alloy Default template 2) Run the newly created project as-is to a USB attached iPhone 6s Plus (or probably ANY ios device). 3) Click on the app icon on the device and the app will launch just fine with Hello World on the screen. 4) Now go to the TiApp.xml file and edit it by adding the following parameter: embed 5) Now run the modified project to the USB attached device 6) Open the app and you will notice that it crashes right after the splash screen shows briefly. It seems the property above does not work properly. This is an URGENT issue because we cannot use the default option that requires the device to be connected to the internet in order to launch the app.
  3. Mostafizur Rahman 2016-03-21

    Hello, Thanks for sharing with us. I have tested that issue you reported. I am not able to reproduce this. But I have got the following error if I add this “*embed*” in tiapp.xml file. *Test Environment:* Appcelerator Studio, build: 4.5.0.201602170821, Operating System Mac OS X -EI Capitan,Versio-10.11.1, Appcelerator Command-Line Interface, version 5.2.0, SDK Version = 5.2.0.GA, Node.js Version: 4.2.2 npm Version:2.14.7, Device: iPad, iOS SDK: 9.1 *Test Result :* console logs:
       
       [INFO] :   Creating launch image set
       
       [INFO] :   App thinning disabled, skipping asset image sets
       
       [INFO] :   Processing JavaScript files
       
       [INFO] :   Writing app properties
       
       [INFO] :   Encrypting JavaScript files
       
       [ERROR] :  error copying files. ENOENT: no such file or directory, open '/Users/user/.appcelerator/.b902374034e4329333b2ddc6a57aeb1a8bfdff0a.pk’
       
       
    *Test steps to reproduce:*

    Open Appcelerator Studio.

    Create default alloy project.

    Run into the device ( iPad ).

    Click on the icon of app and it is running successfully.

    Copy the line *embed* this line and paste this in tiapp.xml file.

    Run again into device ( iPad ) and got following error
    error copying files. ENOENT: no such file or directory, open '/Users/user/.appcelerator/.b902374034e4329333b2ddc6a57aeb1a8bfdff0a.pk’

  4. Parijat sahai 2016-03-28

    You might want to clean out the build folder and try again.
  5. Rakhi Mitro 2016-04-10

    HI, Tested the issue again with a clean build in latest SDK (5.2.2.GA). Followed all steps provided by *Parijat* and unable to reproduce the issue. Thanks

JSON Source