[TIMOB-16077] Android: Large amounts of JavaScript breaks encryption process
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2015-03-26T00:00:38.000+0000 |
Affected Version/s | Release 3.2.0, Release 3.5.0 |
Fix Version/s | Release 4.0.0 |
Components | Android, CLI |
Labels | n/a |
Reporter | Ingo Muschenetz |
Assignee | Ingo Muschenetz |
Created | 2013-12-24T22:32:48.000+0000 |
Updated | 2017-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
File | Date | Size |
---|---|---|
app.js.17,695 bytes | 2013-12-30T21:06:27.000+0000 | 17695 |
app.js.524,290 bytes | 2013-12-30T21:06:27.000+0000 | 524290 |
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.
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:
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.
Hi Zac--We are working on this issue and have scheduled it for as soon a release as possible.
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
Zac, we have it scheduled for the next patch release which is prior to June. If we can fix it before then, we will.
[~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".
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.
Does anybody have a workaround for this? This one is putting my project on a hold!
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?
[~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?
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.
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...
[~ray@raymondverbruggen.nl] 3.6 became 4.0. As mentioned above, please contact your support representative for assistance with this issue.
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".
[~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.
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!
[~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.
[~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.
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!
Please please make this fix available in the upcoming release...
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+
Thank you so much guys! Many thanks!
Closing ticket as fixed, if there are any problems, please file a new ticket.