BoringSSL debug error xcode 9 ios 11 swift4

On Xcode 9, iOS 11, swift 4, while debugging on my device I get this erroneous error output:


[] network_config_register_boringssl_log_debug_updates Failed to register for BoringSSL log debug updates
[BoringSSL] Function boringssl_context_get_peer_npn_data: line 1212 Peer's advertised NPN data is NULL or empty


Any idea what's causing this? Does iOS 11 use BoringSSL now?


Thank!

  • I also meet this issue when calling an Open API at https://rest.coinapi.io/ Still can not find any valid solutions. Does anyone have the answer?

  • Same issue here. StackOverflow answers to this only show how to hide the log messages, and that is not feasible

Add a Comment

Replies

Errors in Erlang on MacOS 10.13 when trying to use SSL as well.


Eshell V8.2  (abort with ^G)
1> ssl:start().
ok
2> ssl:connect("google.com", 443, []).
Assertion failed: (ctx), function digest_update, file /BuildRoot/Library/Caches/com.apple.xbs/Sources/boringssl/boringssl-88.0.0.1.1/apple/crypto/digests.c, line 47.


Did you drop support for OpenSSL in 10.13?

Yep, Elixir is DOA too.


https://github.com/elixir-lang/elixir/issues/6200

I'm having the same issue - I have looked everywhere ang can't find the answer.


App works on simulator but it doesn't work on actual Watch:


2017-06-18 21:50:28.446594-0400 HAWatch Extension[343:55565] [] network_config_register_boringssl_log_debug_updates Failed to register for BoringSSL log debug updates

2017-06-18 21:50:28.453772-0400 HAWatch Extension[343:55565] dnssd_clientstub ConnectToServer: connect()-> No of tries: 1

2017-06-18 21:50:29.457825-0400 HAWatch Extension[343:55565] dnssd_clientstub ConnectToServer: connect()-> No of tries: 2

2017-06-18 21:50:30.463674-0400 HAWatch Extension[343:55565] dnssd_clientstub ConnectToServer: connect()-> No of tries: 3

2017-06-18 21:50:31.468026-0400 HAWatch Extension[343:55565] dnssd_clientstub ConnectToServer: connect() failed path:/var/run/mDNSResponder Socket:7 Err:-1 Errno:1 Operation not permitted

2017-06-18 21:50:31.468344-0400 HAWatch Extension[343:55565] [] nw_resolver_create_dns_service_locked DNSServiceCreateDelegateConnection failed: ServiceNotRunning(-65563)

2017-06-18 21:50:31.470633-0400 HAWatch Extension[343:55565] TIC TCP Conn Failed [1:0x175bcf90]: 10:-72000 Err(-65563)

2017-06-18 21:50:31.552911-0400 HAWatch Extension[343:55565] HTTP load failed (error code: -1009 [10:-72000]) for Task <808FCE12-AB53-4887-827B-296ED558F7A1>.<0>

2017-06-18 21:50:31.562270-0400 HAWatch Extension[343:55524] NSURLConnection finished with error - code -1009

Did you solve this error. I have the exact same error when I resume a dataTask

URLSession.shared.dataTask(with: URL(string: "https://irail.be/stations/NMBS")!)

Nope. nothing yet.

Also geting this error when use https://

Any solution?

TIC SSL Trust Error [2:0x604000172900]: 3:0

NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9813)

Task <637687E5-6AA0-435F-A46B-5DA1A3569F59>.<0> HTTP load failed (error code: -1202 [3:-9813])

NSURLConnection finished with error - code -1202

Did you solve this error. I have the exact same error when I resume a dataTask

Xcode 9; OS10.12.6

2017-10-16 20:46:19.541862+0800 RSSReaderForMac[8300:316488] dnssd_clientstub ConnectToServer: connect()-> No of tries: 1

2017-10-16 20:46:20.550294+0800 RSSReaderForMac[8300:316488] dnssd_clientstub ConnectToServer: connect()-> No of tries: 2

2017-10-16 20:46:21.555053+0800 RSSReaderForMac[8300:316488] dnssd_clientstub ConnectToServer: connect()-> No of tries: 3

2017-10-16 20:46:22.562131+0800 RSSReaderForMac[8300:316488] dnssd_clientstub ConnectToServer: connect() failed path:/var/run/mDNSResponder Socket:11 Err:-1 Errno:1 Operation not permitted

2017-10-16 20:46:22.562481+0800 RSSReaderForMac[8300:316488] [] nw_resolver_create_dns_service_locked DNSServiceCreateConnection failed: ServiceNotRunning(-65563)


Mac App Dbug,

