Skip to content
This repository was archived by the owner on Oct 2, 2021. It is now read-only.

iOS 14: network retry when prompting for local network access #99

@hexsprite

Description

@hexsprite

iOS 14 has introduced a dialog to ask users if they will permit an app to access the local network. This appears for the first time when a Cordova app attempts to do a hot code reload if testing on the local network. It should be fixed so that it retries the request in this situation. Currently it fails and the app remains in the older version until the app is restarted/reloaded.

How to reproduce:

  • run ios-device sample (I used clocks demo, updated to latest)
  • make a change in any template to trigger HCP

image

2020-10-07 13:29:30.360978-0700 meteor-clock[551:47742] Start downloading asset manifest from: manifest.json -- http://10.0.0.248:3000/__cordova/
2020-10-07 13:29:30.375173-0700 meteor-clock[551:47926] Connection 4: received failure notification
2020-10-07 13:29:30.375295-0700 meteor-clock[551:47926] Connection 4: failed to connect 1:50, reason -1
2020-10-07 13:29:30.375355-0700 meteor-clock[551:47926] Connection 4: encountered error(1:50)
2020-10-07 13:29:30.377824-0700 meteor-clock[551:47926] Task <91486B56-FA8A-4C7B-A1A7-D2B06F36D162>.<2> HTTP load failed, 0/0 bytes (error code: -1009 [1:50])
2020-10-07 13:29:30.382533-0700 meteor-clock[551:47828] Task <91486B56-FA8A-4C7B-A1A7-D2B06F36D162>.<2> finished with error [-1009] Error Domain=NSURLErrorDomain Code=-1009 "The Internet connection appears to be offline." UserInfo={_kCFStreamErrorCodeKey=50, NSUnderlyingError=0x280a44e70 {Error Domain=kCFErrorDomainCFNetwork Code=-1009 "(null)" UserInfo={_kCFStreamErrorCodeKey=50, _kCFStreamErrorDomainKey=1}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <91486B56-FA8A-4C7B-A1A7-D2B06F36D162>.<2>, _NSURLErrorRelatedURLSessionTaskErrorKey=(
    "LocalDataTask <91486B56-FA8A-4C7B-A1A7-D2B06F36D162>.<2>"
), NSLocalizedDescription=The Internet connection appears to be offline., NSErrorFailingURLStringKey=http://10.0.0.248:3000/__cordova/manifest.json, NSErrorFailingURLKey=http://10.0.0.248:3000/__cordova/manifest.json, _kCFStreamErrorDomainKey=1}
2020-10-07 13:29:30.382855-0700 meteor-clock[551:47828] Download failure: Error downloading asset manifest: Error Domain=NSURLErrorDomain Code=-1009 "The Internet connection appears to be offline." UserInfo={_kCFStreamErrorCodeKey=50, NSUnderlyingError=0x280a44e70 {Error Domain=kCFErrorDomainCFNetwork Code=-1009 "(null)" UserInfo={_kCFStreamErrorCodeKey=50, _kCFStreamErrorDomainKey=1}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <91486B56-FA8A-4C7B-A1A7-D2B06F36D162>.<2>, _NSURLErrorRelatedURLSessionTaskErrorKey=(
    "LocalDataTask <91486B56-FA8A-4C7B-A1A7-D2B06F36D162>.<2>"
), NSLocalizedDescription=The Internet connection appears to be offline., NSErrorFailingURLStringKey=http://10.0.0.248:3000/__cordova/manifest.json, NSErrorFailingURLKey=http://10.0.0.248:3000/__cordova/manifest.json, _kCFStreamErrorDomainKey=1}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions