{ "id": "87977", "key": "TIMOB-8021", "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:41:48.000+0000", "created": "2012-03-14T15:43:00.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": "16602", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "83242", "key": "TIMOB-6387", "fields": { "summary": "iOS: The Webview's \"error\" event is not handled properly and cause crash.", "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": "15764", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "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" }, "inwardIssue": { "id": "87978", "key": "TIMOB-8022", "fields": { "summary": "Android: WebView: load event is fired when an invalid url is loaded instead of an error event", "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:41:48.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, no error event is generated.\r\n\r\nAn error event is generated in iOS.\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\nNo error events fire.", "attachment": [], "flagged": false, "summary": "Android: WebView: error event not fired when invalid url loaded", "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": "241723", "author": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "body": "'Error' alert fired only once but 'beforeload' alert fired 2 or 3 times inconsistently.\r\nWhen click on 'inavalid URL', observed steps\r\n\r\n1.load alert fired\r\n2.load alert fired again\r\n3. beforeload alert\r\n4.error alert\r\n5. beforeload alert\r\n\r\n beforeload alert repeatedly fired instead of once.\r\n\r\n\r\nThe problem reproduce with release 3.0.2 and master release 3.1.0\r\n\r\ntested on\r\n\r\nTitanium Studio, build: 3.0.1.201212181159\r\nTitanium SDK version: 3.1.0 \r\nTitanium SDK version: 3.0.2 \r\nDevice: Samsung galaxy s duos Android version: 4.0.4\r\nAndroid Emulator: Android SDK version: 2.2", "updateAuthor": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-12T10:30:32.000+0000", "updated": "2013-03-12T10:44:37.000+0000" }, { "id": "424019", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "These are the observations I have made;\r\n1. beforeload fires\r\n2. load fires\r\n3. error fires\r\n4. beforeload fires\r\n\r\nWith 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:52:11.000+0000", "updated": "2017-07-12T18:52:11.000+0000" }, { "id": "453603", "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:41:48.000+0000", "updated": "2020-01-09T21:41:48.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }