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

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

Open
hexsprite opened this issue Oct 7, 2020 · 3 comments
Open

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

hexsprite opened this issue Oct 7, 2020 · 3 comments

Comments

@hexsprite
Copy link

hexsprite commented Oct 7, 2020

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}
@filipenevola
Copy link
Collaborator

@hexsprite what is this repo clocks demo?

I never saw this problem before. In which cases it would happen? On real devices in the first HCP?

If that is really the case, I'm not getting this problem on my apps, what would be the workaround in your opinion?

@hexsprite
Copy link
Author

Probably be more persistent at retrying failed requests for HCP would fix it.

@hexsprite
Copy link
Author

Yeah its just the clocks demo, wanted something neutral to reproduce with.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants