Firebase-ios-sdk: Failed to subscribe to topic Error Domain=NSURLErrorDomain Code=-1200

Created on 10 Oct 2017  Â·  37Comments  Â·  Source: firebase/firebase-ios-sdk

[REQUIRED] : Describe the problem

Hi Team, With iOS 11 and XCode 9 we are getting below errors

Error 1
Failed to subscribe to topic Error Domain=NSURLErrorDomain Code=-1200 "An SSL error has occurred and a secure connection to the server cannot be made." UserInfo={_kCFStreamErrorCodeKey=-9802, NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, NSUnderlyingError=0x1c0449f00 {Error Domain=kCFErrorDomainCFNetwork Code=-1200 "(null)" UserInfo={_kCFStreamPropertySSLClientCertificateState=0, _kCFNetworkCFStreamSSLErrorOriginalValue=-9802, _kCFStreamErrorDomainKey=3, _kCFStreamErrorCodeKey=-9802}}, NSLocalizedDescription=An SSL error has occurred and a secure connection to the server cannot be made., NSErrorFailingURLKey=https://iid.googleapis.com/iid/register, NSErrorFailingURLStringKey=https://iid.googleapis.com/iid/register, _kCFStreamErrorDomainKey=3}

Error 2
TIC TCP Conn Failed [3:0x6040003627c0]: 3:-9802 Err(-9802)
2017-10-10 12:51:47.059149+0530 MyApp[11781:227385] NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9802)
2017-10-10 12:51:47.059353+0530 MyApp[11781:227385] Task <91287390-CC8A-4F32-8403-929E95353B4B>.<1> HTTP load failed (error code: -1200 [3:-9802])
2017-10-10 12:51:47.060064+0530 MyApp[11781:227383] Task <91287390-CC8A-4F32-8403-929E95353B4B>.<1> finished with error - code: -1200
2017-10-10 12:52:39.286401+0530 MyApp[11781:228768] TIC Read Status [5:0x0]: 1:57
2017-10-10 12:52:39.286849+0530 MyApp[11781:228768] TIC Read Status [5:0x0]: 1:57
2017-10-10 12:52:43.375836+0530 MyApp[11781:228768] TIC Read Status [6:0x604000366540]: 1:57
2017-10-10 12:52:43.376470+0530 MyApp[11781:228768] TIC Read Status [6:0x604000366540]: 1:57
2017-10-10 12:52:43.377415+0530 MyApp[11781:228768] TIC Read Status [6:0x604000366540]: 1:57
2017-10-10 12:54:38.998920+0530 MyApp[11781:230845] TIC Read Status [2:0x600000361440]: 1:57
2017-10-10 12:54:38.999998+0530 MyApp[11781:230845] TIC Read Status [2:0x600000361440]: 1:57
2017-10-10 12:54:39.000339+0530 MyApp[11781:230845] TIC Read Status [2:0x600000361440]: 1:57
2017-10-10 13:09:16.756803+0530 MyApp[11781:246165] [Client] Discarding message for event 0 because of too many unprocessed messages

[REQUIRED] Step 2: Describe your environment

  • Xcode version: XCode 9
  • Firebase SDK version: Firebase (4.3.0),FirebaseAnalytics (4.0.4) ,FirebaseCore (4.0.8), FirebaseInstanceID (2.0.4) ,FirebaseMessaging (2.0.4)
messaging

Most helpful comment

This started happening to me today on a project where it was completely working before. 0 changes were made. Did anyone solve this issue?

All 37 comments

Hmm, this looks like it was a temporary SSL issue. Is this happening all the time? If so, what location are you in? And do you have any restrictions on your network?

I'm getting this issue too..

Same error here, but different evironment:

  • Xcode Version: XCode 9
  • Firebase SDK version: FirebaseCore (4.0.11), FirebasePerformance (1.0.6), FirebaseAnalytics (4.0.5)

All firebase SDK were installed through CocoaPods:
Firebase/Core (4.6.0)
Firebase/Performance (4.6.0)

For those running into this issue, can you answer the questions rsattar posted above as well? Also, please post your error messages and make sure they don't differ from the original post.

I'm also getting this error also except it failed on resolving play.googleapis.com:

  • Xcode Version: Xcode 9.1
  • Firebase/Core (4.7.0) - FirebaseCore (4.0.12), FirebaseAnalytics (4.0.5), FirebaseMessaging (2.0.7)
  • Firebase/Messaging (4.7.0) - FirebaseMessaging (2.0.7)

All firebase SDK were installed through CocoaPods:

  pod 'Firebase/Core'
  pod 'Firebase/Messaging'

For rsattar's questions:

  • I'm in Idaho, USA
  • No restrictions on network
  • I've tried while connected to wifi with my local provider and through T-Mobile network

I switched name servers to use 8.8.8.8 and everything was working fine. Oddly, switching back to using my ISPs DNS servers still worked after it worked with the previous test.

My ISPs resolved play.googleapis.com to:

$ nslookup play.googleapis.com
Server:     192.168.0.1
Address:    192.168.0.1#53

Non-authoritative answer:
play.googleapis.com canonical name = googleapis.l.google.com.
Name:   googleapis.l.google.com
Address: 216.58.216.138
Name:   googleapis.l.google.com
Address: 172.217.3.170
Name:   googleapis.l.google.com
Address: 216.58.193.74
Name:   googleapis.l.google.com
Address: 172.217.3.202
Name:   googleapis.l.google.com
Address: 216.58.216.170

I am located in Lithuania and getting same error fro this request:

        let query = ref.child("email").queryOrderedByKey().queryEqual(toValue: "[email protected]")//.queryEqual(toValue: "[email protected]", childKey: "email")
        query.observe(.value) { (snapshot) in
            print("\(snapshot.childrenCount)")
        }

And here is an error:

2017-12-18 05:41:11.063674+0200 PL[1297:447036] [Firebase/Core][I-COR000020] Error posting to Clearcut: Error Domain=NSURLErrorDomain Code=-1200 "An SSL error has occurred and a secure connection to the server cannot be made." UserInfo={NSURLErrorFailingURLPeerTrustErrorKey=<SecTrustRef: 0x1d0305c40>, NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, _kCFStreamErrorDomainKey=3, _kCFStreamErrorCodeKey=-9802, NSErrorPeerCertificateChainKey=(
    "<cert(0x14981fc00) s: *.googleapis.com i: Google Internet Authority G2>",
    "<cert(0x14b00b200) s: Google Internet Authority G2 i: GeoTrust Global CA>",
    "<cert(0x14b00ba00) s: GeoTrust Global CA i: Equifax Secure Certificate Authority>"
), NSUnderlyingError=0x1cc0448f0 {Error Domain=kCFErrorDomainCFNetwork Code=-1200 "(null)" UserInfo={_kCFStreamPropertySSLClientCertificateState=0, kCFStreamPropertySSLPeerTrust=<SecTrustRef: 0x1d0305c40>, _kCFNetworkCFStreamSSLErrorOriginalValue=-9802, _kCFStreamErrorDomainKey=3, _kCFStreamErrorCodeKey=-9802, kCFStreamPropertySSLPeerCertificates=(
    "<cert(0x14981fc00) s: *.googleapis.com i: Google Internet Authority G2>",
    "<cert(0x14b00b200) s: Google Internet Authority G2 i: GeoTrust Global CA>",
    "<cert(0x14b00ba00) s: GeoTrust Global CA i: Equifax Secure Certificate Authority>"
)}}, NSLocalizedDescription=An SSL error has occurred and a secure connection to the server cannot be made., NSErrorFailingURLKey=https://play.googleapis.com/log, NSErrorFailingURLStringKey=https://play.googleapis.com/log, NSErrorClientCertificateStateKey=0}, with Status Code: 0

@ramunasjurgilas looks like you were having a certificate mismatch, which is possibly an issue with your local internet.

@morganchen12 Sorry to say, but I do not agree with your comment.
I tried with mobile operator & the biggest internet provider in Lithuania. And result is the same.

Does it work if you test on a different device?

Thanks for quick responses.

It is not working from different device as well.

I want to notice one more thing. If problem exists on local internet provider then connection to & from Firebase Database should not work. Correct me if I am wrong. So setValue is working fine:

        let dbRef = Database.database().reference()
        dbRef.child("post").child("groupName").setValue("hello world1")

When diving deeper to the logs found this error:

2017-12-18 12:44:29.948270+0200 PL[5972:462597] [BoringSSL] Function nw_protocol_boringssl_input_finished: line 1386 Peer disconnected during the middle of a handshake. Sending errSSLFatalAlert(-9802) alert

One more error:

[BoringSSL] Function boringssl_context_get_peer_sct_list: line 1754 received sct extension length is less than sct data length

And here is one more error:

2017-12-18 12:44:29.952645+0200 PL[5972:462597] TIC TCP Conn Failed [1:0x604000169540]: 3:-9802 Err(-9802)

Yeah, good point. Looks like only requests to one particular google API are failing. If you try manually setting the DNS like tspiva did, does the error go away?

I can not understand how changing Wi-Fi on my mac can solve problems on iPhone.
But any way I tried and without luck. Still the same result.

Set the DNS on your phone, not your mac.

Thanks for pointing. After these changes were made it is failing only on first execution (run of the app). And afterwards, when executing queryEqual queries no errors printed to console. But even when no error printed queryEqual returns null. In reality I am expecting not nil response. Using this code from bellow:

        let dbRef = Database.database().reference()
        dbRef.child("post").child("groupName").setValue("hello world1")

        let postRef = dbRef.child("post")
        print(postRef)

        let query1 = postRef.queryEqual(toValue: "hello world1", childKey: "groupName")
        query1.observe(.value) { (snapshot) in
            print(snapshot)
        }

I had the same problem. Enabling a personal hotspot on my iPhone and connecting my mac to the tethered wifi solved the problem. Just this error persists:

...
2017-12-28 10:39:58.362877+0100 MyApp[1645:645198] [] nw_connection_get_connected_socket 32 Connection has no connected handler
2017-12-28 10:39:58.363005+0100 MyApp[1645:645198] TCP Conn 0x106f61720 Failed : error 0:61 [61]
...

That's obviously just a temporary solution though. I'll edit this post as soon as I found out what exactly was causing the problem.

Hey all,

This issue hasn't been actionable for a while, so I'm going to close it for now. If you have any new debugging information, feel free to comment on the closed issue and I'll re-open it.

If you have the same error message but think it may be a separate bug, please file a new issue and I'll take a look.

I am having the same issue.

Environment:

  • Xcode Version 9.2
  • Swift 4.0.3
  • Firebase installed via CocoaPods

Same error here :

Xcode Version: XCode 9.2

[BoringSSL] Function nw_protocol_boringssl_input_finished: line 1386 Peer disconnected during the middle of a handshake. Sending errSSLFatalAlert(-9802) alert
2018-03-08 11:41:47.946673+0530 FirebaseCheck[31161:1161612] NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9802)
2018-03-08 11:41:47.946815+0530 FirebaseCheck[31161:1161612] Task .<1> HTTP load failed (error code: -1200 [3:-9802])
2018-03-08 11:41:47.947166+0530 FirebaseCheck[31161:1161788] Task .<1> finished with error - code: -1200
2018-03-08 11:41:48.937575+0530 FirebaseCheck[31161:1161365] Encounter network error. Code, error: -1200, Error Domain=NSURLErrorDomain Code=-1200 "An SSL error has occurred and a secure connection to the server cannot be made." UserInfo={NSURLErrorFailingURLPeerTrustErrorKey=, NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, _kCFStreamErrorDomainKey=3, _kCFStreamErrorCodeKey=-9802, NSErrorPeerCertificateChainKey=(
"",
""
)

I have added google API domains in Exception Domains in info.plist. it is
working fine

On Thu, Mar 8, 2018 at 2:39 PM, sivarajss notifications@github.com wrote:

Same error here :

Xcode Version: XCode 9.2

[BoringSSL] Function nw_protocol_boringssl_input_finished: line 1386 Peer
disconnected during the middle of a handshake. Sending
errSSLFatalAlert(-9802) alert
2018-03-08 11:41:47.946673+0530 FirebaseCheck[31161:1161612]
NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL,
-9802)
2018-03-08 11:41:47.946815+0530 FirebaseCheck[31161:1161612] Task .<1>
HTTP load failed (error code: -1200 [3:-9802])
2018-03-08 11:41:47.947166+0530 FirebaseCheck[31161:1161788] Task .<1>
finished with error - code: -1200
2018-03-08 11:41:48.937575+0530 FirebaseCheck[31161:1161365]
Encounter network error. Code, error: -1200, Error
Domain=NSURLErrorDomain Code=-1200 "An SSL error has occurred and a secure
connection to the server cannot be made." UserInfo={
NSURLErrorFailingURLPeerTrustErrorKey=,
NSLocalizedRecoverySuggestion=Would you like to connect to the server
anyway?, _kCFStreamErrorDomainKey=3, _kCFStreamErrorCodeKey=-9802,
NSErrorPeerCertificateChainKey=(
" G3>",
""
), NSUnderlyingError=0x60400044bac0 {Error Domain=kCFErrorDomainCFNetwork
Code=-1200 "(null)" UserInfo={_kCFStreamPropertySSLClientCertificateState=0,
kCFStreamPropertySSLPeerTrust=, _
kCFNetworkCFStreamSSLErrorOriginalValue=-9802,
_kCFStreamErrorDomainKey=3, _kCFStreamErrorCodeKey=-9802,
kCFStreamPropertySSLPeerCertificates=(
" G3>",
""
)}}, NSLocalizedDescription=An SSL error has occurred and a secure
connection to the server cannot be made., NSErrorFailingURLKey=https://
play.googleapis.com/log, NSErrorFailingURLStringKey=htt
ps://play.googleapis.com/log, NSErrorClientCertificateStateKey=0}
2018-03-08 11:41:48.938206+0530 FirebaseCheck[31161:1161590]
[Firebase/Core][I-NET901017] Encounter network
error. Code, error: -1200, Error Domain=NSURLErrorDomain Code=-1200 "An SSL
error has occurred and a secure connection to the server cannot be made."
UserInfo={NSURLErrorFailingURLPeerTrustErrorKey= 0x600000110ce0>, NSLocalizedRecoverySuggestion=Would you like to connect
to the server anyway?, _kCFStreamErrorDomainKey=3,
_kCFStreamErrorCodeKey=-9802, NSErrorPeerCertificateChainKey=(
" G3>",
""
), NSUnderlyingError=0x60400044bac0 {Error Domain=kCFErrorDomainCFNetwork
Code=-1200 "(null)" UserInfo={_kCFStreamPropertySSLClientCertificateState=0,
kCFStreamPropertySSLPeerTrust=, _
kCFNetworkCFStreamSSLErrorOriginalValue=-9802,
_kCFStreamErrorDomainKey=3, _kCFStreamErrorCodeKey=-9802,
kCFStreamPropertySSLPeerCertificates=(
" G3>",
""
)}}, NSLocalizedDescription=An SSL error has occurred and a secure
connection to the server cannot be made., NSErrorFailingURLKey=https://
play.googleapis.com/log, NSErrorFailingURLStringKey=htt
ps://play.googleapis.com/log, NSErrorClientCertificateStateKey=0}
2018-03-08 11:41:48.938 FirebaseCheck[31161] [Firebase/Core][I-NET901017]
Encounter network error. Code, error: -1200, Error
Domain=NSURLErrorDomain Code=-1200 "An SSL error has occurred and a secure
connection to the server cannot be made." UserInfo={
NSURLErrorFailingURLPeerTrustErrorKey=,
NSLocalizedRecoverySuggestion=Would you like to connect to the server
anyway?, _kCFStreamErrorDomainKey=3, _kCFStreamErrorCodeKey=-9802,
NSErrorPeerCertificateChainKey=(
" G3>",
""
), NSUnderlyingError=0x60400044bac0 {Error Domain=kCFErrorDomainCFNetwork
Code=-1200 "(null)" UserInfo={_kCFStreamPropertySSLClientCertificateState=0,
kCFStreamPropertySSLPeerTrust=, _
kCFNetworkCFStreamSSLErrorOriginalValue=-9802,
_kCFStreamErrorDomainKey=3, _kCFStreamErrorCodeKey=-9802,
kCFStreamPropertySSLPeerCertificates=(
" G3>",
""
)}}, NSLocalizedDescription=An SSL error has occurred and a secure
connection to the server cannot be made., NSErrorFailingURLKey=https://
play.googleapis.com/log, NSErrorFailingURLStringKey=htt
ps://play.googleapis.com/log, NSErrorClientCertificateStateKey=0}
2018-03-08 11:41:48.941242+0530 FirebaseCheck[31161:1161590]
[Firebase/Core][I-COR000020] Error posting to Clearcut: Error
Domain=NSURLErrorDomain Code=-1200 "An SSL error has occurred and a secure
connection to the server cannot be made." UserInfo={
NSURLErrorFailingURLPeerTrustErrorKey=,
NSLocalizedRecoverySuggestion=Would you like to connect to the server
anyway?, _kCFStreamErrorDomainKey=3, _kCFStreamErrorCodeKey=-9802,
NSErrorPeerCertificateChainKey=(
" G3>",
""
), NSUnderlyingError=0x60400044bac0 {Error Domain=kCFErrorDomainCFNetwork
Code=-1200 "(null)" UserInfo={_kCFStreamPropertySSLClientCertificateState=0,
kCFStreamPropertySSLPeerTrust=, _
kCFNetworkCFStreamSSLErrorOriginalValue=-9802,
_kCFStreamErrorDomainKey=3, _kCFStreamErrorCodeKey=-9802,
kCFStreamPropertySSLPeerCertificates=(
" G3>",
""
)}}, NSLocalizedDescription=An SSL error has occurred and a secure
connection to the server cannot be made., NSErrorFailingURLKey=https://
play.googleapis.com/log, NSErrorFailingURLStringKey=htt
ps://play.googleapis.com/log, NSErrorClientCertificateStateKey=0}, with
Status Code: 0
2018-03-08 11:41:48.942 FirebaseCheck[31161] [Firebase/Core][I-COR000020]
Error posting to Clearcut: Error Domain=NSURLErrorDomain Code=-1200 "An SSL
error has occurred and a secure connection to the server cannot be made."
UserInfo={NSURLErrorFailingURLPeerTrustErrorKey= 0x600000110ce0>, NSLocalizedRecoverySuggestion=Would you like to connect
to the server anyway?, _kCFStreamErrorDomainKey=3,
_kCFStreamErrorCodeKey=-9802, NSErrorPeerCertificateChainKey=(
" G3>",
""
), NSUnderlyingError=0x60400044bac0 {Error Domain=kCFErrorDomainCFNetwork
Code=-1200 "(null)" UserInfo={_kCFStreamPropertySSLClientCertificateState=0,
kCFStreamPropertySSLPeerTrust=, _
kCFNetworkCFStreamSSLErrorOriginalValue=-9802,
_kCFStreamErrorDomainKey=3, _kCFStreamErrorCodeKey=-9802,
kCFStreamPropertySSLPeerCertificates=(
" G3>",
""
)}}, NSLocalizedDescription=An SSL error has occurred and a secure
connection to the server cannot be made., NSErrorFailingURLKey=https://
play.googleapis.com/log, NSErrorFailingURLStringKey=htt
ps://play.googleapis.com/log, NSErrorClientCertificateStateKey=0}, with
Status Code: 0

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/firebase/firebase-ios-sdk/issues/357#issuecomment-371425860,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AT-nrklkGVz1Isv9iTaqwqxG75s3LCMUks5tcPU5gaJpZM4Pzh9W
.

--
Thanks & Regards
Prajwal Kumar Balugu
Skype: prajwalkumar48

@Sea-Eagle
what do u mean by google Api domains. i just entered play.googleapis.com in Exception Domains its not working for me

Same error , Xcode Version: XCode 9.2, anyone has any idea for this issue?

2018-03-11 20:55:43.902174+0800 AppName[7197:3444330] [Firebase/Analytics][I-ACS023007] Firebase Analytics v.40005000 started
2018-03-11 20:55:43.902312+0800 AppName[7197:3444330] [Firebase/Analytics][I-ACS023008] To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see http://goo.gl/RfcP7r)
2018-03-11 20:55:54.014940+0800 AppName[7197:3444327] [BoringSSL] Function nw_protocol_boringssl_input_finished: line 1386 Peer disconnected during the middle of a handshake. Sending errSSLFatalAlert(-9802) alert
2018-03-11 20:55:54.984766+0800 AppName[7197:3444327] TIC TCP Conn Failed [1:0x1d416fd80]: 3:-9802 Err(-9802)
2018-03-11 20:56:08.974135+0800 AppName[7197:3444327] TIC TCP Conn Failed [3:0x1d416fe40]: 3:-9802 Err(-9802)
2018-03-11 20:56:18.727117+0800 AppName[7197:3444327] TIC TCP Conn Failed [4:0x1d416fd80]: 3:-9802 Err(-9802)
2018-03-11 20:56:19.479597+0800 AppName[7197:3444327] NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9802)
2018-03-11 20:56:19.479745+0800 AppName[7197:3444327] Task <B6AFD591-9280-4E0E-92B1-5B627B73A2C8>.<1> HTTP load failed (error code: -1200 [3:-9802])
2018-03-11 20:56:20.625462+0800 AppName[7197:3444518] Task <B6AFD591-9280-4E0E-92B1-5B627B73A2C8>.<1> finished with error - code: -1200

I'm getting this very same error. Using it from Xamarin.iOS

  • Compiling against iOS 11.3. Xamarin.iOS 11.9.1.24 (latest)
  • Network: Orange Spain. Tried wi-fi and cellular.
  • Xamarin.Firebase.iOS.CloudMessaging NuGet package (with Firebase.iOS.Core 4.0.13)
  • ATS: Default configuration. (no exceptions)
  • Device: iPhone 7, iOS 11.3

The error I'm getting:

Encounter network error. Code, error: -1200, Error Domain=NSURLErrorDomain Code=-1200 "An SSL error has occurred and a secure connection to the server cannot be made." UserInfo={_kCFStreamErrorCodeKey=-9802, NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, NSUnderlyingError=0x1c024c720 {Error Domain=kCFErrorDomainCFNetwork Code=-1200 "(null)" UserInfo={_kCFStreamPropertySSLClientCertificateState=0, _kCFNetworkCFStreamSSLErrorOriginalValue=-9802, _kCFStreamErrorDomainKey=3, _kCFStreamErrorCodeKey=-9802}}, NSLocalizedDescription=An SSL error has occurred and a secure connection to the server cannot be made., NSErrorFailingURLKey=https://play.googleapis.com/log, NSErrorFailingURLStringKey=https://play.googleapis.com/log, _kCFStreamErrorDomainKey=3}

Task <F67CC2EF-6606-4A36-9AE8-16386AFCD53D>.<1> HTTP load failed (error code: -999 [1:89])
Task <F67CC2EF-6606-4A36-9AE8-16386AFCD53D>.<1> finished with error - code: -999

This was happening to me because I was blocking my main thread with DispatchGroup.wait() (which btw you should not do). Check to see if your main thread is blocked. I'm guessing part of the SSL handshake executes something asynchronously on the main queue.

This started happening to me today on a project where it was completely working before. 0 changes were made. Did anyone solve this issue?

This happened to me same as well. The whole code with no change was working completely fine in previous project.

+1

Any updates? :(

Today, I face that issue too.

I think @aleczadikian is correct it is blocking main thread. When i tried moving Firebase out of main thread it crashed saying main is required.
Try pushing Firebase with DispatchQueue.main.async {} this worked for me in one device but same behaviour in another. Still searching for concrete solution.

2019-07-24 11:10:00.660023+0530 5.16.0 - [Firebase/Analytics][I-ACS023007] Analytics v.50500000 started
2019-07-24 11:10:00.660186+0530 5.16.0 - [Firebase/Analytics][I-ACS023008] To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see http://goo.gl/RfcP7r)
2019-07-24 11:10:00.676636+0530 [Crashlytics] Version 3.12.0 (136)
2019-07-24 11:10:10.908083+0530 [BoringSSL] nw_protocol_boringssl_input_finished(1543) [C1.1:2][0x133e18950] Peer disconnected during the middle of a handshake. Sending errSSLClosedNoNotify(-9816) alert
2019-07-24 11:10:10.921315+0530 TIC TCP Conn Failed [1:0x280bb0540]: 3:-9816 Err(-9816)
2019-07-24 11:10:21.148004+0530 [BoringSSL] nw_protocol_boringssl_input_finished(1543) [C3.1:2][0x1355098c0] Peer disconnected during the middle of a handshake. Sending errSSLClosedNoNotify(-9816) alert
2019-07-24 11:10:21.151131+0530 TIC TCP Conn Failed [3:0x280bb1680]: 3:-9816 Err(-9816)
2019-07-24 11:10:21.287616+0530 [BoringSSL] boringssl_context_alert_callback_handler(3724) [C4.1:2][0x135508aa0] Alert level: fatal, description: inappropriate fallback
2019-07-24 11:10:21.287806+0530 [BoringSSL] boringssl_session_errorlog(224) [C4.1:2][0x135508aa0] [boringssl_session_handshake_incomplete] SSL_ERROR_SSL(1): operation failed within the library
2019-07-24 11:10:21.287906+0530 [BoringSSL] boringssl_session_handshake_error_print(205) [C4.1:2][0x135508aa0] 5186303224:error:1000043e:SSL routines:OPENSSL_internal:TLSV1_ALERT_INAPPROPRIATE_FALLBACK:/BuildRoot/Library/Caches/com.apple.xbs/Sources/boringssl/boringssl-109.250.2/ssl/tls_record.cc:586:SSL alert number 86
2019-07-24 11:10:21.287974+0530 [BoringSSL] boringssl_context_get_error_code(3617) [C4.1:2][0x135508aa0] SSL_AD_INAPPROPRIATE_FALLBACK
2019-07-24 11:10:21.290335+0530 TIC TCP Conn Failed [4:0x280badb00]: 3:-9860 Err(-9860)
2019-07-24 11:10:21.292540+0530 NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9860)
2019-07-24 11:10:21.292633+0530 Task .<1> HTTP load failed (error code: -1200 [3:-9860])
2019-07-24 11:10:21.292945+0530 Task .<1> finished with error - code: -1200

2019-07-24 11:10:31.201444+0530 Task .<1> load failed with error Error Domain=NSURLErrorDomain Code=-1200 "An SSL error has occurred and a secure connection to the server cannot be made." UserInfo={NSErrorFailingURLStringKey=https://play.googleapis.com/log, NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, _kCFStreamErrorDomainKey=3, _NSURLErrorFailingURLSessionTaskErrorKey=LocalUploadTask .<1>, _NSURLErrorRelatedURLSessionTaskErrorKey=(
"LocalUploadTask .<1>"
), NSLocalizedDescription=An SSL error has occurred and a secure connection to the server cannot be made., NSErrorFailingURLKey=https://play.googleapis.com/log, NSUnderlyingError=0x2830fed30 {Error Domain=kCFErrorDomainCFNetwork Code=-1200 "(null)" UserInfo={_kCFStreamPropertySSLClientCertificateState=0, _kCFNetworkCFStreamSSLErrorOriginalValue=-9860, _kCFStreamErrorDomainKey=3, _kCFStreamErrorCodeKey=-9860}}, _kCFStreamErrorCodeKey=-9860} [-1200]
2019-07-24 11:10:31.202237+0530 Encounter network error. Code, error: -1200, Error Domain=NSURLErrorDomain Code=-1200 "An SSL error has occurred and a secure connection to the server cannot be made." UserInfo={NSErrorFailingURLStringKey=https://play.googleapis.com/log, NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, _kCFStreamErrorDomainKey=3, _NSURLErrorFailingURLSessionTaskErrorKey=LocalUploadTask .<1>, _NSURLErrorRelatedURLSessionTaskErrorKey=(
"LocalUploadTask .<1>"
), NSLocalizedDescription=An SSL error has occurred and a secure connection to the server cannot be made., NSErrorFailingURLKey=https://play.googleapis.com/log, NSUnderlyingError=0x2830fed30 {Error Domain=kCFErrorDomainCFNetwork Code=-1200 "(null)" UserInfo={_kCFStreamPropertySSLClientCertificateState=0, _kCFNetworkCFStreamSSLErrorOriginalValue=-9860, _kCFStreamErrorDomainKey=3, _kCFStreamErrorCodeKey=-9860}}, _kCFStreamErrorCodeKey=-9860}
2019-07-24 11:10:31.202586+0530 5.16.0 - [GULNetwork][I-NET901017] Encounter network error. Code, error: -1200, Error Domain=NSURLErrorDomain Code=-1200 "An SSL error has occurred and a secure connection to the server cannot be made." UserInfo={NSErrorFailingURLStringKey=https://play.googleapis.com/log, NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, _kCFStreamErrorDomainKey=3, _NSURLErrorFailingURLSessionTaskErrorKey=LocalUploadTask .<1>, _NSURLErrorRelatedURLSessionTaskErrorKey=(
"LocalUploadTask .<1>"
), NSLocalizedDescription=An SSL error has occurred and a secure connection to the server cannot be made., NSErrorFailingURLKey=https://play.googleapis.com/log, NSUnderlyingError=0x2830fed30 {Error Domain=kCFErrorDomainCFNetwork Code=-1200 "(null)" UserInfo={_kCFStreamPropertySSLClientCertificateState=0, _kCFNetworkCFStreamSSLErrorOriginalValue=-9860, _kCFStreamErrorDomainKey=3, _kCFStreamErrorCodeKey=-9860}}, _kCFStreamErrorCodeKey=-9860}
2019-07-24 11:10:31.203564+0530 5.16.0 - [Firebase/Core][I-COR000020] Error posting to Clearcut: Error Domain=NSURLErrorDomain Code=-1200 "An SSL error has occurred and a secure connection to the server cannot be made." UserInfo={NSErrorFailingURLStringKey=https://play.googleapis.com/log, NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, _kCFStreamErrorDomainKey=3, _NSURLErrorFailingURLSessionTaskErrorKey=LocalUploadTask .<1>, _NSURLErrorRelatedURLSessionTaskErrorKey=(
"LocalUploadTask .<1>"
), NSLocalizedDescription=An SSL error has occurred and a secure connection to the server cannot be made., NSErrorFailingURLKey=https://play.googleapis.com/log, NSUnderlyingError=0x2830fed30 {Error Domain=kCFErrorDomainCFNetwork Code=-1200 "(null)" UserInfo={_kCFStreamPropertySSLClientCertificateState=0, _kCFNetworkCFStreamSSLErrorOriginalValue=-9860, _kCFStreamErrorDomainKey=3, _kCFStreamErrorCodeKey=-9860}}, _kCFStreamErrorCodeKey=-9860}, with Status Code: 0
2019-07-24 11:10:33.962692+0530 [BoringSSL] nw_protocol_boringssl_get_output_frames(1301) [C5.1:2][0x13520fc90] get output frames failed, state 8196
2019-07-24 11:10:33.962966+0530 [BoringSSL] nw_protocol_boringssl_get_output_frames(1301) [C5.1:2][0x13520fc90] get output frames failed, state 8196
2019-07-24 11:10:33.963615+0530 TIC Read Status [5:0x0]: 1:57
2019-07-24 11:10:33.963744+0530 TIC Read Status [5:0x0]: 1:57
2019-07-24 11:10:34.230760+0530 [BoringSSL] nw_protocol_boringssl_get_output_frames(1301) [C6.1:2][0x135215370] get output frames failed, state 8196
2019-07-24 11:10:34.231430+0530 [BoringSSL] nw_protocol_boringssl_get_output_frames(1301) [C6.1:2][0x135215370] get output frames failed, state 8196
2019-07-24 11:10:34.232251+0530 TIC Read Status [6:0x0]: 1:57
2019-07-24 11:10:34.232324+0530 TIC Read Status [6:0x0]: 1:57

Did you have any joy with this? 1 in 5 (ish) app starts are causing a crash with similar errors:

nw_protocol_boringssl_input_finished(1543) <private>[0x10583d2f0] Peer disconnected during the middle of a handshake. Sending errSSLClosedNoNotify(-9816) alert
TIC TCP Conn Failed [1:0x280c92ac0]: 3:-9816 Err(-9816)

@alexcroox
No solution yet, But i found that this is happing only with mobile data network (LTE Voice) and also specific to one network only, with other network providers it works fine.

Hope this will help you in some way !!

I deploy my app to a dedicated test iPhone 6 that only has wifi (no carrier network) and like @alexcroox this is happening about 1 out of every 4 or 5 app starts. Never seen it before until today. In fact, the frequency is increasing each time I run the app.

I am not directly using this sdk however I am using Cordova-plugin-firebasex which pulls a firebase sdk into it. But two different firebase uses and users having the same issue. I just moved to firebasex plugin too because the older repo's (cordova-plugin-firebase/cordova-plugin-firebase-lib) weren't being updated properly to manage breaking changes google introduce in mid June. I have no idea whats causing this or even where to look. But maybe adding my experience here will help others hone in on what the actual issue is.

[BoringSSL] nw_protocol_boringssl_input_finished(1543) [C3.1:2][0x12fd335c0] Peer disconnected during the middle of a handshake. Sending errSSLClosedNoNotify(-9816) alert
TIC TCP Conn Failed [3:0x2805712c0]: 3:-9816 Err(-9816)
[BoringSSL] nw_protocol_boringssl_input_finished(1543) [C5.1:2][0x12fe46470] Peer disconnected during the middle of a handshake. Sending errSSLClosedNoNotify(-9816) alert
TIC TCP Conn Failed [5:0x280575f80]: 3:-9816 Err(-9816)
[BoringSSL] boringssl_context_alert_callback_handler(3724) [C6.1:2][0x12fd43710] Alert level: fatal, description: inappropriate fallback
[BoringSSL] boringssl_session_errorlog(224) [C6.1:2][0x12fd43710] [boringssl_session_handshake_incomplete] SSL_ERROR_SSL(1): operation failed within the library
[BoringSSL] boringssl_session_handshake_error_print(205) [C6.1:2][0x12fd43710] 5097281768:error:1000043e:SSL routines:OPENSSL_internal:TLSV1_ALERT_INAPPROPRIATE_FALLBACK:/BuildRoot/Library/Caches/com.apple.xbs/Sources/boringssl/boringssl-109.250.2/ssl/tls_record.cc:586:SSL alert number 86
[BoringSSL] boringssl_context_get_error_code(3617) [C6.1:2][0x12fd43710] SSL_AD_INAPPROPRIATE_FALLBACK
TIC TCP Conn Failed [6:0x280576640]: 3:-9860 Err(-9860)
NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9860)
Task <02ADA890-35C5-4DE7-B0E5-6EC812CF79E6>.<1> HTTP load failed (error code: -1200 [3:-9860])
Task <02ADA890-35C5-4DE7-B0E5-6EC812CF79E6>.<1> finished with error - code: -1200
nw_protocol_boringssl_get_output_frames(1301) [C1.1:2][0x12fe15ea0] get output frames failed, state 8196
nw_protocol_boringssl_get_output_frames(1301) [C1.1:2][0x12fe15ea0] get output frames failed, state 8196

@Sea-Eagle - could you specific exactly what you added as a domain exception. Here is what I currently have in my plist file, what else should I add? :

    <key>NSAppTransportSecurity</key>
    <dict>
        <key>NSAllowsArbitraryLoads</key>
        <true/>
        <key>NSExceptionDomains</key>
        <dict>
            <key>google.com</key>
            <dict>
                <key>NSIncludesSubdomains</key>
                <true/>
                <key>NSExceptionAllowsInsecureHTTPLoads</key>
                <true/>
            </dict>
        </dict>
    </dict>

I faced the same issue and what resolved was using crashlytics, since in my case the crash was cause by an unsuccessful api call. If helps, I described in more details what I did at stack overflow:
https://stackoverflow.com/questions/57498474/xcode-boringssl-peer-disconnect-causing-app-to-hang-on-startup/57683078#57683078

Was this page helpful?
0 / 5 - 0 ratings