{ "id": "167371", "key": "TIMOB-24642", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "17608", "name": "Release 6.1.0", "archived": false, "released": true, "releaseDate": "2017-05-26" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2017-05-10T18:53:51.000+0000", "created": "2017-04-28T21:12:02.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [ { "id": "19275", "description": "Patch release for 6.0.x regressions or important fixes", "name": "Release 6.0.3", "archived": false, "released": true, "releaseDate": "2017-03-22" } ], "issuelinks": [], "assignee": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "updated": "2017-05-10T20:32:23.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" }, { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "h5.Description\r\n\r\nWhen 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\r\n\r\nDemo app is at https://www.dropbox.com/s/m4wy91x92gxw63m/demo.zip?dl=0\r\n\r\nI 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 \r\n\r\n{code}\r\n-- Start application log -----------------------------------------------------\r\n[ERROR] ----- Titanium Javascript Runtime Error -----\r\n[ERROR] In /node_modules/foo/lib/foo.js: 3,18\r\n[ERROR] Message: Uncaught Error: require: Could not load module bar\r\n{code}\r\n\r\n\r\nh5.Steps to reproduce\r\n\r\n# Build the attached application for android or iOS\r\n\r\nh5.Actual result\r\n\r\nApp stays hung on the splash screen\r\n\r\nh5.Expected\r\n\r\nApp should load. Currently it throws an error, I believe this is because of another bug in the implementation, will file more tickets accordingly", "attachment": [], "flagged": false, "summary": "TiAPI: Require call in a node_modules directory causes infinite loop", "creator": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "subtasks": [], "reporter": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "environment": "Ti SDK: 6.0.3.GA", "comment": { "comments": [ { "id": "419285", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "master PR: https://github.com/appcelerator/titanium_mobile/pull/9030\r\n6_1_X PR: https://github.com/appcelerator/titanium_mobile/pull/9045\r\n\r\nIf you want to check out the Android implementation easier, use this https://repl.it/HmCE/3\r\n\r\nTesting steps:\r\n\r\n1. Download the test app linked in the ticket description\r\n2. Build the app, it should load to a yellow screen and in the console you should see.\r\n\r\n```\r\n[INFO] boz index.js loaded\r\n[INFO] boo boo.js loaded\r\n[INFO] baz index.js loaded\r\n[INFO] bar bar.js loaded\r\n[INFO] foo lib/foo.js loaded\r\n[INFO] foo index.js loaded\r\n```", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2017-05-08T13:13:42.000+0000", "updated": "2017-05-10T16:26:49.000+0000" }, { "id": "419499", "author": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Passed FR!\r\nNode Version: 6.10.1\r\nNPM Version: 3.10.10\r\nMac OS: 10.12.4\r\nAppc CLI: 6.2.0\r\nAppc CLI NPM: 4.2.9\r\nTitanium SDK version: 6.2.0.v20170510080439, 6.1.0.v20170510103244 (from PR's)\r\nAppcelerator Studio, build: 4.8.1.201612050850\r\nXcode 8.3.2\r\n\r\nFirst 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.\r\n\r\nChanges are seen in the following SDK (hence closing this ticket):\r\n6.1.0.v20170510115828\r\n6.2.0.v20170510122219", "updateAuthor": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-05-10T19:00:14.000+0000", "updated": "2017-05-10T20:31:44.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }