Sign In Register

How can we help you today?

Start a new topic

Message received gets duplicated on mobile.


Sometimes (not always) I receive (OR the GS's code gets reiterated for 3/6 times ) multiple messages and this crash my app.

This only happens on my mobile (Android) and it happens with various kind of messages like TurnTakenMessage, ChallengeChatMessage or LogEventResponse.

There is no error popping out (in Unity), I can only see the debug "GS: RCV: GSMessageName etc" in the log various time when this error happens.

It may happen (but I am not sure) when the app has lost and regained focus. When it happens once it continues to happen from then on.

Any idea?

Hi Andrea,

What version of the SDK are you using ? Also if you can let us know what version of the Unity Editor you have installed that would be great. Do you have the messageId of a message that displayed multiple times on the client side please ? 



Unity 5.6.1f1.

GameSparks the last before the new (which I just have seen now and I am installing it now). Let me try with this version and whenever it happens again I will tell you, thanks.

Hi, it happened again. I have checked in the messages collection and I have only one message per person for the same turn, which is correct. I guess.

However in the Logcat I have 5/6 times the same message repeated.

This reminds me of when an error inside a piece of code in the response callback action occurs, in the editor it doesn't give error but a simple debug from GS and it continues to reiterate the same code block indefinitely. But here it happens only for 5/6 times and it could happen with any message, that's why I doubt it's an error within my code. It may be a not correct setting but it seems everything is fine.

I noticed also that it happens only when the screen has gone previously off.

Anybody can help?

My idea is: Android's screen goes off or when it the app goes background Android OS puts the app in pause. So, when the app comes back on foreground then GS is not available because the connection might be lost? Or something?

I say this because any time I swap desktop on my mac and come back again the console shows some activity from GS trying to connect again. If I pause the game in the editor and then I swap between desktop to come back again then GS doesn't 
recognise it and requests don't work.

Could it be a similar behaviour with Android's app management?

Hi Team. Still have the same issue. Have you got any new information about solution?


Hi Andrii,

Can you raise this as a ticket please ? 



We had faced a hard to debug multiple message issue as well. In our case the cause was initializing the gamesparks sdk multiple times using GS api. Try removing any code based initialization calls and rely on the scene object to handle initialization.

Login to post a comment