Intermittent resiliency issues with AppWarp on Swift iOS app

0 votes


Hi folks,

I’ve been trying to use the AppWarp Swift client as part of an iOS app I’m working on.  I’ve been
trying to debug an intermittent problem with resiliency.  The first debug trace is from the app running
on an iPhone and spitting on debug info around AppWarp connect events.  This shows two good
recoveries and one that could not recover.   

The final trace is from an Xcode simulator running at the same time in the same room.  It dropped shortly 
after with the same symptoms - but this one has the AppWarp detailed trace info enabled. 

I guess the main question is what would cause an Auth_Error to come back after trying to
reconnect a Connection_Error_Recoverable event ?   And second - what would best way
to reconnect that player that got dropped.

Thanks for any guidance and wisdom !




asked Apr 10, 2016 in iOS by ejm (15 points)

1 Answer

0 votes

Auth_Error comes if you call recoverConnection after the recoveryAllowanceTime you have set. In this case, you have to call connectWithUserName API again to start a new session.

Please check if this is the case and let me know if problem continues.

answered Apr 10, 2016 by rajeev.etc (1,660 points)
Hi Rajeev - Thanks for looking at my issue.  I've updated the trace with
cleaner timestamps - you can see the app is attempting recovering within
10sec of the initial disconnect.  Resiliency timeout is set to 360sec. So - there
is a failure to reconnect even though it is within the window.

AppWarpTrace: NSStreamEventErrorOccurred
AppWarpTrace: -[WarpClient onConnect:]..value=0...connectionState=0..sessionId=-64298482
AppWarpTrace: -[WarpClient raiseConnectionListenerWithResult:]..result=9

# This timestamp shows the initial disconnect event
<Debug> 4/11/16, 10:36:51 PM onConnectDone event
<Debug> onConnectDone ErrorCode=9  State=Optional("Connection_Error_Recoverable")

AppWarpTrace: NSStreamEventErrorOccurred
AppWarpTrace: -[WarpClient onConnect:]..value=0...connectionState=2..sessionId=-64298482
AppWarpTrace: NSStreamEventErrorOccurred
AppWarpTrace: -[WarpClient onConnect:]..value=0...connectionState=2..sessionId=-64298482

<Debug> <hasConnectivity> : Internet connectivity is OK

# This timestamp show the recoverConnection being invoked from the app
<Debug> *** Recovery try at time: 4/11/16, 10:37:01 PM   Counter=1
<Debug> <recoverConnection> : Network status true
<Debug> <recoverConnection> : recovery initiated

AppWarpTrace: -[WarpClient recoverConnection]
AppWarpTrace: -[WarpClient recoverConnection]..Connecting
AppWarpTrace: -[ClientChannel initNetworkCommunication]..warpServerHost=
AppWarpTrace: Stream opened
AppWarpTrace: Stream opened
AppWarpTrace: -[WarpClient onConnect:]..value=1...connectionState=4..sessionId=-64298482
AppWarpTrace: -[WarpClient sendAuthenticationRequestForUser:withSessionId:]..user=ejmSim...sessionId=-64298482
AppWarpTrace: -[WarpClient handleAuthResponse:]...result=1..type=1
AppWarpTrace: json=(null)..connectionState=2
AppWarpTrace: -[WarpClient raiseConnectionListenerWithResult:withReasonCode:]..result=1

# This timestamp shows the result of the reconnect attempt
<Debug> 4/11/16, 10:37:07 PM onConnectDone event
<Debug> onConnectDone ErrorCode=1  State=Optional("Auth_Error")
I have tested the same at my end and it is working fine. Could you please share your sample project with us so that i can look into it? It will help us to debug the problem.

Please share your project at .

Also, the recommended value for recoveryAllowanceTime is 60 or 120 secs from our side.

Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on