Description
When a module that resides in node_modules requires another module, an infinite loop will occur and the app will never load and will stay hung on the splash screen
Demo app is at
https://www.dropbox.com/s/m4wy91x92gxw63m/demo.zip?dl=0
I believe this only happens on iOS and Android,-I have not got round to trying Windows out yet but reviewing the code it looks like this wont happen.-, Windows does not show this exact behavior, but instead fails with
-- Start application log -----------------------------------------------------
[ERROR] ----- Titanium Javascript Runtime Error -----
[ERROR] In /node_modules/foo/lib/foo.js: 3,18
[ERROR] Message: Uncaught Error: require: Could not load module bar
Steps to reproduce
Build the attached application for android or iOS
Actual result
App stays hung on the splash screen
Expected
App should load. Currently it throws an error, I believe this is because of another bug in the implementation, will file more tickets accordingly
master PR: https://github.com/appcelerator/titanium_mobile/pull/9030 6_1_X PR: https://github.com/appcelerator/titanium_mobile/pull/9045 If you want to check out the Android implementation easier, use this https://repl.it/HmCE/3 Testing steps: 1. Download the test app linked in the ticket description 2. Build the app, it should load to a yellow screen and in the console you should see.
Passed FR! Node Version: 6.10.1 NPM Version: 3.10.10 Mac OS: 10.12.4 Appc CLI: 6.2.0 Appc CLI NPM: 4.2.9 Titanium SDK version: 6.2.0.v20170510080439, 6.1.0.v20170510103244 (from PR's) Appcelerator Studio, build: 4.8.1.201612050850 Xcode 8.3.2 First tested with 6.0.4.GA. The app hangs. I retried with the fix in this PR, and the app launched and displayed a yellow window. FR passed. I tested this on devices iOS 10.3 and Android 7.1.2. Changes are seen in the following SDK (hence closing this ticket): 6.1.0.v20170510115828 6.2.0.v20170510122219