AppWarp Xamarin KeepAliveTimer Always Expires

0 votes


I am working on an app using the AppWarp SDK for Xamarin.Android on my HTC EVO 4G LTE running Android 4.1.1 and for some reason once I connect to AppWarp after a short period of time (between 5-60 seconds) I always get a SocketException thrown that says "The socket is not connected". When I look at the call stack I see this:

System.Net.Sockets.Socket.get_RemoteEndPoint () in 
com.shephertz.app42.gaming.multiplayer.client.ClientChannel.Send (data={byte[256]}, length=16) in 
com.shephertz.app42.gaming.multiplayer.client.ClientChannel.SendRequest (msg={ l 0 : 329103763 : }) in 
com.shephertz.app42.gaming.multiplayer.client.ClientChannel.keepAliveTimerExpired (source=(null)) in
System.Threading.Timer.Scheduler.TimerCB (o={System.Threading.Timer}) in
So it seems like the keepAliveTimer keeps expiring too quickly for some reason.
If I test on the Android emulator it happens a lot less frequently but I have also encountered it there. Is there any way you can help me with this? Perhaps by simply increasing the timer length before it expires as it is essentially making AppWarp unusable on my device and I really don't think there is much I can do to fix it.
asked May 14, 2015 in AppWarp by feraask (45 points)
Hi feraask,

We are looking into this issue. I will reply you back as soon as possible once we have found some solution.


1 Answer

0 votes
Hi Ferask,

I tested one of your projects that you sent earlier for AppWarp Xamarin SDK. I am unable to generate the same error as you posted. For us, no such error is being reproduced. Can you please provide us more details? How often does the error occur? Can you share some logs?

answered May 18, 2015 by Suyash Mohan (900 points)

If there is no error now then, I don't think creating a new build can be useful. I was going to add few extra exceptional handling to catch errors, but if they are not occurring now then it might not be much useful. Anyways in AppWarp SDK we have already handled connection and other issues. What happened in your case is a weird behavior as you yourself said it occurred only in HTC EVO LTE and that too disappeared after restarting.

Regarding what jovan.munroe said, we have used thread in SDK to run in background to collect data. When you put a break point, the main thread stops which results in crash. But this is not the case in real world scenarios as there are no break points.

Is there anyway you guys can at least make a build to stop that exception from being thrown when using breakpoints? I know that this will not happen when running the release versions of code but as a developer it is a real pain that I can't use a debugger to walk through my code without it crashing after a few seconds.
So would it be possible to just catch this exception in the AppWarp code and handle it as a connection issue? It is getting really frustrating when I am trying to debug and walkthrough another portion of my code not even related to AppWarp and then my app crashes because I lose connection to AppWarp and I get the KeepAliveTimer expired exception.
I have also noticed that on the latest build of AppWarp for Xamarin (found in one of the later responses on this page: ) if you try to disconnect it will throw a socket exception as well. If you guys could fix this bug I would really appreciate it.
hi. I have the same problem. Any updates on this?
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