I am trying to authenticate player with unity services and creating build for webGl.
Task StartSignInAsync(bool isSigningUp = false)
In the editor it works fine but in the web build i receive popup message
An error occurred running the Unity content on this page. See your browser JavaScript console for more info. The error was:
RuntimeError: memory access out of bounds at
U3CStartSignInAsyncU3Ed__53_MoveNext_m882471C50F5D5
77FBF821A297FBAB40CCE118819 (http://localhost:52711/Build/
Chang.wasm:wasm-function[77876]:0x29f24b0)....
Does this authentication works in webgl build or I miss something?
Just in case, my code below
public LoginTestController(LoginTestUi loginTestUi)
{
_view = loginTestUi;
Debug.Log("Controller constructor");
InitializeAsync();
}
private async void InitializeAsync()
{
_view.Init(OnLoginClick);
await UnityServices.InitializeAsync();
PlayerAccountService.Instance.SignedIn += OnSignedIn;
_isInitialized = true;
}
private void OnLoginClick()
{
Debug.Log("OnLoginClick");
if (!_isInitialized || _isWaitingLogin)
return;
OnLoginClickAsync();
}
private async void OnLoginClickAsync()
{
Debug.Log("OnLoginClickAsync");
_isWaitingLogin = true;
await StartSignInAsync();
_isWaitingLogin = false;
}
private async UniTask StartSignInAsync()
{
Debug.Log("StartSignInAsync");
try
{
await PlayerAccountService.Instance.StartSignInAsync();
}
catch (Exception ex)
{
Debug.LogError($"!!!!!!! Test get error {ex}");
}
Debug.LogWarning($"EndSignInAsync");
}
on line 44 i have error in webgl, but works in Editor