[iOS 12 Beta] Preflight requests fail


#1

Has anyone else tested their app(s)? I’m getting some really weird results.

My local backend works just fine, but the production one gives me a “Preflight response is not successful” on iOS 12. Using remote debugging in Safari, I am unable to see the OPTIONS request in the Network tab on iOS 12, but I know for sure that it is being made. I’m still able to see the OPTIONS request for an iOS 11 device.

I’m using Ionic WKWebView, running iOS 12 on a simulator but 11 on a real device.

Are any of you able to see the OPTIONS request on iOS 12?

Edit: So I don’t have a fix for the OPTIONS requests not showing up, but it seems that all HTTPS preflight requests just straight up fail. Tried multiple domains. Reason it worked with my local backend was because it wasn’t HTTPS.


#2

So your server side application does receive the OPTIONS request and respond in the expected manner?


#3

That was locally, I presumed the same for prod but now I have my doubts. Will check asap.


#4

I didn’t tried out iOS 12 but a friend of mine did and was unable to connect to my app (= unable to login). Tried to log his requests to my server but never saw them…now I read your post, I began to be super concerned :scream:


#5

We’ve had the same issue too. I’ve filed a report with Apple, and have put onto Open Radar.

https://openradar.appspot.com/radar?id=4959044250894336


#6

@radiovision interesting. I will do deeper tests, I don’t set Access-Control-Allow-Origin to *


#7

Just tried with a dead simple Hello World page, still get the error. Server doesn’t appear to receive the request at all. Glad we’re not alone :slight_smile:


#8

Maybe you should edit the report to mention it’s only for HTTPS requests, 'cause it is, right? Or do you also get the error for HTTP requests?


#9

I have installed Xcode 10 Beta and tested my app with iPhone 6s / iOS 12, I could unfortunately confirm the bug/problem

I will comeback with more details about the error, like I said above I do set something in Access-Control-Allow-Origin

:frowning:


#10

I’m having the exact same issue. I have tried modifying all of my server response headers with no change in behavior.

I also noticed that the request headers coming from the iOS 12 device seem to omit the ‘Access-Control-Request-Headers’ when compared to iOS 11.


#11

Yep definitely look like a CORS issue with WkWebView on iOS 12

My error is the following:

{“headers”:{“normalizedNames”:{},“lazyUpdate”:null,“headers”:{}},“status”:0,“statusText”:“Unknown Error”,“url”:null,“ok”:false,“name”:“HttpErrorResponse”,“message”:“Http failure response for (unknown url): 0 Unknown Error”,“error”:{“isTrusted”:true}}


#12

I did some try on my backend but didn’t find anything. Furthermore there was no way to parse the requests, it really looks like no requests are reaching my backend API

So I did open a bug for Apple too

Furthermore, just in case, I opened a Stackoverflow issue too

And opened an issue in the cordova-plugin-ionic-webview plugin, because at the end, if it isn’t a iOS v12 bug it might be a feature improvements for the WkWebView plugin


#13

I filed a bug with Apple as well. I don’t believe it’s hitting my server, either.


#14

Hey folks! Just to chime in on this, chances are with the fist build of iOS 12, there’s bound to be a few bugs here and there. I have iOS 12 installed and will be running though testing things


#15

As mike said, this is on our radar and we hope it’s just a blip with the first beta. We are looking into whether there’s something on our end that could be at fault in the meantime.


#16

Having the same issue on iOS 12. For people using Firebase, you will get this error :

Error: A network error (such as timeout, interrupted connection or unreachable host) has occurred.

Hope Apple will fix this issue soon


#17

While building a sample repo I noticed that I wasn’t facing this problem while performing http GET requests but only with POST requests

Could anyone confirm this or are you facing the problem with Get too?


#18

Xcode 10 beta 2 respectively iOS 12 beta 2 solves my problem, I hope it will be the case for you too @mich356c @radiovision @dleeder @gensollen


#19

I’ve heard that connection fails when using a self-signed SSL certificates, I think apple is becoming strict with security.


#20

Any chance this issue has been resolved with the first public beta?