{ "id": "165431", "key": "TIMOB-24336", "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": "17608", "name": "Release 6.1.0", "archived": false, "released": true, "releaseDate": "2017-05-26" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2017-01-25T04:06:07.000+0000", "created": "2017-01-23T04:42:11.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [ { "id": "17608", "name": "Release 6.1.0", "archived": false, "released": true, "releaseDate": "2017-05-26" } ], "issuelinks": [], "assignee": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-01-25T19:16:43.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": "12642", "name": "Windows", "description": "Windows authoring support" } ], "description": "{{Ti.Nework.Socket.TCP}} doesn't invoke {{error}} callback on {{connect()}} when it fails to connect to the server. App crashes instead.\r\n\r\nSteps to reproduce: Run following code when server isn't up.\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow();\r\n\r\nvar lbl = Ti.UI.createLabel({\r\n text: 'TCP Test'\r\n});\r\nwin.add(lbl);\r\n\r\nwin.addEventListener('open', function () {\r\n var socket = Ti.Network.Socket.createTCP({\r\n host: '192.168.x.xx',\r\n port: 6262,\r\n timeout: 3000,\r\n connected: function (e) {\r\n console.log(\"[TEST] connected\");\r\n },\r\n error: function (e) {\r\n socket = null;\r\n alert(\"[TEST] socket error\");\r\n console.error(e);\r\n }\r\n });\r\n\r\n console.log(\"[TEST] open connection\");\r\n socket.connect();\r\n});\r\n\r\nwin.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "Windows: App crashes when Ti.Network.Socket.TCP fails to connect", "creator": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "environment": null, "closedSprints": [ { "id": 796, "state": "closed", "name": "2017 Sprint 02 SDK", "startDate": "2017-01-15T00:00:41.845Z", "endDate": "2017-01-29T00:00:00.000Z", "completeDate": "2017-01-30T21:10:44.640Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "405164", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "master: https://github.com/appcelerator/titanium_mobile_windows/pull/933", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-01-24T12:17:32.000+0000", "updated": "2017-01-24T12:17:32.000+0000" }, { "id": "405291", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified fix, {{Error}} callback is now invoked when the app fails to connect to the server and the App no longer crashes. \r\nThis was tested with the test coded provided by [~gmathews] in https://github.com/appcelerator/titanium_mobile_windows/pull/933. \r\n\r\n*Environment*\r\n{code:java}\r\nLumia 640 LTE (RM-1073) (OS Build 10.0.14393.693)\r\nOperating System\r\nName = Microsoft Windows 10 Pro\r\nVersion = 10.0.14393\r\nArchitecture = 64bit\r\n# CPUs = 4\r\nMemory = 17034395648\r\n \r\nNode.js\r\nNode.js Version = 4.6.0 \r\nnpm Version = 2.11.3\r\n \r\nTitanium SDK\r\nSDK Version = 6.1.0.v20170125103400\r\n{code}\r\n", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-01-25T19:16:25.000+0000", "updated": "2017-01-25T19:16:25.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }