Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Find URL for NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9802) error

I'm getting the infamous NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9802) error on iOS 9. I don't want to add a global exception but for specific domains.

How do I know which URL causes this error?

like image 541
YogevSitton Avatar asked Feb 10 '23 02:02

YogevSitton


1 Answers

When your NSURLConnection or NSURLSessionTask error handling delegate method is called, obtain the URL from the request object and print it with NSLog (or just put a debug breakpoint in that method).

Or set the CFNETWORK_DIAGNOSTICS environment variable to 1 (or 2 or 3) if your code isn't making the request directly (e.g. if a third-party library is doing it on your behalf).

like image 149
dgatwood Avatar answered Mar 22 '23 23:03

dgatwood