10
2015-08-01 22:30:43.893 MyApp[2425:284133] ERROR: handshake failed ... The request timed out.
2015-08-01 22:30:43.896 MyApp[2425:284133] ERROR: handshake failed ... The request timed out.
2015-08-01 22:30:43.899 MyApp[2425:284133] ERROR: handshake failed ... The request timed out.
2015-08-01 22:30:43.912 MyApp[2425:284133] ERROR: handshake failed ... The request timed out.
2015-08-01 22:30:43.913 MyApp[2425:284133] ERROR: handshake failed ... The request timed out.
2015-08-01 22:30:43.913 MyApp[2425:284133] ERROR: handshake failed ... The request timed out.
2015-08-01 22:30:43.914 MyApp[2425:284133] ERROR: handshake failed ... The request timed out.
2015-08-01 22:30:43.914 MyApp[2425:284133] ERROR: handshake failed ... The request timed out.
2015-08-01 22:30:43.915 MyApp[2425:284133] ERROR: handshake failed ... The request timed out.
2015-08-01 22:30:43.915 MyApp[2425:284133] ERROR: handshake failed ... The request timed out.

I've been getting this at random times. How can I check exactly which framework/library is causing this? It just prints in my Xcode console.

picciano
  • 22,341
  • 9
  • 69
  • 82
TIMEX
  • 259,804
  • 351
  • 777
  • 1,080

5 Answers5

2

Look hat this Question it seems to be very similar, are you using a library which using a websocket server. Maybe this can solve your Problem very fast. If not please Post a list of librarys you use and form you code where you set up a socket.

Community
  • 1
  • 1
Bierbarbar
  • 1,399
  • 15
  • 35
0

Timeouts occur if an api does not respond for a long time, which is usually set to 15, 30 or 60 seconds.

Your timestamps are split across a second as well, which clearly says that you are using a socket connection and probably a library for the same, which is the issue here. Check the library you are using. It will be a server side issue.

Gautam Jain
  • 2,913
  • 30
  • 25
0

Some libraries in your project might use socket or SSL authentication.

In my case, I saw same error message, handshake failed, when I tried to send push notification to APNS server with wrong certificates.

It's hard to find which library or framework print out to the console. Try to remove 3rd party libraries included in the project until the error message stops appearing.

Joey
  • 2,912
  • 2
  • 27
  • 32
0

I think you are running a websocket server for your project. You have to run a socket.io server. That's why xcode is showing this error.

See this similiar post on stackoverflow My Socket.io on IOS fails to handshake with the websocket server

Some times when you use the push notification api sometimes the handshake failed error occurs , so read this apple documentation for trouble shooting if your push notification feature is logging this error App push notification troubleshooting

Community
  • 1
  • 1
Jijo John
  • 1,375
  • 9
  • 21
0

The way I can introduce may be not a good solution for you. And my answer works based on these two conditions

1.you have to comment nearlly all the "println" in your code

2.the instance call "println" to send error message

Then, you can set "Symbolic breakpoint" in "Debug menu -> Breakpoints -> Create Symbolic Breakpoint", and set condition to be "println"

(If the module is old, you may have to break at "NSLog" or some thing)

enter image description here

enter image description here

reference to how to set symbolic breakpoint: http://rshankar.com/debugging-swift-app-in-xcode/