Titanium JIRA Archive
Appcelerator Community (AC)

[AC-732] Android : since 3.2.1 javascript file not loaded in webview on device

GitHub Issuen/a
ResolutionCannot Reproduce
Resolution Date2014-05-04T06:12:40.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
ReporterAdrien NEVEU
AssigneeRitu Agrawal


*Only on my device :* Since SDK 3.2.2 (perhaps since 3.2.1) when I am trying to load a js ressource on an html page loaded by a webview, I am getting the following error in the log: {noformat} [INFO] : I/TiWebChromeClient.console: (main) [50399,84113] Uncaught ReferenceError: Dygraph is not defined (107:file:///android_asset/Resources/graphe/graphe.html) {noformat} +It is working well with the SDK 3.2.0 on my device+ and it is working for all other emulators with all SDK This is the way I load the js file in my html file :
		<script type="text/javascript" src="dygraph-combined.js"></script>
		<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
		<div id="graphdiv" > </div>
			var g = null;
			var Ti = window.parent.Ti;
	      g = new Dygraph(document.getElementById("graphdiv"),"Date,Data\n" 
                                   +"2014-01-20,50\n" +
                                    "2014-01-22,51\n" +


  1. Ritu Agrawal 2014-04-17

    Please provide a simple and fully functional test case to reproduce this issue.
  2. Adrien NEVEU 2014-04-18

    I have found why the application could not load javascript file in the webview: When I am using Titanium Studio to *Run on device*, the JS file next to the HTML file is not copied to the Ressources directory (in the build directory). But when it is *Run on the emulator* the JS file is copied. This bug seems to be there since SDK 3.2.1
  3. Ritu Agrawal 2014-04-22

    It appears related to TIMOB-16607 but it is strange that you are running into this issue only on device and not on simulator. Can you please provide a simple runnable project to reproduce this issue and we would look at it a priority?
  4. Ritu Agrawal 2014-05-04

    Resolving this issue as I cannot reproduce it and the reporter has not provided the requested test case. Would be happy to reopen this ticket once we have the requested information available.

JSON Source