[BoringSSL] Function boringssl_session_errorlog: line 2871 [boringssl_session_read] SSL_ERROR_ZERO_RETURN(6): operation failed because the connection was cleanly shut down with a close_notify alert

] [BoringSSL] Function boringssl_session_errorlog: line 2871 [boringssl_session_read] SSL_ERROR_ZERO_RETURN(6): operation failed because the connection was cleanly shut down with a close_notify alert


I got the same log, do you solve it?

Has anybody found a solution to this problem? I have been facing this issue. The funny thing is I use the same NSMutableURLRequest to call an api which works fine and i get response. But when when I call a different api on another server it doesn't work and I don't get any response. Hence these in my error logs:

2018-05-14 10:59:28.426097+0000 MyVoda[3570:476772] [BoringSSL] Function boringssl_session_errorlog: line 2871 [boringssl_session_read] SSL_ERROR_ZERO_RETURN(6): operation failed because the connection was cleanly shut down with a close_notify alert

2018-05-14 10:59:28.426259+0000 MyVoda[3570:476772] TIC Read Status [1:0x6040001768c0]: 1:57

2018-05-14 10:59:28.426609+0000 MyVoda[3570:476772] [BoringSSL] Function boringssl_session_errorlog: line 2871 [boringssl_session_read] SSL_ERROR_ZERO_RETURN(6): operation failed because the connection was cleanly shut down with a close_notify alert

2018-05-14 10:59:28.426840+0000 MyVoda[3570:476772] Task <EBAE4678-4757-4C39-9556-69B335D81965>.<1> HTTP load failed (error code: -1005 [4:-4])

2018-05-14 10:59:28.427053+0000 MyVoda[3570:476054] Task <EBAE4678-4757-4C39-9556-69B335D81965>.<1> finished with error - code: -1005

error is Error Domain=NSURLErrorDomain Code=-1005 "The network connection was lost." UserInfo={NSUnderlyingError=0x60400024ca80 {Error Domain=kCFErrorDomainCFNetwork Code=-1005 "(null)" UserInfo={NSErrorPeerAddressKey=<CFData 0x608000099230 [0x110c31bb0]>{length = 16, capacity = 16, bytes = 0x100201bb5057462e0000000000000000}, _kCFStreamErrorCodeKey=-4, _kCFStreamErrorDomainKey=4}}, NSErrorFailingURLStringKey="myapi" NSErrorFailingURLKey="myapi", _kCFStreamErrorDomainKey=4, _kCFStreamErrorCodeKey=-4, NSLocalizedDescription=The network connection was lost.}.

Can any body help?

i also . are you solution?

[BoringSSL] Function boringssl_session_errorlog: line 2871 [boringssl_session_read] SSL_ERROR_ZERO_RETURN(6): operation failed because the connection was cleanly shut down with a close_notify alert


I also . are you solution?

No answer yet?

Hi, I found this solution, and it works for me. Open Xcode scheme editor and add a new environment variable OS_ACTIVITY_MODE and set to disable.

  • Setting 'OS_ACTIVITY_MODE = disable' also disables output from NSLog(). If you use NSLog() for debugging or test, this isn't a useful work-around.

Add a Comment

The same problem Everything was working perfectly and then suddenly this happened.  [boringssl] boringssl_metrics_log_metric_block_invoke(151) Failed to log metrics The data couldn’t be read because it isn’t in the correct format.

These annoying messages come from libboringssl.dylib :: boringssl_metrics_log_event:

int boringssl_metrics_log_event(...) {
  ...
  if (g_boringssl_log != nil && os_log_type_enabled(g_boringssl_log, OS_LOG_TYPE_ERROR) {
    os_log_error(g_boringssl_log, "%s(%d) Failed to log metrics", "boringssl_metrics_log_metric_block_invoke", 151);
  }
  ...
}

An easy way to silence these messages is to nullify g_boringssl_log.

g_boringssl_log is a global variable:

os_log_t g_boringssl_log = nil;

It gets initialized in boringssl_log_open:

void boringssl_log_open() {
   static dispatch_token onceToken = nil;
   dispatch_once(onceToken, ^{
     g_boringssl_log = os_log_create("com.apple.network", "boringssl");
   });
}

IMO the easiest solution to nullify g_boring_ssl is to skip the execution of dispatch_once.

That could be achieved with setting a breakpoint to __boringssl_log_open_block_invoke with action thread return. This breakpoint will be called once thanks to dispatch_once, but the function's body will not be executed because of immediate thread return. So g_boringssl_log will never be initialized, and there will be no logs in the Console.

  • You are a genius! =) Thanks!

Add a Comment