[TIMOB-27266] Titanium "Failed to encrypt JavaScript files" error on >=8.0.1.GA on Windows when using 32 bit java
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2019-08-28T11:11:28.000+0000 |
Affected Version/s | Release 8.0.1, Release 8.0.2 |
Fix Version/s | Release 8.1.1 |
Components | CLI |
Labels | Titanium, engReviewed, regression |
Reporter | Yahya Uddin |
Assignee | Ewan Harris |
Created | 2019-07-20T23:10:26.000+0000 |
Updated | 2019-08-28T11:11:28.000+0000 |
Description
There is a bug on Titanium 8.0.1.GA & 8.0.2.GA, where when running a simple compile:
ti run -p android -T device
Gives the error:
[INFO] Encrypting JavaScript files: C:\ProgramData\Titanium\mobilesdk\win32\8.0.1.GA\android\titanium_prep.win32.exe "com.example.sandbox" "C:\path\to\project\build\android\assets" "--file-listing" "C:\path\to\project\build\android\titanium_prep_listing.txt"
[ERROR] Failed to encrypt JavaScript files
[ERROR]
I narrowed down the issue to changes made to *titanium_prep.win32.exe*.
Looking at the history:
https://github.com/appcelerator/titanium_mobile/commits/master/support/android/titanium_prep.win32.exe
It seems that one of the 2 commits to be blamed are:
https://github.com/appcelerator/titanium_mobile/commit/3eaf55c596402078321632c682549428b7c57371#diff-81660f9ac67f928cddca3a1e35855580
or
https://github.com/appcelerator/titanium_mobile/commit/86b3fc01230a0ec09c0b2577a3e68c1e488e48b1#diff-81660f9ac67f928cddca3a1e35855580
A temp workaround is to copy the *titanium_prep.win32.exe* and *titanium_prep.win64.exe* from 8.0.0.GA and replace the ones in the newer 8.0.1.GA or 8.0.2.GA.
Hello, Thanks for sharing with us. Can you please create a new app, run this on 8.0.2.GA and let us know how it goes.
Yes this occured on a hello world app for version 8.0.2.GA as well. But copying over the *titanium_prep.win32.exe* from an older version fixed the issue
Thanks for the report [~yahya12], I can reproduce this and it looks to be specific to using 32 bit Java
[~rmitro], they appear to be using 64-bit java based off their log, could we have a new ticket for that issue with full logs from the build. [~nsalahin], I don't believe we have any updates currently. If possible we would recommend the user to move to a 64bit java is possible.
titanium_prep: https://github.com/appcelerator/titanium_prep/pull/35
titanium_mobile master: https://github.com/appcelerator/titanium_mobile/pull/11136 I'm not sure where else we want this to land, it's a regression from 8.0.1.GA onwards
8_1_X: https://github.com/appcelerator/titanium_mobile/pull/11155 8_3_X: https://github.com/appcelerator/titanium_mobile/pull/11159
Note for this ticket, we made our default settings for d8 and javac max memory incompatible with 32-bit java in TIMOB-26898. If you absolutely must use Java 8 32 bit (Java 9+ is 64 bit only), you must set the following.
Using the instructions mentioned by Ewan above I am able to verify the fix on SDK Version 8.2.0.v20190819090550. FR Also passed for 8_1_X and 8_3_X.
Merged to master and 8_3_X. Waiting on rebuild for 8_1_X...
Merged to 8_1_X
Using the above instructions also able to verify the fix on SDK version
8.1.1.v20190827142754
and SDK version8.2.0.v20190819090550
*Test and other information can be found at:* Master: https://github.com/appcelerator/titanium_mobile/pull/11136 8_1_X: https://github.com/appcelerator/titanium_mobile/pull/11155 8_3_X: https://github.com/appcelerator/titanium_mobile/pull/11159