Hi there.
I have very simple scene with one gameObject with one script attached:
public class AuthTest : MonoBehaviour
{
private async void Awake() {
await UnityServices.InitializeAsync();
AuthenticationService.Instance.SignedIn += onLogin;
AuthenticationService.Instance.ClearSessionToken();
await AuthenticationService.Instance.SignInAnonymouslyAsync();
print("init done");
}
private void onLogin() {
print("user id: " + AuthenticationService.Instance.PlayerId);
print("accessToken: " + AuthenticationService.Instance.AccessToken);
print("authed anonimously");
}
}
When I do build & run, it authorizes with no errors, but if the browser tab is inactive for 2-3 minutes, it throws an exception:
Uncaught TypeError: Cannot read properties of undefined (reading 'readyState')
at _WebSocketSend (bin.framework.js:10:75724)
at bin.wasm:0xa4d359
at bin.wasm:0xa42c00
at bin.wasm:0x1e977d1
at invoke_vii (bin.framework.js:10:401814)
at bin.wasm:0xa4240b
at bin.wasm:0xa44ad0
at bin.wasm:0x13c20b5
at bin.wasm:0x1e977d1
at invoke_vii (bin.framework.js:10:401814)
at bin.wasm:0x13c1815
at bin.wasm:0x13c205c
at bin.wasm:0x2f4130
at bin.wasm:0x1e97803
at invoke_viii (bin.framework.js:10:402109)
at bin.wasm:0x13aa8cc
at bin.wasm:0x13afd66
at bin.wasm:0x1e97841
at invoke_viiiii (bin.framework.js:10:404045)
at bin.wasm:0x13c1eb2
at bin.wasm:0x13c1b9d
at bin.wasm:0x13c8c81
at bin.wasm:0x1e97803
at invoke_viii (bin.framework.js:10:402109)
at bin.wasm:0x11463b6
at bin.wasm:0x11462ca
at bin.wasm:0x11465d0
at bin.wasm:0x164f270
at bin.wasm:0x16605b1
at bin.wasm:0x1e977df
at invoke_iiii (bin.framework.js:10:402400)
at bin.wasm:0x165f652
at bin.wasm:0x166175e
at bin.wasm:0x1e4e5b9
at bin.wasm:0x1df66ac
at bin.wasm:0x1dc6d75
at bin.wasm:0x16ef946
at bin.wasm:0x16ef9b9
at bin.wasm:0x1e7f07d
at bin.wasm:0x1e9781b
at browserIterationFunc (bin.framework.js:10:223047)
at callUserCallback (bin.framework.js:10:176616)
at Object.runIter (bin.framework.js:10:177856)
at Browser_mainLoop_runner (bin.framework.js:10:176152)
The issue isnât reproducible in Unity Editor.
After the error happens, app is completely unressponsive.
I guess I should fill a bug report.
Brief search didnât help
Is this a known issue?