Original post
Web UI is working, if i try to start my Unity project, the console outputs "Connected!" and then immediately:
Error! Unable to connect to the remote server
UnityEngine.Debug:Log (object)
hyperateSocket/<>c:<Start>b__4_1 (string) (at Assets/HypeRate/HypeRate Heart Rate SDK/hyperateSocket.cs:36)
NativeWebSocket.WebSocket/<Connect>d__27:MoveNext () (at Assets/HypeRate/HypeRate Heart Rate SDK/WebSocket.cs:478)
UnityEngine.UnitySynchronizationContext:ExecuteTasks ()
API Key and ID are set. Sample project has the same error.
How can i fix that?
Community Member•11/3/2023, 5:30:14 PM
Did you copy and pasted the API key - if so - pls try to enter it manually
Community Member•11/3/2023, 5:30:43 PM
Alright, i'll try. That may take some time xD
Community Member•11/3/2023, 5:35:51 PM
Still the same error
Community Member•11/3/2023, 5:37:29 PM
<@174193097285173250> maybe you can help out here?
Community Member•11/3/2023, 8:07:24 PM
that error doesnt look familiar to me. and the error message is equaly confusing. the first "stacktrace" points to an empty line in the hyperateSocket.cs file. the second points to a catch block. ~~maybe try to put a breakpoint in the websocket.cs file at line 478 and see what error it tried to catch.~~
Also: what unity version are you using?
Community Member•11/3/2023, 8:09:58 PM
Better: Put the breakpoint in the line 34 of the hyperateSocket.cs file, since the error is propably caused there while trying to print the error
Community Member•11/4/2023, 11:30:11 PM
Thank you for your help, i just found the issue. I messed up the installation of Newtonsoft.Json. I reinstalled it the right way now and everything is working fine!
Community Member•11/4/2023, 11:31:05 PM
<@174193097285173250> thx for your help! ♥️
Community Member•11/16/2023, 1:16:18 AM
For future visitors of this page, typing in the API key I received via email MANUALLY (as directed by Woodryda / Alex) into the public field in Unity solved this issue for me. So if you get the same error, definitely try it!
Community Member•11/17/2023, 3:11:10 AM
I had the same error..
I entered the API key manually, but the error is not resolved.
Which version of the Newton soft package did you install to fix the problem?😭
Community Member•11/17/2023, 2:18:53 PM
Community Member•11/19/2023, 7:28:28 AM
The error remains the same even after reinstallation.. Thank you😭