onConnectDone not called on disconnection!

0 votes

Hi, i tested my game on Xiaomi Redmi and oddly enough the device wasn't getting any onConnectDone callback on disconnection. Also while playing the game the device disconnects (almost always) within few seconds after joining the room, don't know why. The disconnection is realised by the onUserLeft notification on any other device that is connected to the same room.

The game works smoothly on desktop and my 2nd mobile (Xperia Sola) and shows onConnectDone error whenever network disconnection occurs.

Note: I am not using Connection Resilency feature provided by Appwarp.

Details:

Deveoped on Unity (Free).

Using Appwarp v1.7.6.

 

Kindly help me out.

closed with the note: Closing this thread as there was no update from last 2 Weeks or more. Please raise a new query if problem persists.
asked Nov 14, 2014 in AppWarp by nikhil.jolly30 (15 points)
closed Aug 17, 2015 by sushil
Hi Nikhil,
We have not tested the SDK on this particular device but normally this should not happen if the listeners are added properly.
Also i recommend you to try AppWarp V1.10, and please let us know if this solves the issue.
We will also try to test this scenario at this particular device and let you know as soon as possible.
Thanks.
Hi Rajeev,
Thanku for replying. I just tried everything with Appwarp v1.10 and the problem still persists.
As before, the game works just fine on my laptop and my other mobile phone.
The device just stops getting any callbacks from appwarp and after few seconds the other device connected to the room receives onUserLeft callback.
Even on deliberate disconnection onConnectDone is not called.

I cannot figure out why this is happening. Is there a way to narrow down the problem?

Also, sometimes if I take turn on both devices very fast, things seem to workout. And the moment i stop for 2-3 seconds on any of the device disconnection occurs and UserLeft pops up on the 2nd device. Jugaad :P
Hi,
I request you to turn on debug logs of WarpClient using enableTrace method. This will print detailed logs in logcat. So please connect your mobile to your PC and run the adb logcat in command prompt. Now run the application. After the issue has occurred send us the whole logs from logcat
Hi,

I am having issues with this too. I updated to AppWarp 1.10.

But i can not see the method enableTrace in Unity.
WarpClient.GetInstance().enableTrace does not exist.

Thanks,
Same here, i cannot see the method enableTrace in Unity.
Thanks.
Hi,
Please download the SDK from here https://www.dropbox.com/s/y2w57qui9diy1g3/AppWarpUnity.zip?dl=0

This is a TEMPORARY build. DONOT use it in production. Implement an onLog method in connection listener. And call the enableTrace method with argument true. You will start to get responses for each and every request. Take your unity game to redmi device and then share the generated logs with us.
Sorry for late reply. I have been busy with my exams.
RedMI connects other already created room

-- Omitted irrelevant results

I/Unity   Start online game
I/Unity   Board Awake! Online:True
I/Unity   appwarp started!
--
I/Unity   onLog: Response Type : 1
I/Unity   Response Result : 0
I/Unity   Response : System.Byte[]
--
I/Unity   onConnectDone : 0
--
I/Unity   onLog: Response Type : 37
I/Unity   Response Result : 0
I/Unity   Response : System.Byte[]
--
I/Unity   onJoinRoomDone : 0
--
I/Unity   Room : --
--
I/Unity   onLog: Response Type : 8
I/Unity   Response Result : 0
I/Unity   Response : System.Byte[]
--
I/Unity   onSubscribeRoomDone : 0
--
I/Unity   onLog: Response Type : 12
I/Unity   Response Result : 0
I/Unity   Response : System.Byte[]
--
I/Unity   onSendChatDone: 0
--
I/Unity   onLog: Notification Type : 9
I/Unity   Notification : System.Byte[]
--
I/Unity   onChatReceived: Start
--
I/Unity   sender: --
--
I/Unity   onLog: Notification Type : 16
I/Unity   Notification : System.Byte[]
--
I/Unity   OnGameStarted: --
I/Unity   Timer Started
--
I/Unity   isMyTurn: False
--
I/Unity   onLog: Notification Type : 13
I/Unity   Notification : System.Byte[]
--
I/Unity   onMoveCompleted: ---

I/Unity   isMyTurn: True - Initiated by move complete
--
I/Unity   Timer Restarted - Initiated by move complete

No response after this from the api. And in a few seconds you get OnUserLeftRoom notification on the other device.
The other device i.e. PC, creates room and RedMI's (this) device joins

onLog: Response Type : 1
Response Result : 0
Response : System.Byte[]
onConnectDone : 0
onLog: Response Type : 37
Response Result : 2
Response : System.Byte[]
onJoinRoomDone : 2
onLog: Response Type : 6
Response Result : 0
Response : System.Byte[]
OnCreateRoomDone: com.shephertz.app42.gaming--
onLog: Response Type : 7
Response Result : 0
Response : System.Byte[]
onJoinRoomDone : 0
onLog: Response Type : 8
Response Result : 0
Response : System.Byte[]
onSubscribeRoomDone : 0
Waiting for user!
onLog: Response Type : 63
Response Result : 0
Response : System.Byte[]
onLog: Response Type : 63
Response Result : 0
Response : System.Byte[]
onLog: Response Type : 63
Response Result : 0
Response : System.Byte[]
onLog: Response Type : 63
Response Result : 0
Response : System.Byte[]
onLog: Notification Type : 5
Notification : System.Byte[]
OnUserJoinedRoom:635524324----
onLog: Response Type : 63
Response Result : 0
Response : System.Byte[]
onLog: Notification Type : 9
Notification : System.Byte[]
onChatReceived: Start
onLog: Response Type : 66
Response Result : 0
Response : System.Byte[]
onStartGameDone: 0
onLog: Notification Type : 16
Notification : System.Byte[]
OnGameStarted: ---
Timer Started
isMyTurn: True
onLog: Response Type : 63
Response Result : 0
Response : System.Byte[]
onLog: Response Type : 63
Response Result : 0
Response : System.Byte[]
move sent
onLog: Response Type : 31
Response Result : 0
Response : System.Byte[]
onSendMoveDone: 0
onLog: Notification Type : 13
Notification : System.Byte[]
onMoveCompleted: ---
isMyTurn: False
Timer Restarted
onLog: Response Type : 63
Response Result : 0
Response : System.Byte[]
onLog: Notification Type : 6
Notification : System.Byte[]
OnUserLeftRoom:635524----
What about onConnectDone? Did you also received connection error in onConnectDone on redmi device?
No, ofc not. I wrote:
RedMI connects other already created room

I/Unity   Start online game
--
I/Unity   onConnectDone : 0
--

PS: The game starts successfully but after few seconds the api stops responding. It gives no notification, no error..nothing; as you can see in my logs. Even on deliberate disconnection there is no respond.


PPS: Were you guys able to test it on your side on a Redmi device?
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
...