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

iOS 12: Failed to load webpage with error: The operation couldn’t be completed. (kCFErrorDomainCFNetwork error 1.) #647

Open
subinkrishna opened this issue Sep 2, 2020 · 5 comments

Comments

@subinkrishna
Copy link

subinkrishna commented Sep 2, 2020

Description

Unable to load the installed code push bundle when InstallMode is IMMEDIATE or ON_NEXT_RESUME.

Logs (for IMMEDIATE):

Installing update
[CodePush] Installing update
[CodePush] Applying full update
[CodePush] Install succeeded.
The update was installed successfully.
=================================================================
Main Thread Checker: UI API called on a background thread: -[WKWebView loadFileURL:allowingReadAccessToURL:]
PID: 3751, TID: 363261, Thread name: (none), Queue name: com.apple.root.default-qos, QoS: 0
IAB.close() called but it was already closed.
Failed to load webpage with error: The operation couldn’t be completed. (kCFErrorDomainCFNetwork error 1.)

Reproduction

Followed samples/basic/www/js/index.js with InstallMode.IMMEDIATE

Additional Information

  • cordova-plugin-code-push version: 1.13.1
  • List of installed plugins:
    "cordova-plugin-advanced-http": "3.0.0",
    "cordova-plugin-androidx-adapter": "1.1.1",
    "cordova-plugin-app-version": "0.1.9",
    "cordova-plugin-appcenter-analytics": "0.5.1",
    "cordova-plugin-appcenter-crashes": "0.5.1",
    "cordova-plugin-appcenter-shared": "0.5.1",
    "cordova-plugin-apprate": "1.4.0",
    "cordova-plugin-brightness": "0.2.0",
    "cordova-plugin-code-push": "1.13.1",
    "cordova-plugin-compat": "1.2.0",
    "cordova-plugin-deeplinks": "1.1.1",
    "cordova-plugin-device": "2.0.2",
    "cordova-plugin-dialogs": "2.0.1",
    "cordova-plugin-enable-multidex": "0.2.0",
    "cordova-plugin-file": "6.0.2",
    "cordova-plugin-geolocation": "4.0.2",
    "cordova-plugin-globalization": "1.0.9",
    "cordova-plugin-keyboard": "1.2.0",
    "cordova-plugin-nativestorage": "2.3.2",
    "cordova-plugin-network-information": "2.0.2",
    "cordova-plugin-splashscreen": "6.0.0",
    "cordova-plugin-statusbar": "2.4.3",
    "cordova-plugin-whitelist": "1.3.4",
    "cordova-plugin-x-socialsharing": "5.6.8",
    "cordova-plugin-zip": "3.1.0",
    "es6-promise-plugin": "4.2.2",
  • Cordova version: 9.0.0
    "cordova": "9.0.0",
    "cordova-android": "9.0.0",
    "cordova-ios": "6.1.0",
  • iOS/Android/Windows version: iOS 12.4.8 (iPad Mini)
  • Does this reproduce on a debug build or release build? Both
  • Does this reproduce on a simulator, or only on a physical device? Device only
@pitAlex
Copy link

pitAlex commented Sep 7, 2020

This ios12 crash happens for us as well although in our case its set as ON_NEXT_RESTART. It cannot be replicated in the simulator, we have just one iPhone 5s with ios12 and... the person is in a different country and does not have a mac.
Do you guys have an advice on what logs to put where to properly capture this?

@pitAlex
Copy link

pitAlex commented Sep 7, 2020

Comming with an update, we managed to remotely debug it. And we see the same thing kCFErrorDomainCFNetwork 1. Our app is not using the new URL scheme introduced with Cordova iOS 6.

@pitAlex
Copy link

pitAlex commented Sep 8, 2020

Hello, so I've been digging around and I've noticed that CDVWKWebViewEngine+CodePush.m doesn't seem to be used. I mean in codePush.m on line [self.webViewEngine loadRequest:[NSURLRequest requestWithURL:url]]; it seems to invoke that from CDVWebViewEngine.m. I may be completely off but were are on a deadline here and I am doing what I can to figure this one out.

@pitAlex
Copy link

pitAlex commented Sep 8, 2020

I have a new update. I believe this is a cordova-ios issue or this plugin needs to be updated to overwrite CDVWebViewEngine loadRequest method. I've installed cordova-plugin-ionic-webview, leaving everything as default and the updates worked.
If developers could confirm this, we should open the issue on the cordova-ios repo as well.

@subinkrishna
Copy link
Author

@alexandergoncharov - Hey! sorry to tag you to this ticket, but looks like you mostly maintain this repo. Do you have any thoughts or updates related to this issue?

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