Game crash in web

Game crash when i test it in local server . I think the reason is client.AuthenticateDeviceAsync(
In this code :
if (session == null)
{
ScreenLog($“Authenticating with Device ID: {_deviceId}”, true);
try
{
session = await client.AuthenticateDeviceAsync(_deviceId, null, true, _contextVars);
currentAuth = _deviceId;
}
catch (ApiResponseException ex)
{
ScreenLog($“Device authentication failed: {ex.StatusCode}:{ex.Message}”, true);
}
catch (Exception ex)
{
ScreenLog($“Device authentication failed: {ex.Message}”, true);
}
}
I use async/await and i know that web doesn’t support multithreads. But How can i solve it . Also the game is working on unity editor. I’m using unity 2022.3