{ "id": "125397", "key": "TIMOB-16311", "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": [], "resolution": null, "resolutiondate": null, "created": "2014-01-24T23:40:10.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [], "versions": [], "issuelinks": [ { "id": "34593", "type": { "id": "10001", "name": "Cloners", "inward": "is cloned into", "outward": "is cloned from" }, "outwardIssue": { "id": "125396", "key": "TIMOB-16310", "fields": { "summary": "iOS: HTML JavaScript files not loading with absolute paths", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "priority": { "name": "Low", "id": "4" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": null, "updated": "2018-02-28T20:04:08.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "h2. Problem description\r\n\r\nWhen loading a HTML page in a WebView that includes a JS file, the JS file is not loaded if the URL is absolute or uses the app:// protocol.\r\n\r\n{code}\r\n[DEBUG] chromium: Unknown chromium error: -6\r\n[INFO] I/TiWebChromeClient.console: (main) [87,87] Uncaught ReferenceError: testTest is not defined (44:file:///android_asset/Resources/lib/html/test.html)\r\n{code}\r\n\r\nBoth \"app://lib/html/js/test.js\" and \"/lib/html/js/test.js\" fail.\r\n\r\nh2. Code to reproduce\r\n\r\n/app.js\r\n{code}\r\nvar win = Ti.UI.createWindow();\r\nvar web = Ti.UI.createWebView({\r\n\tleft: 0,\r\n\tright: 0,\r\n\ttop: 0,\r\n\tbottom: 0,\r\n\turl: '/lib/html/test.html'\r\n});\r\n\r\nwin.add(web);\r\nwin.open();\r\n{code}\r\n\r\n/lib/html/test.html\r\n{code}\r\n\r\n\r\n\r\nTest\r\n\r\n\r\n\r\n\r\n\r\n\r\n{code}\r\n\r\n/lib/html/js/test.js\r\n{code}\r\nfunction testTest() {\r\n\talert('test');\r\n}\r\n{code}\r\n\r\nh2. Steps to reproduce\r\nUsing the code above, build the app for emulator, device or distribution.\r\n\r\nh2. Note\r\nThis is NOT a CLI related bug. The CLI puts the JS file in the correct location.", "attachment": [], "flagged": false, "summary": "Android: HTML JavaScript files not loading with absolute paths", "creator": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "subtasks": [], "reporter": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "environment": null, "comment": { "comments": [ { "id": "325808", "author": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Issue reproduces\r\n\r\nTitanium SDK version 3.4.0 master\r\nTitanium Studio, build: 3.3.0.201407100905\r\nTitanium Command-Line Interface\r\nCLI version 3.3.0, \r\nAndroid device : Motorola Moto G, Android version : 4.4.4\r\n", "updateAuthor": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-26T06:22:41.000+0000", "updated": "2014-09-26T06:22:41.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }