Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS 15 Breaks with custom headers #645

Closed
BrainstemStudio opened this issue Jun 15, 2021 · 6 comments
Closed

iOS 15 Breaks with custom headers #645

BrainstemStudio opened this issue Jun 15, 2021 · 6 comments

Comments

@BrainstemStudio
Copy link

BrainstemStudio commented Jun 15, 2021

We are busy reviewing our apps to get ready for iOS 15 changes. We have noticed when using a basic JS fetch and supplying custom headers the cordova-plugin-ionic-webview encounters the following error:

Web Error
Failed to load resource: WebKit encountered an internal error

XCode Error

[Process] 0x128ad1000 - NetworkProcessProxy::didClose (Network Process 0 crash)
[assertion] Error acquiring assertion: <Error Domain=RBSAssertionErrorDomain Code=2 "Specified target process does not exist" UserInfo={NSLocalizedFailureReason=Specified target process does not exist}>

Setup:

  1. Cordova iOS 6.1.0
  2. cordova-plugin-ionic-webview@latest
  3. XCode 13 Beta
  4. Simulator iOS 15.0

What works

fetch(`https://everydaydigital.co.za/lab/tests/test.php`).then(r => {
	return r.json();
}).then(response => {
	console.log(response);
}).catch(err => {
	console.warn(err);
});

What doesn't work

fetch(`https://everydaydigital.co.za/lab/tests/test.php`,{
    headers : {
        'token' : '123456789'
    }
}).then(r => {
     return r.json();
}).then(response => {
    console.log(response);
}).catch(err => {
   console.warn(err);
});

Tests we have done:

  1. Safari test with iOS 15 works for both tests
  2. Cordova without cordova-plugin-ionic-webview works for both tests
  3. With cordova-plugin-ionic-webview fails on test with custom headers

Expected Behaviour

  1. At least a success or catch error

Current Behaviour

  1. Fails to load resource at all
  2. Error occurs in XCode
@BrainstemStudio
Copy link
Author

We have run further tests without the cordova-plugin-ionic-webview plugin using vanilla cordova-ios 6.2.0. The same issue occurs only when the scheme and hostname options are used. I have reported this to cordova-ios as well as this issue seems to affect cordova in general.

apache/cordova-ios#1119

@BrainstemStudio
Copy link
Author

Looks like this is a webkit error on Apple's side and is being attended to here: https://trac.webkit.org/changeset/278737/webkit

@rajeshrapaka
Copy link

Hi, I am having the same issue. So do we wait for an update or is there any other way to fix this?

@IBonkI
Copy link

IBonkI commented Jul 14, 2021

I am also still having the same Issue

@BrainstemStudio
Copy link
Author

@IBonkI @rajeshrapaka
You can follow this discussion here apache/cordova-ios#1119 and track the specific WebKit bug here https://bugs.webkit.org/show_bug.cgi?id=226769

@BrainstemStudio
Copy link
Author

@IBonkI @rajeshrapaka
I see this is been fixed in the latest beta release. I can confirm that custom headers work based on my reported example. I can further confirm that our cordova apps are working when run from xcode 13 / iOS 15 beta 4.

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

No branches or pull requests

3 participants