Flash sdk recovering connection problem

0 votes


I am testing recovering connection feature using your debug build with trace enabled. I am doin this just by turning my LAN on and off. When my connection should be recovered i get auth_error instead. How can i solve this problem ?

Here is trace:

AppWarpTrace 14:05:47 GMT+0300:[Socket]Connected
AppWarpTrace 14:05:47 GMT+0300:[Request] Request Type : 1 Payload : {"apiKey":"6c76a632f9d4066bc6859730d1ac53b9d5e5cd15c62ea4adb62786e3abf5312e","signature":"EZLuw%2FIsEAuUBQsSo2fC2F9a3lw%3D","timeStamp":"2014-05-21T11:5:47.875Z","user":"123","recoverytime":30,"keepalive":60,"version":"AS_1.6"}
AppWarpTrace 14:05:48 GMT+0300:[Response] Request Type : 1 Result : 1 Payload : Incorrect Signature
onConnectDone 1

My onConnectDone listener looks like this:
private function onConnectDone(res:int):void

trace("onConnectDone " + res); 

if(res == ResultCode.connection_error_recoverable)




asked May 21, 2014 in AppWarp by makskamyshnikov (10 points)
recategorized Oct 26, 2014 by sushil

1 Answer

0 votes
Are you setiing the recovery allowance before connecting to appwarp servers. You have to call the setRecoverAllowance() method with number of seconds you want.

Remember recoverConnection will only work if this method is called within the time interval you defined in setRecoveryAllowance.

Also do test with the original SDK. The debug version includes few changes that were made to debug the connection error issue.
answered May 21, 2014 by Suyash Mohan (900 points)
Yes i call setRecoverAllowance(30)  before initialization. Also you can see it in AppWarpTrace in recoverytime parameter.
When turning off LAN  i wait around 5-10 seconds to turn it on back. So it is less than value defined in recoveryAllowance.
Sometimes sdk recovers my connection successfully but more often it returns auth_error.
I have same situation in your uriginal sdk. As you can see problem in debug sdk that signature is incorrect. Unfortunately i can't tell what problem is in original SDK because there is no debug trace in response.

We have created a sample demo to show how to use connection resiliency. The sample has latest SDK. Please take a look https://github.com/SuyashMShepHertz/FlashAppWarpConnectionResiliencySample
Thanks for your sample. I did 1 small change in your code: in line 60 i added appwarp.recoverConnection(); http://codeshare.io/LRrZI . This will reproduce my issue. I can also reproduce this issue if i spam "Recover" button at the moment when connection should be restored.
NOTE: If this issue happens i can't connect anymore. onConnectionDone listener always returns bad_request.
Okay, I will be debugging the SDK to reproduce the issue and will try to solve it if any found. Will post here when error is solved.
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 support@shephertz.com