Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-16077] Android: Large amounts of JavaScript breaks encryption process

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2015-03-26T00:00:38.000+0000
Affected Version/sRelease 3.2.0, Release 3.5.0
Fix Version/sRelease 4.0.0
ComponentsAndroid, CLI
Labelsn/a
ReporterIngo Muschenetz
AssigneeIngo Muschenetz
Created2013-12-24T22:32:48.000+0000
Updated2017-03-31T22:23:06.000+0000

Description

If a project contains a large amount of JavaScript files (total number of bytes, rather than number of files), it will fail during the encryption process. [ERROR] : Failed to encrypt JavaScript files This is not a regression. Titanium SDK 3.2.0.GA max app.js size is 524,283 bytes. Titanium SDK 3.1.3.GA max app.js size is 017,688 bytes. Test Data: Titanium SDK 3.2.0.GA Test File: app.js.524,290 bytes (attached) app.js size Pass: 524,283 bytes Fail: 524,290 bytes Log:
[ERROR] :  Failed to encrypt JavaScript files
[ERROR] :  
Titanium SDK 3.1.3.GA Test File: app.js.17,695 bytes (attached) app.js size Pass: 17,688 bytes Fail: 17,695 bytes Log:
[ERROR] Exception occured while building Android project:
[ERROR] Traceback (most recent call last):
[ERROR]   File "/Users/dhyde/Library/Application Support/Titanium/mobilesdk/osx/3.1.3.GA/android/builder.py", line 2629, in <module>
[ERROR]     builder.build_and_run(True, None, key, password, alias, output_dir)
[ERROR]   File "/Users/dhyde/Library/Application Support/Titanium/mobilesdk/osx/3.1.3.GA/android/builder.py", line 2292, in build_and_run
[ERROR]     compiler.compile(compile_bytecode=self.compile_js, external_modules=self.modules)
[ERROR]   File "/Users/dhyde/Library/Application Support/Titanium/mobilesdk/osx/3.1.3.GA/android/compiler.py", line 286, in compile
[ERROR]     self.compile_into_bytecode(self.js_files)
[ERROR]   File "/Users/dhyde/Library/Application Support/Titanium/mobilesdk/osx/3.1.3.GA/android/compiler.py", line 201, in compile_into_bytecode
[ERROR]     self.compile_javascript(fullpath)
[ERROR]   File "/Users/dhyde/Library/Application Support/Titanium/mobilesdk/osx/3.1.3.GA/android/compiler.py", line 191, in compile_javascript
[ERROR]     sys.stderr.write("[ERROR] unrecognized error encountered: " % se)
[ERROR] TypeError: not all arguments converted during string formatting
[INFO] Running finalize function in com.soasta.touchtest.android plugin
[ERROR] :  Build process exited with code 1
[ERROR] :  Project failed to build after 2s 988ms

Attachments

FileDateSize
app.js.17,695 bytes2013-12-30T21:06:27.000+000017695
app.js.524,290 bytes2013-12-30T21:06:27.000+0000524290

Comments

  1. Chris Barber 2014-01-30

    Hmm, when I tested this, I was able to get up to around 7MB of JavaScript across hundreds of files. I never tested a single large file.
  2. Lokesh Choudhary 2014-01-31

  3. Zac Moody 2014-02-10

    Believe I am having this issue. I'm working on an Alloy project that has a large data migration, project was working fine on Android and iOS *until I added a ~5mb migration file*. Now iOS and Android *emulator* still work, but building for an Android device causes:
       [ERROR] :  Failed to encrypt JavaScript files
       [ERROR] :  
       [ERROR] Application Installer abnormal process termination. Process exit value was 1
       
    Env build 3.2.0.201312191547 CLI version 3.2.0, Titanium SDK version 3.2.0.GA Max OSX 10.9.1 HTC One, android 4.3 This is important for my project so please let me know if there's anything I can do to help.
  4. Ingo Muschenetz 2014-02-10

    Hi Zac--We are working on this issue and have scheduled it for as soon a release as possible.
  5. Zac Moody 2014-02-13

    Hi Ingo, will this be released before 3.3? June is a long time away. Is there any chance of a patch, or a workaround? Or even just some suggestions. Thank you for your time and sorry for the pestering
  6. Ingo Muschenetz 2014-02-13

    Zac, we have it scheduled for the next patch release which is prior to June. If we can fix it before then, we will.
  7. Ingo Muschenetz 2014-05-23

    [~lchoudhary] Can you please play with the following options and see if that fixes the issues: * android.dx.maxMemory - Max memory that the "dx" (dexer) command will use. Defaults to "1024M". * android.javac.maxMemory - Defaults to "256M".
  8. Raymond Verbruggen 2014-09-10

    What is the fix to come around this? THIS IS URGENT!! Made a big update for iOS and now I cannot continue for Android. No problem on iOS, big troubles on Android. This is again a discrepancy between the two major platforms Appcelerator derives its existance from.
  9. Raymond Verbruggen 2014-10-24

    Does anybody have a workaround for this? This one is putting my project on a hold!
  10. John Staunton 2015-02-09

    Any update on this one? It's marked as a duplicate of TIMOB-18482 which is currently stopping me from being able to compile the code... i.e. stopping any updates to the production app. Any workaround / any fix for this?
  11. Ingo Muschenetz 2015-02-09

    [~john.staunton] This ticket is marked for an upcoming release. If you need additional assistance, please contact the support personel in charge of your account and they can give you a better ETA or escalate it appropriately. Are there pieces of your code base or resource files that you could run through a minifier?
  12. John Staunton 2015-02-09

    Ingo Muschenetz, thanks for the update. I'll contact the support personnel for our account as we need this ASAP - currently I cannot create a production / Android app store build. We've tried using a minifier for parts of our code, and are also using the minifier in Titanium...no change in outcome however.
  13. Raymond Verbruggen 2015-02-09

    Simply shift the fix from 3.6 to 4.1? I am already waiting from october; postponing release of my app because of this. Why putting a lot of effort in new releases with new functionality when such bugs are still in which affect existing apps / customers? Please provide a decent fix or at least a proper workaround...
  14. Ingo Muschenetz 2015-02-09

    [~ray@raymondverbruggen.nl] 3.6 became 4.0. As mentioned above, please contact your support representative for assistance with this issue.
  15. John Staunton 2015-02-10

    So if we translate that to plain-speak: "we're not going to bother giving you an update and will keep giving ourselves the freedom to shift this issue to any release we so desire. Critical bugs that stop publication of apps are not a priority for us... we'd rather release new functionality".
  16. Ingo Muschenetz 2015-02-10

    [~john.staunton] That is not what I said at all. I was merely indicating that the releases are closer than the numbering would suggest. Again, please let me know your salesforce ticket number where you have brought up this issue and I'll escalate it through our support staff.
  17. John Staunton 2015-02-10

    In that case, my apologies for the misunderstanding. I cannot raise this issue via support - I've tried several times via the website but it seems that my.appcelerator.com is experiencing some bugs of its own... I get logged out on most screens, occasionally get redirected to staging.appcelerator.com and once received the message "Your account has been deactivated, locked or expired, please contact your Zuora representative to reactivate"... so difficult to raise a ticket!
  18. Ingo Muschenetz 2015-02-10

    [~john.staunton] I wasn't able to reproduce what you were seeing, but we also transitioned away from Zuora quite some time ago. I would suggest logging in to support.appcelerator.com. We can take the rest of this offline.
  19. Radamantis Torres-Lechuga 2015-02-10

    [~john.staunton] Can you please let me know your organization and who is your sales representative? I can not find a record in our customers database with your name.
  20. John Staunton 2015-02-11

    Ingo, Radamantis, thanks for reaching out - I saw that this issue has now been assigned to a sprint so that's great news! I'll wait for the update / patch coming from that dev work and hopefully that will resolve things. Thanks for your assistance!
  21. Raymond Verbruggen 2015-04-06

    Please please make this fix available in the upcoming release...
  22. Chris Barber 2015-04-06

    This fix is indeed will be in the 4.0.0.GA release. You can see the updated titanium_prep binaries in GitHub: https://github.com/appcelerator/titanium_mobile/tree/4_0_X/support/android. Note that there were other changes to the binaries that make them incompatible with Titanium SDK 3.X and older. They only work with Titanium SDK 4.0+
  23. Raymond Verbruggen 2015-04-06

    Thank you so much guys! Many thanks!
  24. Lee Morris 2017-03-31

    Closing ticket as fixed, if there are any problems, please file a new ticket.

JSON Source