{"action":"created","issue":{"url":"https://api.github.com/repos/lionheart/openradar-mirror/issues/19753","repository_url":"https://api.github.com/repos/lionheart/openradar-mirror","labels_url":"https://api.github.com/repos/lionheart/openradar-mirror/issues/19753/labels{/name}","comments_url":"https://api.github.com/repos/lionheart/openradar-mirror/issues/19753/comments","events_url":"https://api.github.com/repos/lionheart/openradar-mirror/issues/19753/events","html_url":"https://github.com/lionheart/openradar-mirror/issues/19753","id":323610190,"number":19753,"title":"40291350: Reachability using hostname incorrectly reporting Not Reachable after device is locked/sleeps, and doesn't recover automatically","user":{"login":"openradar-mirror","id":13605213,"avatar_url":"https://avatars1.githubusercontent.com/u/13605213?v=4","gravatar_id":"","url":"https://api.github.com/users/openradar-mirror","html_url":"https://github.com/openradar-mirror","followers_url":"https://api.github.com/users/openradar-mirror/followers","following_url":"https://api.github.com/users/openradar-mirror/following{/other_user}","gists_url":"https://api.github.com/users/openradar-mirror/gists{/gist_id}","starred_url":"https://api.github.com/users/openradar-mirror/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openradar-mirror/subscriptions","organizations_url":"https://api.github.com/users/openradar-mirror/orgs","repos_url":"https://api.github.com/users/openradar-mirror/repos","events_url":"https://api.github.com/users/openradar-mirror/events{/privacy}","received_events_url":"https://api.github.com/users/openradar-mirror/received_events","type":"User","site_admin":false},"labels":[{"id":936753077,"url":"https://api.github.com/repos/lionheart/openradar-mirror/labels/classification:duplicate%20of%2035688315","name":"classification:duplicate of 35688315","color":"444444","default":false},{"id":243427857,"url":"https://api.github.com/repos/lionheart/openradar-mirror/labels/reproducible:sometimes","name":"reproducible:sometimes","color":"d4c5f9","default":false},{"id":244629114,"url":"https://api.github.com/repos/lionheart/openradar-mirror/labels/status:closed","name":"status:closed","color":"444444","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/lionheart/openradar-mirror/milestones/378","html_url":"https://github.com/lionheart/openradar-mirror/milestone/378","labels_url":"https://api.github.com/repos/lionheart/openradar-mirror/milestones/378/labels","id":2165669,"number":378,"title":"iOS + SDK","description":null,"creator":{"login":"openradar-mirror","id":13605213,"avatar_url":"https://avatars1.githubusercontent.com/u/13605213?v=4","gravatar_id":"","url":"https://api.github.com/users/openradar-mirror","html_url":"https://github.com/openradar-mirror","followers_url":"https://api.github.com/users/openradar-mirror/followers","following_url":"https://api.github.com/users/openradar-mirror/following{/other_user}","gists_url":"https://api.github.com/users/openradar-mirror/gists{/gist_id}","starred_url":"https://api.github.com/users/openradar-mirror/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openradar-mirror/subscriptions","organizations_url":"https://api.github.com/users/openradar-mirror/orgs","repos_url":"https://api.github.com/users/openradar-mirror/repos","events_url":"https://api.github.com/users/openradar-mirror/events{/privacy}","received_events_url":"https://api.github.com/users/openradar-mirror/received_events","type":"User","site_admin":false},"open_issues":712,"closed_issues":37,"state":"open","created_at":"2016-11-30T08:08:41Z","updated_at":"2018-05-18T00:02:18Z","due_on":null,"closed_at":null},"comments":97,"created_at":"2018-05-16T13:00:54Z","updated_at":"2018-05-20T00:02:25Z","closed_at":"2018-05-18T00:02:18Z","author_association":"COLLABORATOR","body":"#### Description\n\nArea:\r\nSystemConfiguration Framework\r\n\r\nSummary:\r\nWhen Reachability (SCNetworkReachability) is configured with a hostname and callback monitoring is enabled, and the app goes to background, sometimes the reachability callback will report Not Reachable when the device is woken up, and doesn't recover.\r\n\r\nSteps to Reproduce:\r\n1 - ensure you have WiFi enabled on the device\r\n2 - configure SCNetworkReachability using a hostname, e.g. www.google.com\r\n3 - enable monitoring of SCNetworkReachability via callback\r\n4 - lock the device (manually, or waiting for auto lock)\r\n5 - wait some seconds with the device locked (maybe a minute or two even)\r\n6 - lift the device (to force it to wake up temporarily)\r\n7 - repeat steps 5-6 until some `dnssd_clientstub` or `nw_resolver_create_dns_service_locked` logs appear and/or the reachability fires with empty flags (not reachable). If not able to reproduce, start from step 4, or wait some more time between waking the device by lifting it.\r\n8 - the reachability will report Not reachable, when the WiFi connection is still active, and won't recover automatically\r\n\r\nNotes:\r\n- Steps 2 and 3 are already done on the provided sample app `ReachabilityHostnameBGBug`.\r\n- relevant app on the sysdiagnose is `ReachabilityHostnameBGBug` (test project, also attached).\r\n\r\nAnalysis:\r\nMy suspicion is that this is some problem with the DNS background service interfering with the Reachability (revealed by the `dnssd_clientstub`and `nw_resolver_create_dns_service_locked` logs), because this issue only seems to manifest itself when using a hostname to configure the Reachability. If one uses an address (e.g. 0.0.0.0), the issue doesn't seem to happen (at least I wasn't able to).\r\n\r\nExpected Results:\r\nReachability should always report the correct reachability state, according to the device/network's actual state.\r\n\r\nActual Results:\r\nReachability incorrectly reports Not Reachable, even though the WiFi connection has always been active and working\r\n\r\nVersion/Build:\r\niPhone 6s (MKQJ2B/A), iOS 11.3 (15E216)\r\niPhone X (MQAC2QL/A), iOS 11.3.1 (15E302)\r\n(probably others)\r\n\r\nConfiguration:\r\nXcode 9.3.1 (9E501), Swift 4.1\r\nmacOS 10.13.4\n\n-\nProduct Version: iOS 11.3.1\nCreated: 2018-05-16T12:24:51.564720\nOriginated: 2018-05-16T00:00:00\nOpen Radar Link: http://www.openradar.me/40291350"},"comment":{"url":"https://api.github.com/repos/lionheart/openradar-mirror/issues/comments/390441831","html_url":"https://github.com/lionheart/openradar-mirror/issues/19753#issuecomment-390441831","issue_url":"https://api.github.com/repos/lionheart/openradar-mirror/issues/19753","id":390441831,"user":{"login":"openradar-mirror","id":13605213,"avatar_url":"https://avatars1.githubusercontent.com/u/13605213?v=4","gravatar_id":"","url":"https://api.github.com/users/openradar-mirror","html_url":"https://github.com/openradar-mirror","followers_url":"https://api.github.com/users/openradar-mirror/followers","following_url":"https://api.github.com/users/openradar-mirror/following{/other_user}","gists_url":"https://api.github.com/users/openradar-mirror/gists{/gist_id}","starred_url":"https://api.github.com/users/openradar-mirror/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openradar-mirror/subscriptions","organizations_url":"https://api.github.com/users/openradar-mirror/orgs","repos_url":"https://api.github.com/users/openradar-mirror/repos","events_url":"https://api.github.com/users/openradar-mirror/events{/privacy}","received_events_url":"https://api.github.com/users/openradar-mirror/received_events","type":"User","site_admin":false},"created_at":"2018-05-20T00:02:25Z","updated_at":"2018-05-20T00:02:25Z","author_association":"COLLABORATOR","body":"Resolved: May 18 2018\nModified: 2018-05-18T00:00:35.787260"}}
{"actor":{"display_login":"openradar-mirror"}}