Description
When using Hyperloop with appc-sourcecode-encryption-policy enabled, Hyperloop requires fail to load.
Steps to reproduce
1. Add
<property name="appc-sourcecode-encryption-policy">remote</property>
to a hyperloop-examples project that is registered with the platform
2. Build to Android
Actual
App will error on a Hyperloop require like below
[ERROR] TiExceptionHandler: Error: Requested module not found: android.provider.Settings
[ERROR] TiExceptionHandler: at Module.require (ti:/module.js:297:8)
[ERROR] TiExceptionHandler: at Module.global.Module.require (<embedded>:5051:34)
Expected
No error should occur
The real issue is that
\*.bootstrap.js
scripts are not being executed on app startup when remote policy encryption is used. This is an issue with our "ti.playserivces" module. It's bootstrap script isn't being loaded on startup and it is used to check/update Google Play Services on the device if needed before running the "app.js". This step is being skipped due to this remote policy issue.I've isolated the issue. The problem is that our
File.exists()
method returnsfalse
for remote-policy encrypted files. This is preventing Titanium from loading our "bootstrap.json" file. Theread()
method works fine. It's just a file existence check issue. https://github.com/appcelerator/titanium_mobile/blob/master/common/Resources/ti.internal/bootstrap.loader.js#L33 I can see the same issue when doing the below. The below will returnfalse
when checking if the "app.js" exists, which of course isn't true.PR (master): https://github.com/appcelerator/titanium_mobile/pull/12336
merged to master for 10.0.0 target, back port PRs for 9_3_X and 9_2_X are in progress for 9.3.0 GA target and maintenance branch build target.
backport PRs for 9.3.0 GA target and 9_2_X branches have been merged/landed.