{ "id": "129861", "key": "AC-1708", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2014-05-04T05:30:59.000+0000", "created": "2014-05-01T16:08:08.000+0000", "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2016-03-08T07:38:12.000+0000", "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" } }, "components": [ { "id": "14544", "name": "Alloy", "description": "Please enter tickets related to the Alloy here." }, { "id": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "When in airplane mode, the error callback of a request is not triggered after the pre-determined timeout.\r\nAll other network errors triggers the callback normally.\r\n\r\nSteps to reproduce:\r\n\r\n1) turn airplane mode on\r\n\r\n2) Execute:\r\n\r\n var url = \"http://www.appcelerator.com\";\r\n var client = Ti.Network.createHTTPClient({\r\n // function called when the response data is available\r\n onload : function(e) {\r\n Ti.API.info(\"Received text: \" + this.responseText);\r\n alert('success');\r\n },\r\n // function called when an error occurs, including a timeout\r\n onerror : function(e) {\r\n Ti.API.debug(e.error);\r\n alert('error');\r\n },\r\n timeout : 5000 // in milliseconds\r\n });\r\n // Prepare the connection.\r\n client.open(\"GET\", url);\r\n // Send the request.\r\n client.send();\r\n\r\nFYI: I was able to overcome this problem testing before sending the request if I had network available with Ti.Network.online, BUT, from I assume (if I'm wrong please forgive me) would be the correct behavior even if I don't test the network, the error callback should always be called after the pre-determined time.", "attachment": [], "flagged": false, "summary": "Http client request timeout never called when in airplane mode", "creator": { "name": "alvesl", "key": "alvesl", "displayName": "Lucas Alves", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "alvesl", "key": "alvesl", "displayName": "Lucas Alves", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "3.2.2GA, iOS SDK 7.1", "comment": { "comments": [ { "id": "303285", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I tried your test case and it displays the error alert correctly in airplane mode. I tested it on a 7.1.0 simulator as well as device. What is the behavior in case of airplane mode?", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-05-02T05:38:32.000+0000", "updated": "2014-05-02T05:38:32.000+0000" }, { "id": "303294", "author": { "name": "alvesl", "key": "alvesl", "displayName": "Lucas Alves", "active": true, "timeZone": "America/Los_Angeles" }, "body": "For me it didn't fire the callback. Leave it open for now, please. I''l look into it again and get back to you.", "updateAuthor": { "name": "alvesl", "key": "alvesl", "displayName": "Lucas Alves", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-05-02T15:14:50.000+0000", "updated": "2014-05-02T15:14:50.000+0000" }, { "id": "303298", "author": { "name": "alvesl", "key": "alvesl", "displayName": "Lucas Alves", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Ok, so I was able to confirm that indeed the callback is fired when testing on the device. The problem still remains in my emulator, which right now seems a lot more buggy than just that. In fact, the airplane mode doesn't seem to be doing anything at all now. I can still make requests, use the internet, etc. even if I turn off wifi.\r\nI cannot find the airplane mode on 'General settings', only when I pull the settings panel from the bottom, but switching airplane mode there does not change the icon on the menu bar. Is airplane mode supposed to behavior nicely on the emulator?\r\n", "updateAuthor": { "name": "alvesl", "key": "alvesl", "displayName": "Lucas Alves", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-05-02T15:32:26.000+0000", "updated": "2014-05-02T15:32:26.000+0000" }, { "id": "303411", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "The best way to simulate airplane mode on an emulator is to turn off your machine's network connection. Callback was fired correctly when I turned off network completely. \r\n\r\nResolving this ticket as \"Cannot reproduce\" but we would be happy to reopen it if you can provide a consistent set of steps to reproduce this issue.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-05-04T05:30:51.000+0000", "updated": "2014-05-04T05:30:51.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }