{ "id": "87978", "key": "TIMOB-8022", "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": "10100", "description": "This issue won't be actioned.", "name": "Won't Do" }, "resolutiondate": "2020-01-09T21:42:11.000+0000", "created": "2012-03-14T15:46:54.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "parity", "reprod" ], "versions": [ { "id": "12593", "name": "Release 2.0.0", "archived": false, "released": true, "releaseDate": "2012-03-30" }, { "id": "13070", "description": "Release 1.8 Service Pack 2", "name": "Release 1.8.2", "archived": true, "released": true, "releaseDate": "2012-02-29" }, { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" } ], "issuelinks": [ { "id": "15763", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "87972", "key": "TIMOB-8018", "fields": { "summary": "Android: WebView: beforeload event fires twice if url is invalid", "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": "Low", "id": "4" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "15762", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "87977", "key": "TIMOB-8021", "fields": { "summary": "Android: WebView: error event not fired when invalid url loaded", "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": "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": "2020-01-09T21:42:11.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": "When an invalid url is loaded from a webview, a load event is fired instead of an error event.\r\n\r\nAn error event is fired in iOS, with no load event.\r\n\r\nSteps to Reproduce:\r\n\r\n1. Run code, click 'Open Invalid URL'.\r\n\r\n{code:title=app.js}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor:'blue'\r\n});\r\n\r\nvar buttonGoogle = Ti.UI.createButton({\r\n\ttitle:'Open Google',\r\n\ttop:'20%',\r\n\theight:'30%',\r\n\tleft:'10%',\r\n\tright:'10%'\r\n});\r\n\r\nbuttonGoogle.addEventListener('click', function(){\r\n\tvar webView = Ti.UI.createWebView({\r\n\t\t\turl:'http://www.google.com'\r\n\t\t});\r\n\t\r\n\twebView.addEventListener('load', function(){\r\n\t\talert('load: ' + webView.url);\r\n\t\t});\r\n\t\r\n\twebView.addEventListener('beforeload', function(){\r\n\t\talert('beforeload: ' + webView.url);\r\n\t\t});\r\n\t\t\r\n\twebView.addEventListener('error', function(){\r\n\t\talert('error: ' + webView.url);\r\n\t\t});\r\n\t\t\r\n\twin.add(webView);\r\n\t\r\n\tvar button = Ti.UI.createButton({\r\n\t\ttitle:'Close',\r\n\t\tright:0,\r\n\t\tbottom:0,\r\n\t\theight:'10%',\r\n\t\twidth:'20%'\r\n\t});\r\n\t\r\n\tbutton.addEventListener('click', function(){\r\n\t\twin.remove(webView);\r\n\t});\r\n\t\r\n\twebView.add(button);\r\n});\r\n\r\nwin.add(buttonGoogle);\r\n\r\nvar buttonInvalid = Ti.UI.createButton({\r\n\ttitle:'Open Invalid URL',\r\n\tbottom:'20%',\r\n\theight:'30%',\r\n\tleft:'10%',\r\n\tright:'10%'\r\n});\r\n\r\nbuttonInvalid.addEventListener('click', function(){\r\n\tvar webView = Ti.UI.createWebView({\r\n\t\t\turl:'http://xxx'\r\n\t\t});\r\n\t\r\n\twebView.addEventListener('load', function(){\r\n\t\talert('load: ' + webView.url);\r\n\t\t});\r\n\t\r\n\twebView.addEventListener('beforeload', function(){\r\n\t\talert('beforeload: ' + webView.url);\r\n\t\t});\r\n\t\t\r\n\twebView.addEventListener('error', function(){\r\n\t\talert('error: ' + webView.url);\r\n\t\t});\r\n\t\t\r\n\twin.add(webView);\r\n\t\r\n\tvar button = Ti.UI.createButton({\r\n\t\ttitle:'Close',\r\n\t\tright:0,\r\n\t\tbottom:0,\r\n\t\theight:'10%',\r\n\t\twidth:'20%'\r\n\t});\r\n\t\r\n\tbutton.addEventListener('click', function(){\r\n\t\twin.remove(webView);\r\n\t});\r\n\t\r\n\twebView.add(button);\r\n});\r\n\r\nwin.add(buttonInvalid);\r\n\r\nwin.open();\r\n{code}\r\n\r\nExpected Result:\r\n\r\nOne error event should fire.\r\n\r\nActual Result:\r\n\r\nTwo load events fire.", "attachment": [], "flagged": false, "summary": "Android: WebView: load event is fired when an invalid url is loaded instead of an error event", "creator": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "SDK: 1.8.2 githash=59b3a90s, 2.0.0.v20120314120250\r\nAndroid: V8, Rhino\r\nStudio: 2.0.0.201203121914\r\nOS: Snow Leopard\r\nDevices Tested: GSlate 3.1, Galaxy Nexus 4.0.2", "comment": { "comments": [ { "id": "240139", "author": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "body": "The problem can reproduce with release 3.0.2 and master release 3.1.0\r\nBoth 'load' alert and 'beforeload' alert are repeat twice.\r\n\r\n\r\n\r\nTitanium Studio, build: 2.1.2.201208301612\r\nTitanium SDK version: 3.1.0 (28/02/2013)\r\nTitanium SDK version: 3.0.2 (28/02/2013)\r\nDevice: Samsung galaxy s duos Android version: 4.0.4 \r\n", "updateAuthor": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-02-28T11:44:04.000+0000", "updated": "2013-02-28T11:47:22.000+0000" }, { "id": "424017", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "I am able to reproduce this issue, both loads events fire and also the error event fires with the following environment;\r\nPixel (7.1)\r\nStudio 4.9.0.201705302345\r\nTi SDK 6.1.1 GA\r\nAppc NPM 4.2.9\r\nAppc CLI 6.2.2\r\nTi CLI 5.0.14\r\nAlloy 1.9.11\r\nXcode 8.2 (8C38)\r\nNode v4.8.2\r\nJava 1.8.0_131", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-07-12T18:49:00.000+0000", "updated": "2017-07-12T18:49:00.000+0000" }, { "id": "453604", "author": { "name": "ahutton", "key": "ahutton", "displayName": "Alan Hutton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "It has been decided that this issue should be closed as “Won’t do.” This issue is out of date with our current supported SDK release (7.5.2.GA as of the date of closure), and out of date with mobile OS versions. \r\n\r\nIf community members feel that the issue is still valid, please create a new ticket. Please reference this closed ticket number, include SDK used, comments, and code that demonstrates/reproduces the issue.", "updateAuthor": { "name": "ahutton", "key": "ahutton", "displayName": "Alan Hutton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-01-09T21:42:11.000+0000", "updated": "2020-01-09T21:42:11.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }