# Game crash in web

**URL:** https://forum.heroiclabs.com/t/game-crash-in-web/6136
**Category:** Local Setup
**Tags:** sdk-unity
**Created:** [April 4, 2025, 1:43pm UTC](https://forum.heroiclabs.com/t/game-crash-in-web/6136 "2025-04-04T13:43:27Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Zerof99](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/zerof99/32/2521_2.png) [@Zerof99](https://forum.heroiclabs.com/u/Zerof99)
#### Post date: [April 4, 2025, 1:43pm UTC](https://forum.heroiclabs.com/t/game-crash-in-web/6136/1 "2025-04-04T13:43:27Z")

</div>

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
