wit-ai / wit-unity

Wit-Unity is a Unity C# wrapper around the the Wit.ai rest APIs and is a core component of Voice SDK.
Other
78 stars 20 forks source link

error 400 on last version #29

Closed eonianvr closed 2 years ago

eonianvr commented 2 years ago

the understanding Viewer works fine, but when hitting play on the RespnseDebugger project, and after entering the server access token,, I get a:

System.Net.WebException: The remote server returned an error: (400) Bad Request.
  at System.Net.HttpWebRequest.EndGetResponse (System.IAsyncResult asyncResult) [0x00058] in <ef151b6abb5d474cb2c1cb8906a8b5a4>:0 
  at com.facebook.witai.WitRequest.HandleResponse (System.IAsyncResult ar) [0x00002] in H:\UNITY PROJECT\wit 008 test IOS\Library\PackageCache\com.facebook.witai@461db9246c\Scripts\Runtime\WitRequest.cs:284 
UnityEngine.Debug:LogError(Object)
com.facebook.witai.WitRequest:HandleResponse(IAsyncResult) (at Library/PackageCache/com.facebook.witai@461db9246c/Scripts/Runtime/WitRequest.cs:336)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:SetResult(Int32)
Mono.Net.Security.<StartOperation>d__58:MoveNext()
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:SetResult(AsyncProtocolResult)
Mono.Net.Security.<StartOperation>d__23:MoveNext()
System.Runtime.CompilerServices.AsyncTaskMethodBuilder:SetResult()
Mono.Net.Security.<ProcessOperation>d__24:MoveNext()
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:SetResult(Nullable`1)
Mono.Net.Security.<InnerRead>d__25:MoveNext()
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:SetResult(Int32)
Mono.Net.Security.<InnerRead>d__66:MoveNext()
System.Threading._ThreadPoolWaitCallback:PerformWaitCallback()
eonianvr commented 2 years ago

see on screenshot, we can see the account is identified but still get the following error when hitting play:

Capture wit error

ArgumentException: Configuration is not set.
com.facebook.witai.WitRequest..ctor (com.facebook.witai.data.WitConfiguration configuration, System.String path, com.facebook.witai.WitRequest+QueryParam[] queryParams) (at Library/PackageCache/com.facebook.witai@461db9246c/Scripts/Runtime/WitRequest.cs:162)
com.facebook.witai.WitRequestFactory.MessageRequest (com.facebook.witai.data.WitConfiguration config, System.String query) (at Library/PackageCache/com.facebook.witai@461db9246c/Scripts/Runtime/WitRequestFactory.cs:28)
com.facebook.witai.Wit.SendTranscription (System.String transcription) (at Library/PackageCache/com.facebook.witai@461db9246c/Scripts/Runtime/Wit.cs:435)
com.facebook.witai.Wit.Activate (System.String transcription) (at Library/PackageCache/com.facebook.witai@461db9246c/Scripts/Runtime/Wit.cs:429)
com.facebook.witai.samples.responsedebugger.WitUIInteractionHandler.Send () (at Assets/ResponseDebugger/Scripts/WitUIInteractionHandler.cs:92)
UnityEngine.Events.InvokableCall.Invoke () (at <a555715ef291462eb190c2c939543f55>:0)
UnityEngine.Events.UnityEvent.Invoke () (at <a555715ef291462eb190c2c939543f55>:0)
UnityEngine.UI.Button.Press () (at C:/Program Files/Unity/Hub/Editor/2019.4.19f1/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/UI/Core/Button.cs:68)
UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) (at C:/Program Files/Unity/Hub/Editor/2019.4.19f1/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/UI/Core/Button.cs:110)
UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at C:/Program Files/Unity/Hub/Editor/2019.4.19f1/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/EventSystem/ExecuteEvents.cs:50)
UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) (at C:/Program Files/Unity/Hub/Editor/2019.4.19f1/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/EventSystem/ExecuteEvents.cs:261)
UnityEngine.EventSystems.EventSystem:Update() (at C:/Program Files/Unity/Hub/Editor/2019.4.19f1/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/EventSystem/EventSystem.cs:377)
yolanother commented 2 years ago

Can you try rebasing on the version that is currently out for review in pr: https://github.com/wit-ai/wit-unity/pull/27 I should have it released in the next 24ish hours.

eonianvr commented 2 years ago

ok

eonianvr commented 2 years ago

Unfortunalely, same error with #27

step to reproduce:

For info, the understanding Viewer tool is working and doesn't generate the error.

eonianvr commented 2 years ago

problem solved.

The witconfig asset created with the wit configuration window, was not assigned to the Configuration line in the wit corposant in the scene. You should mentioned this step in your installation tutorial.

yolanother commented 2 years ago

I'll add something to Wit to flag this for devs that hit it.