{ "id": "125810", "key": "TIMOB-16379", "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": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2018-05-16T19:45:41.000+0000", "created": "2014-02-04T09:31:06.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "reprod" ], "versions": [ { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "issuelinks": [], "assignee": null, "updated": "2018-08-06T17:37:04.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": "I have following error on Android build of application:\r\n[ERROR] : TiExceptionHandler: (main) [8,127839] ----- Titanium Javascript Runtime Error -----\r\n[ERROR] : TiExceptionHandler: (main) [0,127839] - In alloy/controllers/widgets/article_big.js:3,31\r\n[ERROR] : TiExceptionHandler: (main) [0,127839] - Message: Uncaught TypeError: Object # has no method 'getLoading'\r\n[ERROR] : TiExceptionHandler: (main) [0,127839] - Source: if ($.body && !$.body.getLoading()) {\r\n[ERROR] : V8Exception: Exception occurred at alloy/controllers/widgets/article_big.js:3: Uncaught TypeError: Object # has no method 'getLoading'\r\n\r\nSame code works perfectly on IOS. I'm not sure if it's documentation issue(according to apidoc, getLoading() is supported on android) or if it's\r\nan Titanium SDK problem. \r\n\r\n{code}\r\nvar window = Titanium.UI.createWindow({\r\n title: 'Test',\r\n fullscreen: true,\r\n exitOnClose: true,\r\n backgroundColor: 'white'\r\n});\r\n \r\nvar view = Ti.UI.createView();\r\n \r\nvar webview = Titanium.UI.createWebView({\r\n backgroundColor: 'transparent',\r\n url: '/test.html'\r\n});\r\n \r\nview.add(webview);\r\nwindow.add(view);\r\n \r\nwindow.open();\r\n\r\nalert (\"getLoading: \" + webview.getLoading());\r\n{code}", "attachment": [], "flagged": false, "summary": "Android: getLoading method does not exist on Android and causes a crash", "creator": { "name": "jsobiecki", "key": "jsobiecki", "displayName": "Jarosław Sobiecki", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "jsobiecki", "key": "jsobiecki", "displayName": "Jarosław Sobiecki", "active": true, "timeZone": "Europe/Berlin" }, "environment": "Dev environment: Mac OS \r\nTested on: Android emulator, API Level 18.\r\nTitanium SDK: 3.2.0 GA\r\n", "closedSprints": [ { "id": 1034, "state": "closed", "name": "2018 Sprint 10 SDK", "startDate": "2018-05-07T00:03:21.636Z", "endDate": "2018-05-21T00:03:00.000Z", "completeDate": "2018-05-20T20:54:58.928Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "291322", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Moving this ticket to engineering as I can reproduce this issue with a simple Titanium test case. There are two issues:\r\n\r\n1. getLoading method for a web view does not work for iOS platform. It returns undefined. Q&A thread indicates it to be a long standing issue: http://developer.appcelerator.com/question/135019/titaniumuiwebviewloading-and-getloading\r\n\r\n2. getLoading method for a web view simply crashes on Android platform with the following error:\r\n[ERROR] : TiExceptionHandler: (main) [2015,2075] ----- Titanium Javascript Runtime Error -----\r\n[ERROR] : TiExceptionHandler: (main) [1,2076] - In app.js:20,33\r\n[ERROR] : TiExceptionHandler: (main) [1,2077] - Message: Uncaught TypeError: Object # has no method 'getLoading'\r\n[ERROR] : TiExceptionHandler: (main) [0,2077] - Source: alert (\"getLoading: \" + webview.getLoading());\r\n[ERROR] : V8Exception: Exception occurred at app.js:20: Uncaught TypeError: Object # has no method 'getLoading'\r\n", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-02-05T06:57:52.000+0000", "updated": "2014-02-05T06:57:52.000+0000" }, { "id": "321831", "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, 3.2.0.GA\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-04T16:07:56.000+0000", "updated": "2014-09-04T16:07:56.000+0000" }, { "id": "321834", "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, 3.2.0.GA\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-04T16:10:34.000+0000", "updated": "2014-09-04T16:10:34.000+0000" }, { "id": "422963", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "I am able to reproduce this issue with the following environment;\r\nPixel (7.1)\r\nStudio 4.9.0.201705302345\r\nTi SDK 6.1.1.v20170623141152\r\nAppc NPM 4.2.9\r\nAppc CLI 6.2.1\r\nTi CLI 5.0.13\r\nAlloy 1.9.11\r\nArrow 2.0.0\r\nXcode 8.2 (8C38)\r\n\r\nThis is the what the console outputs;\r\n[ERROR] : TiUIWebView: (main) [369,369] Problem reading from /test.html: Resources/test.html. Will let WebView try loading it directly.\r\n[ERROR] : TiUIWebView: java.io.FileNotFoundException: Resources/test.html\r\n[ERROR] : TiUIWebView: \tat android.content.res.AssetManager.openAsset(Native Method)\r\n[ERROR] : TiUIWebView: \tat android.content.res.AssetManager.open(AssetManager.java:347)\r\n[ERROR] : TiUIWebView: \tat android.content.res.AssetManager.open(AssetManager.java:321)\r\n[ERROR] : TiUIWebView: \tat org.appcelerator.titanium.io.TiResourceFile.getInputStream(TiResourceFile.java:77)\r\n[ERROR] : TiUIWebView: \tat ti.modules.titanium.ui.widget.webview.TiUIWebView.setUrl(TiUIWebView.java:537)\r\n[ERROR] : TiUIWebView: \tat ti.modules.titanium.ui.widget.webview.TiUIWebView.processProperties(TiUIWebView.java:428)\r\n[ERROR] : TiUIWebView: \tat org.appcelerator.kroll.KrollProxy.setModelListener(KrollProxy.java:1173)\r\n[ERROR] : TiUIWebView: \tat org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:513)\r\n[ERROR] : TiUIWebView: \tat org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:504)\r\n[ERROR] : TiUIWebView: \tat org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:482)\r\n[ERROR] : TiUIWebView: \tat org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:520)\r\n[ERROR] : TiUIWebView: \tat org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:504)\r\n[ERROR] : TiUIWebView: \tat org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:482)\r\n[ERROR] : TiUIWebView: \tat org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:520)\r\n[ERROR] : TiUIWebView: \tat org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:504)\r\n[ERROR] : TiUIWebView: \tat org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:482)\r\n[ERROR] : TiUIWebView: \tat org.appcelerator.titanium.proxy.TiViewProxy.handleAdd(TiViewProxy.java:692)\r\n[ERROR] : TiUIWebView: \tat org.appcelerator.titanium.proxy.TiViewProxy.add(TiViewProxy.java:585)\r\n[ERROR] : TiUIWebView: \tat ti.modules.titanium.ui.WindowProxy.windowCreated(WindowProxy.java:261)\r\n[ERROR] : TiUIWebView: \tat org.appcelerator.titanium.TiActivityWindows.windowCreated(TiActivityWindows.java:33)\r\n[ERROR] : TiUIWebView: \tat org.appcelerator.titanium.TiBaseActivity.windowCreated(TiBaseActivity.java:562)\r\n[ERROR] : TiUIWebView: \tat org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:676)\r\n[ERROR] : TiUIWebView: \tat org.appcelerator.titanium.TiActivity.onCreate(TiActivity.java:21)\r\n[ERROR] : TiUIWebView: \tat android.app.Activity.performCreate(Activity.java:6679)\r\n[ERROR] : TiUIWebView: \tat android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)\r\n[ERROR] : TiUIWebView: \tat android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2618)\r\n[ERROR] : TiUIWebView: \tat android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2726)\r\n[ERROR] : TiUIWebView: \tat android.app.ActivityThread.-wrap12(ActivityThread.java)\r\n[ERROR] : TiUIWebView: \tat android.app.ActivityThread$H.handleMessage(ActivityThread.java:1477)\r\n[ERROR] : TiUIWebView: \tat android.os.Handler.dispatchMessage(Handler.java:102)\r\n[ERROR] : TiUIWebView: \tat android.os.Looper.loop(Looper.java:154)\r\n[ERROR] : TiUIWebView: \tat android.app.ActivityThread.main(ActivityThread.java:6119)\r\n[ERROR] : TiUIWebView: \tat java.lang.reflect.Method.invoke(Native Method)\r\n[ERROR] : TiUIWebView: \tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)\r\n[ERROR] : TiUIWebView: \tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)\r\n[WARN] : cr_media: Requires BLUETOOTH permission\r\n[ERROR] : libEGL: validate_display:99 error 3008 (EGL_BAD_DISPLAY)\r\n[WARN] : VideoCapabilities: Unrecognized profile 2130706433 for video/avc\r\n[WARN] : VideoCapabilities: Unrecognized profile 2130706434 for video/avc\r\n[INFO] : VideoCapabilities: Unsupported profile 4 for video/mp4v-es\r\n[INFO] : OpenGLRenderer: Initialized EGL, version 1.4\r\n[ERROR] : AndroidProtocolHandler: Unable to open asset URL: file:///android_asset/Resources/test.html\r\n[WARN] : cr_BindingManager: Cannot call determinedVisibility() - never saw a connection for the pid: 6824\r\n[INFO] : APSAnalyticsService: Analytics Service Started\r\n[INFO] : APSAnalyticsService: Stopping Analytics Service", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-06-27T18:22:29.000+0000", "updated": "2017-06-27T18:22:29.000+0000" }, { "id": "437708", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "The \"loading\" property (and its getter) is iOS-only, see [the docs|https://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.WebView-property-loading] for details.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-05-16T19:45:41.000+0000", "updated": "2018-05-16T19:45:41.000+0000" }, { "id": "439933", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing as invalid. If incorrect, please reopen.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-08-06T17:37:04.000+0000", "updated": "2018-08-06T17:37:04.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }