What are all of this new networking logs shown in Xcode 8?

I'm seing a lot of networking logs in Xcode 8, don't know what's going on or why they are being shown:


(Using *** to cover up IPs)


2016-06-21 16:24:30.700911 TestApp[32078:943842] [] nw_connection_endpoint_report  ******   in_progress socket-flow (satisfied)] reported event flow:start_connect
2016-06-21 16:24:30.736967 TestApp[32078:943842] [] nw_endpoint_flow_protocol_conn ******   7:443 in_progress socket-flow (satisfied)] Output protocol connected
2016-06-21 16:24:30.737893 TestApp[32078:943842] [] nw_endpoint_flow_connected_pat ******   .227:443 ready socket-flow (satisfied)] Connected path is satisfied
2016-06-21 16:24:30.738358 TestApp[32078:943842] [] nw_connection_endpoint_report  ******   ready socket-flow (satisfied)] reported event flow:finish_connect
2016-06-21 16:24:30.738766 TestApp[32078:943842] [] nw_connection_endpoint_report  ******    ready resolver (satisfied)] reported event flow:finish_connect
2016-06-21 16:24:30.739178 TestApp[32078:943842] [] nw_connection_endpoint_report  ******   ready socket-flow (satisfied)] reported event flow:changed_viability
2016-06-21 16:24:30.739521 TestApp[32078:943842] [] nw_connection_endpoint_report  ******    ready resolver (satisfied)] reported event flow:changed_viability
2016-06-21 16:24:30.740159 TestApp[32078:943842] [] nw_endpoint_start_tls_while_co ******   227:443 ready socket-flow (satisfied)]
2016-06-21 16:24:30.740818 TestApp[32078:943842] [] nw_connection_endpoint_report  ******   in_progress socket-flow (satisfied)] reported event flow:start_secondary_connect
2016-06-21 16:24:30.741060 TestApp[32078:943842] [] nw_connection_endpoint_report  ******    in_progress resolver (satisfied)] reported event flow:start_secondary_connect
2016-06-21 16:24:30.745744 TestApp[32078:943842] [] nw_connection_endpoint_report  ******   in_progress socket-flow (satisfied)] reported event flow:start_connect
2016-06-21 16:24:30.746033 TestApp[32078:943842] [] nw_connection_endpoint_report  ******    in_progress resolver (satisfied)] reported event flow:start_connect
2016-06-21 16:24:30.746284 TestApp[32078:943842] [] nw_endpoint_flow_protocol_conn ******   7:443 in_progress socket-flow (satisfied)] Transport protocol connected
2016-06-21 16:24:30.746668 TestApp[32078:943842] [] nw_connection_endpoint_report  ******   in_progress socket-flow (satisfied)] reported event flow:finish_transport
2016-06-21 16:24:30.746853 TestApp[32078:943842] [] nw_connection_endpoint_report  ******    in_progress resolver (satisfied)] reported event flow:finish_transport
2016-06-21 16:24:30.843705 TestApp[32078:942745] [] nw_endpoint_flow_protocol_conn ******   7:443 in_progress socket-flow (satisfied)] Output protocol connected
2016-06-21 16:24:30.844672 TestApp[32078:942745] [] nw_endpoint_flow_connected_pat ******   .227:443 ready socket-flow (satisfied)] Connected path is satisfied
2016-06-21 16:24:30.845141 TestApp[32078:942745] [] nw_connection_endpoint_report  ******   ready socket-flow (satisfied)] reported event flow:finish_connect
2016-06-21 16:24:30.845526 TestApp[32078:942745] [] nw_connection_endpoint_report  ******    ready resolver (satisfied)] reported event flow:finish_connect


What are these logs? Are they necessary? can I disable them?

Replies

Yeah they are quite overwhelming, doesnt make much sense to me. Usually the betas will have alot of extra logging in for debugging, give it a release or a few they might disappear.

+1 Me too!

Even worse it's hard to understand them


I'm trying to establish simple TCP connection using streams. After migration to Swift 3 I started to get error in log:

2016-07-05 21:39:32.221493 RealADSBtv[5073:396467] [] __nwlog_err_simulate_crash simulate crash already simulated "nw_socket_set_common_sockopts setsockopt SO_NOAPNFALLBK failed: [42] Protocol not available"
2016-07-05 21:39:32.224881 RealADSBtv[5073:396467] [] nw_socket_set_common_sockopts setsockopt SO_NOAPNFALLBK failed: [42] Protocol not available, dumping backtrace:
        [x86_64] libnetcore-839
    0   libsystem_network.dylib             0x0000000116daf41a __nw_create_backtrace_string + 123
    1   libnetwork.dylib                    0x00000001176ff62a nw_socket_add_input_handler + 2978
    2   libnetwork.dylib                    0x00000001176dd005 nw_endpoint_flow_attach_protocols + 3562
    3   libnetwork.dylib                    0x00000001176dd350 nw_endpoint_flow_setup_socket + 576
    4   libnetwork.dylib                    0x00000001176db937 -[NWConcrete_nw_endpoint_flow startWithHandler:] + 2357
    5   libnetwork.dylib                    0x00000001176f64ba nw_endpoint_handler_path_change + 2587
    6   libnetwork.dylib                    0x00000001176f59bb nw_endpoint_handler_start + 570
    7   libnetwork.dylib                    0x000000011770d802 nw_endpoint_resolver_start_next_child + 2095
    8   libdispatch.dylib

I'm getting similar log messages, but they don't seem to be causing any problems in my app. As @ImDeveloper1 says, this kind of logging usually goes away by the end of the beta period.

Any workaround to fix it? I have the same problem too.

Running on my device works fine.

Any work around to solve this

Still appears to be an issue with the Xcode 8 GA build. This makes parsing device logs quite difficult.

I am seeing this in the App store version as well, and on simulator no network requests are completting for cloudkit. As noted the app functions normaly when run on the device.


I am seeing this in the log : Protocol not available, dumping backtrace:

To turn off Verbose for OS Activity Mode, You simply go to project Edit Scheme-> Run (Left) -> Select Arguments -> On Environment Variables, add OS_ACTIVITY_MODE and value as disable. https://cl.ly/2j2Q1K1c2W0v

+1 same problem! How do I turn this off! 😠

You may also see these messages in the final release of Xcode 8 if there is a problem with your entitlements. Check the capabilities tab and look for any issues there. Was seeing the same thing and fixing a push notification entitlement prevented the messages from occurring. I'm guessing that maybe if your entitlements don't process some debug setting fires under the hood in Xcode?

Set an environment variable 'OS_ACTIVITY_MODE' = 'disable' in your debug scheme. Here's how...

http://stackoverflow.com/questions/37800790/hide-strange-unwanted-xcode-8-logs/39461256#39461256

Thanks Yoon Lee, that helped!

i got this particular error "nw_socket_set_common_sockopts" when my VPN went off and alamofire.request failed