question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

iOS 15 Breaks with custom headers

See original GitHub issue

Bug Report

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 encounters an error. This is problematic especially if the the fetches require headers such as tokens, authorization ect.

This appears to only occur when using the scheme and host name options.

<preference name="scheme" value="http" />
<preference name="hostname" value="localhost" />

Problem

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}>

What is expected to happen?

At least a success or catch error should return on the js fetch

What does actually happen?

Xcode returns a error and the fetch does not execute

Information

We have tested a simple fetches, one without custom headers and one with custom headers. We also setup a minimal app without any plugins to isolate the issue. This issue does seem to originate from CDVWebViewEngine when scheme and hostname are used.

This all still works on iOS 14.6, so it appears to be something on iOS 15.0 that has changed.

Command or Code

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);
});

Environment, Platform, Device

Mac OS XCode 13 Simulator

Version information

Cordova 10.0 Cordova iOS 6.2.0

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
timbru31commented, Jun 15, 2021

Which is hopefully fixed in beta 2 and/or public beta 1.

1reaction
NiklasMerzcommented, Jul 2, 2021

I just updated to the latest beta and it’s broken again unfortunately. I commented on the WebKit bug again.

Let’s hope the next betas are working again.

Read more comments on GitHub >

github_iconTop Results From Across the Web

iOS 15 Gap between navigation bar and table view
With iOS 15 beta some custom UITableViewControllers has decided to add a gap between the navigation bar and the table view while others...
Read more >
uitableview - Extra padding above table view headers in iOS 15
Since iOS 15, UITableView contains a new property called sectionHeaderTopPadding which specifies the amount of padding above each section ...
Read more >
Firebase Apple SDK Release Notes - Google
This change is breaking for Swift users only (#8599). Fixed an iOS 15 keychain access issue related to prewarming (#8695). Realtime Database.
Read more >
TableView Section Headers & Titles (Swift 5, Xcode 12) - 2020
In this video we will learn about section titles and headers for TableView in Swift 5 and Xcode 12. Section titles and headers...
Read more >
How to add sections to a list - a free SwiftUI by Example tutorial
Updated in iOS 15. SwiftUI's list view has built-in support for sections and section headers, just like UITableView in UIKit.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found