{ "id": "171379", "key": "TIMOB-25907", "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": null, "resolutiondate": null, "created": "2018-03-22T18:53:34.000+0000", "priority": null, "labels": [ "engSchedule", "ios", "simulator", "titanium" ], "versions": [], "issuelinks": [], "assignee": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2019-06-25T15:37:44.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [], "description": "Just create the sample hello world app in appcelerator and use the code below in the index.js file.\r\n\r\n\r\n\r\n{code:java}\r\nfunction doClick(e) {\r\n\tconsole.info('Ti.Network.online: ' + Ti.Network.getOnline());\r\n\tif (Ti.Network.getOnline()) alert($.label.text);\r\n}\r\n$.index.open();\r\n{code}\r\n\r\n\r\n\r\nStart the app in an iOS simulator, click 'Hello, World'. The alert should pop up. Then turn off your wifi on your computer, the alert shouldn't pop up. Then turn your wifi back on. If the console.info is uncommented then the alert will work properly. If there is no console then the alert will not pop up.", "attachment": [], "flagged": false, "summary": "Ti.Network.getOnline() messed up unless consoled before", "creator": { "name": "josh.mocek", "key": "josh.mocek", "displayName": "josh.mocek", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "josh.mocek", "key": "josh.mocek", "displayName": "josh.mocek", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Simulator", "comment": { "comments": [ { "id": "435890", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, The issue you described is not clear. In my observation, I see when I turn back my WIFI, I don't get the alert by clicking the label anymore and the console is showing \"[INFO] Ti.Network.online: false\". But it's not true since I turned on the WIFI. Is this your issue? ", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2018-03-24T22:39:41.000+0000", "updated": "2018-03-24T22:39:41.000+0000" }, { "id": "435920", "author": { "name": "josh.mocek", "key": "josh.mocek", "displayName": "josh.mocek", "active": true, "timeZone": "America/Los_Angeles" }, "body": "yeah, that's my issue", "updateAuthor": { "name": "josh.mocek", "key": "josh.mocek", "displayName": "josh.mocek", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-03-26T14:16:12.000+0000", "updated": "2018-03-26T14:16:12.000+0000" }, { "id": "435921", "author": { "name": "josh.mocek", "key": "josh.mocek", "displayName": "josh.mocek", "active": true, "timeZone": "America/Los_Angeles" }, "body": "but it fixed it for me if I consoled Ti.Network.getOnline() before it and the alert would then pop up", "updateAuthor": { "name": "josh.mocek", "key": "josh.mocek", "displayName": "josh.mocek", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-03-26T14:18:19.000+0000", "updated": "2018-03-26T14:18:19.000+0000" }, { "id": "441970", "author": { "name": "josh.mocek", "key": "josh.mocek", "displayName": "josh.mocek", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Any update on this?", "updateAuthor": { "name": "josh.mocek", "key": "josh.mocek", "displayName": "josh.mocek", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-09-24T14:11:53.000+0000", "updated": "2018-09-24T14:11:53.000+0000" }, { "id": "444994", "author": { "name": "josh.mocek", "key": "josh.mocek", "displayName": "josh.mocek", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Happy new year!", "updateAuthor": { "name": "josh.mocek", "key": "josh.mocek", "displayName": "josh.mocek", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-01-04T16:07:06.000+0000", "updated": "2019-01-04T16:07:06.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }