question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

iOS: Simulator socket connection times out due to debugger

See original GitHub issue

Hi there! Thanks for the debugger, I use it daily and find it very helpful. 😀

After I rebuild in Xcode and launch the simulator, the socket connection to the debugger times out roughly 5 seconds after starting the app and the simulator crashes. Once I reload the simulator using command + R, I no longer have socket connection issues until the next time I rebuild.

Here’s a screenshot of the crash screen on the simulator: glass

Here are some excerpts from my Xcode log that may be helpful:

2016-12-09 16:10:56.114498 bulbasaur[21709:8268397] [] __tcp_connection_start_block_invoke 53 sending event TCP_CONNECTION_EVENT_TLS_HANDSHAKE_COMPLETE in response to state ready and error (null)
2016-12-09 16:10:56.114739 bulbasaur[21709:8268397] [] tcp_connection_event_notify 53 event: TCP_CONNECTION_EVENT_TLS_HANDSHAKE_COMPLETE, reason: nw_connection event, should deliver: true
2016-12-09 16:10:56.115090 bulbasaur[21709:8268397] [] tcp_connection_get_statistics DNS: 3ms/4ms since start, TCP: 16ms/277ms since start, TLS: 11ms/287ms since start
2016-12-09 16:11:24.680962 bulbasaur[21709:8256238] [] tcp_connection_cancel 50
2016-12-09 16:11:24.681405 bulbasaur[21709:8268396] [] nw_socket_handle_socket_event Event mask: 0x4
2016-12-09 16:11:24.681745 bulbasaur[21709:8256238] [] tcp_connection_cancel 51
2016-12-09 16:11:24.682188 bulbasaur[21709:8268396] [] nw_socket_handle_socket_event Socket received WRITE_CLOSE event
2016-12-09 16:11:24.683606 bulbasaur[21709:8268396] [] __nw_socket_service_writes_block_invoke sendmsg(fd 20, 31 bytes): socket has been closed
2016-12-09 16:11:24.683948 bulbasaur[21709:8268396] [] nw_endpoint_flow_protocol_error [50.2 *IP address* cancelled socket-flow (null)] Socket protocol sent error: [32] Broken pipe

cc @kkemple

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:6
  • Comments:21 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
jhen0409commented, Oct 4, 2017
1reaction
jhen0409commented, Sep 23, 2017

@Viral-Inc Thanks! Now I can reproduce the error by enable Hot Reloading in Expo project, but it actually got the same issue by using official debugger-ui page, and I can’t reproduce on regular RN project by the same way, so I think it may have some problem in Expo client.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Lost connection to the debugger | Apple Developer Forums
After updating Xcode to version 12.5 and using simulator 14.5, I'm getting disconnected all the time from the debugger. Please can someone help...
Read more >
React Native iOS Debugging Physical Device WebSocket ...
Trying to change RCTWebSocketExecutor.m to use my host machine's ip address instead of localhost does not work and prevents the pre-bundle file ...
Read more >
Troubleshooting connection issues | Socket.IO
First and foremost, please note that disconnections are common and expected, even on a stable Internet connection:
Read more >
WebSocket Real-Time Data Introduction (2022, iOS, Xcode 13)
In this video we will take a look at WebSockets in Swift & iOS. A type of url streaming session that lets us...
Read more >
Real time client-server communication with Socket.IO - Medium
Every server that implements socket has a list of connected sockets ... that is moving (Simulator -> Debug -> Location -> Freeway Drive)....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found