Sign In Register

How can we help you today?

Start a new topic
Answered

Unity WebGL (on Facebook) - No response from GameSparks

We have a problem while trying to integrate GameSparks in WebGL build (on Facebook). At first we were getting time out exception. We fixed that by setting RequestTimeoutSeconds of PlatformBase class to large number (300). But even after that, we do not get response from GameSparks. Actually, we did get response a few times and in those cases GameSparks initialized well, but that happens very rarely. In Android build, or in Unity editor everything works well - so the problem happens only in WebGL build. We made very simple testing environment, so we attached LoginManager script that we used and that is mostly based on your tutorial for Facebook login. We also noticed that WebSockets are constantly being opened and closed, so here are some logs from web browser console regarding to that:

 

WebSocket onopen7: Connected [object Event] 
GS: OPENED
UnityEngine.Debug:Log(Object)
GameSparks.Platforms.<DebugMsg>c__AnonStorey5:<>m__B()
System.Action:Invoke()
GameSparks.Platforms.PlatformBase:Update()
GameSparks.Platforms.WebGL.WebGLPlatform:Update()

WebSocket onclose7 
Remove Socket: 7 
Array [ Object ] 
found: 0 
splice:  
GS Initialize websocket8: GameSparks 
"request open socket8: wss://gsp-aeu000-se01.gamesparks.net/ws/[DELETED]?deviceOS=WP8&deviceID=[DELETED]&SDK=" 
GS: Connecting to:wss://gsp-aeu000-se01.gamesparks.net/ws/[DELETED]?deviceOS=WP8&deviceID=[DELETED]&SDK=
UnityEngine.Debug:Log(Object)
GameSparks.Platforms.<DebugMsg>c__AnonStorey5:<>m__B()
System.Action:Invoke()
GameSparks.Platforms.PlatformBase:Update()
GameSparks.Platforms.WebGL.WebGLPlatform:Update()

WebSocket onopen8: Connected [object Event] 
GS: OPENED
UnityEngine.Debug:Log(Object)
GameSparks.Platforms.<DebugMsg>c__AnonStorey5:<>m__B()
System.Action:Invoke()
GameSparks.Platforms.PlatformBase:Update()
GameSparks.Platforms.WebGL.WebGLPlatform:Update()

If there is anything more that we could provide, please let us now.

cs

Best Answer

It turned out that Avast antivirus was blocking communication with GameSparks. The solution was to turn off option "Enable HTTPS scanning" in "Web Shield" settings of Avast antivirus.

1 Comment

Answer

It turned out that Avast antivirus was blocking communication with GameSparks. The solution was to turn off option "Enable HTTPS scanning" in "Web Shield" settings of Avast antivirus.


1 person likes this
Login to post a comment