WakaTime-Unity
WakaTime-Unity copied to clipboard
Heartbeats throwing errors in Unity 2017.3.1f1 on Windows 10
Hello :)
I'm running Unity 2017.3.1f1 on Windows 10 x64
In addition to these "obsolete" warnings:
I get this error for each heartbeat:
ArgumentException: JSON parse error: Invalid value.
UnityEngine.JsonUtility.FromJson[ResponseSchema`1] (System.String json) (at C:/buildslave/unity/build/artifacts/generated/common/modules/JSONSerialize/JsonUtilityBindings.gen.cs:25)
Bengsfort.Unity.WakaTime+<PostHeartbeat>c__AnonStorey0.<>m__0 () (at Assets/Editor/WakaTime.cs:421)
Bengsfort.Unity.WakaTime+RequestEnumerator+<Start>c__Iterator0.MoveNext () (at Assets/Editor/WakaTime.cs:753)
Bengsfort.Unity.WakaTime+AsyncHelper.Execute () (at Assets/Editor/WakaTime.cs:800)
Bengsfort.Unity.WakaTime.OnUpdate () (at Assets/Editor/WakaTime.cs:197)
UnityEditor.EditorApplication.Internal_CallUpdateFunctions () (at C:/buildslave/unity/build/Editor/Mono/EditorApplication.cs:127)
It appears because the response looks like this, which cannot be serialized via JSON:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>400 Bad Request</title>
<h1>Bad Request</h1>
<p>The browser (or proxy) sent a request that this server could not understand.</p>
Everything else, including getting the project list seems to work and I can use the info object it tries to send to send a successful hearbeat using Postman.
I played around with the UnityWebRequest using different methods/values and stuff but wasn't able to get it to work.
Any idea, what's going on?
EDIT: Forgot to mention I tested in a new Project as well