{ "id": "122989", "key": "TIMOB-15896", "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": "15972", "description": "Release 3.4.0", "name": "Release 3.4.0", "archived": false, "released": true, "releaseDate": "2014-09-28" } ], "resolution": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2014-09-07T22:06:30.000+0000", "created": "2013-11-27T15:09:20.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "android", "defect", "evaljs", "javascript", "webview" ], "versions": [ { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "issuelinks": [ { "id": "40896", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "outwardIssue": { "id": "136051", "key": "TIMOB-17613", "fields": { "summary": "Unable to execute javascript code using evalJS on Android with SDK 3.3.0.GA", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "37019", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "129201", "key": "AC-1356", "fields": { "summary": "Android Webview load event does not work", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "39436", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "133366", "key": "AC-1157", "fields": { "summary": "WebView.evalJS times out / throws 'Unexpected token' error", "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" } }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-22T23:10:10.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" } ], "description": "Since API 17, any WebView that intends to expose a Javascript object must decorate methods with the @JavascriptInterface annotation, as described [here|http://developer.android.com/guide/webapps/webview.html].\r\n\r\nThe [TiReturn class|https://github.com/appcelerator/titanium_mobile/blob/master/android/modules/ui/src/java/ti/modules/titanium/ui/widget/webview/TiWebViewBinding.java#L174] does not use this annotation which is why I believe that any evalJS call simply returns null and outputs:\r\n\r\nbq. W/TiWebViewBinding( 3268): (KrollRuntimeThread) Timeout waiting to evaluate JS", "attachment": [], "flagged": false, "summary": "WebView's evalJS method times out on Android API >= 17", "creator": { "name": "nunofgs", "key": "nunofgs", "displayName": "Nuno Sousa", "active": true, "timeZone": "Europe/London" }, "subtasks": [], "reporter": { "name": "nunofgs", "key": "nunofgs", "displayName": "Nuno Sousa", "active": true, "timeZone": "Europe/London" }, "environment": "Android with any API >= 17\r\n3.2.0GA", "comment": { "comments": [ { "id": "282352", "author": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "Tested this issue with code below and reproduced the error.\r\n\r\nh5. Testing Environment: \r\n\r\nOS: MAC OS X 10.8.5\r\nTi SDK: 3.1.3 GA ,3.2.0.x\r\nTi CLI: 3.3.0\r\nAndroid Device 4.2.2\r\nAndroid SDK 4.4\r\n\r\nh5. Test Code \r\n\r\n\r\n{code}\r\nTitanium.UI.setBackgroundColor('#000');\r\n\r\nvar win1 = Titanium.UI.createWindow({\r\n\ttitle : 'Tab 1',\r\n\tbackgroundColor : '#fff',\r\n\tnavBarHidden : true\r\n});\r\n\r\nvar webview = Titanium.UI.createWebView({\r\n\turl : 'pass.html'\r\n});\r\nwin1.add(webview);\r\n\r\nvar str = \"Hello world!\";\r\nwebview.evalJS(\"var message='\" + str + \"';\");\r\n\r\nwin1.open();\r\n\r\n{code}\r\n\r\npass.html\r\n\r\n\r\n{code}\r\n\r\n\r\n\r\n\t\r\n\t\t\r\n\r\n\t\r\n\r\n\t\r\n\t\t\r\n\r\n\t\r\n\r\n{code}\r\n\r\nh5. Logs\r\n\r\n{code}\r\n\r\nERROR][WindowManager( 386)] Starting window AppWindowToken{b3129128 token=Token{b2fd9658 ActivityRecord{b2fa2a88 u0 com.mrtechnologybd.smartmeter/.QnaActivity t2}}} timed out\r\n[WARN][V8Object( 1508)] Runtime disposed, cannot set property 'userAgent'\r\n[INFO][dalvikvm-heap( 1508)] Grow heap (frag case) to 4.767MB for 1536016-byte allocation\r\n[ERROR][NetdConnector( 386)] NDC Command {65 bandwidth gettetherstats} took too long (761ms)\r\n[WARN][WebViewProxy( 1508)] (KrollRuntimeThread) [6235,6235] WebView not available, returning null for evalJS result.\r\n[WARN][linker ( 1508)] libtiverify.so has text relocations. This is wasting memory and is a security risk. Please fix.\r\n[INFO][TiRootActivity( 1508)] (main) [0,0] checkpoint, on root activity resume. activity = com.mrtechnologybd.smartmeter.QnaActivity@b2e02388\r\n[INFO][ActivityManager( 386)] START u0 {cmp=com.mrtechnologybd.smartmeter/org.appcelerator.titanium.TiActivity (has extras)} from pid 1508\r\n[INFO][Choreographer( 1508)] Skipped 43 frames! The application may be doing too much work on its main thread.\r\n[WARN][ActivityManager( 386)] Activity pause timeout for ActivityRecord{b2fa2a88 u0 com.mrtechnologybd.smartmeter/.QnaActivity t2}\r\n[INFO][Choreographer( 1508)] Skipped 144 frames! The application may be doing too much work on its main thread.\r\n[INFO][LatinIME]LogUtils( 543): Dictionary info: dictionary = UserHistoryDictionary.en_US.dic ; version = ? ; date = 1386135904\r\n[INFO][chromium( 1508)] [INFO:library_loader_hooks.cc(112)] Chromium logging enabled: level = 0, default verbosity = 0\r\n[INFO][BrowserProcessMain( 1508)] Initializing chromium process, renderers=0\r\n[INFO][PerformBackupTask( 386)] Initializing (wiping) backup state and transport storage\r\n[WARN][chromium( 1508)] [WARNING:proxy_service.cc(888)] PAC support disabled because there is no system implementation\r\n[ERROR][chromium( 1508)] [ERROR:gl_surface_egl.cc(153)] No suitable EGL configs found.\r\n[ERROR][chromium( 1508)] [ERROR:gl_surface_egl.cc(620)] GLSurfaceEGL::InitializeOneOff failed.\r\n[ERROR][chromium( 1508)] [ERROR:gl_surface_egl.cc(153)] No suitable EGL configs found.\r\n[ERROR][chromium( 1508)] [ERROR:gl_surface_egl.cc(620)] GLSurfaceEGL::InitializeOneOff failed.\r\n[ERROR][chromium( 1508)] [ERROR:gpu_info_collector.cc(86)] gfx::GLSurface::InitializeOneOff() failed\r\n[INFO][Choreographer( 386)] Skipped 30 frames! The application may be doing too much work on its main thread.\r\n[ERROR][PerformBackupTask( 386)] Error invoking for backup on @pm@\r\n[INFO][PerformBackupTask( 386)] Backup pass finished.\r\n[ERROR][PerformBackupTask( 386)] Duplicate finish\r\n{code}\r\nThanks ", "updateAuthor": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-12-04T05:55:02.000+0000", "updated": "2013-12-05T05:20:23.000+0000" }, { "id": "314774", "author": { "name": "gertjans", "key": "gertjans", "displayName": "Gertjan Smits", "active": true, "timeZone": "Europe/Berlin" }, "body": "Is this still on the radar? The issue still exists in SDK 3.3.0.GA.", "updateAuthor": { "name": "gertjans", "key": "gertjans", "displayName": "Gertjan Smits", "active": true, "timeZone": "Europe/Berlin" }, "created": "2014-07-18T07:54:59.000+0000", "updated": "2014-07-18T07:54:59.000+0000" }, { "id": "316366", "author": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "updateAuthor": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "created": "2014-07-31T00:26:44.000+0000", "updated": "2014-07-31T00:26:44.000+0000" }, { "id": "321811", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Has anyone tried adding the appropriate annotation to the class noted to see if that resolves the issue for them?", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-04T13:45:50.000+0000", "updated": "2014-09-04T13:45:50.000+0000" }, { "id": "322238", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Resolving as duplicate of linked issue.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-07T22:06:30.000+0000", "updated": "2014-09-07T22:06:30.000+0000" }, { "id": "415220", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as duplicate as the relevant ticket is linked above.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-22T23:10:10.000+0000", "updated": "2017-03-22T23:10:10.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }