Our app 949539342164783 is getting 500 errors
Do you want to request a feature, report a bug, or ask a question about wit? Bug What is the current behavior? App keeps getting 500 errors If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Every time we send a request it mostly returns a 500 error - as with bug #2105 What is the expected behavior? No 500s If applicable, what is the App ID where you are experiencing this issue? If you do not provide this, we cannot help. 949539342164783
I didn't realise there was API versioning - I've updated to the latest API version and it does seem better although I did get one 500 error - I'll keep checking
I tried using 20210630 and I'm still getting the 500 errors
Also tried 20210513 and got an error - any ideas?
Hi @cheeseblock, just tried some requests and it seemed to be working well. Is the error still occurring? If so, is inference working for you on the website via the "Utterance" input?
Hi @CleanestMink126 - thanks for looking into it. Yes I'm still getting the issue. You're testing it by typing phrases into the Utterance box? We're using the API with audio clips - not sure if that matters. Is there any way of getting detail on the 500 error? Any log I can check? Or any advice you have? Thanks
Hi - looking into it further - I tried testing against a previous version/tag of our app - it appears that it doesn't get 500 issues - so it looks as though it's something specific to the app. Is there any way to get any debug info on what might be causing the 500 error? Or any advice on how to dig into the problem? Could our app have got too large and it's a timeout? Thanks
Hi - looking into it further - I tried testing against a previous version/tag of our app - it appears that it doesn't get 500 issues - so it looks as though it's something specific to the app. Is there any way to get any debug info on what might be causing the 500 error? Or any advice on how to dig into the problem? Could our app have got too large and it's a timeout? Thanks
Have you added any builtin entities in the time since the old version?
@chessai - thanks for your reply. No I don't believe so.
We are making a bit of progress - we tried exporting and reimporting and there were a few errors. A number of traits were deleted but still referenced and I assume that was causing the 500 errors. Still cleaning things up and need to test - but seems positive.
hi @chessai - exporting, importing and fixing any errors that pop up has helped a bit - the 500 errors are now about 1 in 7. In the exported data the version is set to 20200513 - so I tried setting this version in our calls to the server and that has improved things even more - but we still get 500 errors about 1 in 25.
Is there any way of getting extra information about the 500 errors? are you able to see the server logs and check what's going on?
@chessai - BTW in the 500 error the downloadHandler has the following text: {\n "code": "wit",\n "error": "Something went wrong. We've been notified."\n}
Hi - just a quick bump on this, I wondered if anyone could help. We're due to submit and currently the language processing side doesn't work - so we're a bit stuck. Just want to get some information on the 500 errors we're getting from the server. Thanks
Hi @CleanestMink126 - thanks for looking into it. Yes I'm still getting the issue. You're testing it by typing phrases into the Utterance box? We're using the API with audio clips - not sure if that matters. Is there any way of getting detail on the 500 error? Any log I can check? Or any advice you have? Thanks
Are you getting any errors via non-audio? I can't reproduce any errors without audio, haven't tried with audio yet.
@chessai - only through audio. Do you have any access to the server logs that might give more info on what's causing the error? or any way that I can access them?
@chessai - only through audio. Do you have any access to the server logs that might give more info on what's causing the error? or any way that I can access them?
No, nothing useful. I'll have to try to reproduce via audio and see what I more debugging info I can produce.
Thanks @chessai - appreciate you taking a look.
@chessai - any luck reproducing with audio?
@cheeseblock no luck. what client are you using? curl, python wit, etc? can you paste the exact code you're calling (with the token obfuscated of course)
Thanks for your help @chessai - We're using Unity web requests. It was working previously - but since adding a number of changes in the wit.ai app it's stopped working - if I run against the old version it still works - this code hasn't changed:
private IEnumerator HandleWitAIRequest(WitResponseDelegate callback)
{
if (!TempVoiceRecorder.HaveValidRecording())
{
Debug.LogError("There was no temporary audio to send to Wit.AI. Aborting request.");
callback?.Invoke(null);
yield break;
}
string requestURL = WIT_AI_VERSION == "" ? WIT_AI_REQUEST_URL : string.Format("{0}?v={1}", WIT_AI_REQUEST_URL, WIT_AI_VERSION);
DownloadHandlerBuffer downloadHandler = new DownloadHandlerBuffer();
UploadHandlerFile uploadHandler = new UploadHandlerFile(TempVoiceRecorder.GetTempAudioPath());
UnityWebRequest webRequest = new UnityWebRequest(requestURL, "POST", downloadHandler, uploadHandler);
webRequest.SetRequestHeader("Content-Type", "audio/wav");
webRequest.SetRequestHeader("Authorization", string.Format("Bearer {0}", WIT_AI_ACCESS_TOKEN));
// Wait until request is done (we don't need to do anything while we wait, so no loop required)
yield return webRequest.SendWebRequest();
if (webRequest.isNetworkError || webRequest.isHttpError)
{
Debug.LogErrorFormat("WebRequest Error: {0}", webRequest.error);
Debug.LogErrorFormat("Response Text: {0}", downloadHandler.text);
callback.Invoke(null);
}
else
{
...
// log error
...
}
TempVoiceRecorder.DeleteRecording();
}
@chessai, I am facing this same issue (500 Internal Server Error). My app id is 359014025633978 and I am using pywit. The code I am trying to run is the same one that is in the pywit github.
from wit import Wit
client = Wit(my_token)
resp = None
with open('file.wav', 'rb') as f:
resp = client.speech(f, {'Content-Type': 'audio/wav'})
print('Yay, got Wit.ai response: ' + str(resp))
Could you, please, help me with that?
Hi @cheeseblock, are you still encountering issues? We've deployed a fix.