just-ai / aimybox-android-assistant

Embeddable custom voice assistant for Android applications
https://aimybox.com
Apache License 2.0
226 stars 52 forks source link

No reply after sending my first speech !! (D/OkHttp: <-- HTTP FAILED: java.net.SocketTimeoutException...) #53

Closed mellahysf closed 3 years ago

mellahysf commented 3 years ago

Hi,

When i run the app demo in my device, i send my first speech ("what time is it"), but no reply !! it gives me the error below (in andoird studio) :

com.justai.aimybox.core.ApiRequestTimeoutException: Request timeout: AimyboxRequest(query=what time is it, apiKey=Ldf0j7WZi3KwNah2aNeXVIACz0lb9qMH, unitId=8d456677-94d9-4a9a-afd4-fecb599b4545, data={}). Server didn't respond within 10000 ms. at com.justai.aimybox.api.DialogApi$send$3.invokeSuspend(DialogApi.kt:69) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.ResumeModeKt.resumeUninterceptedWithExceptionMode(ResumeMode.kt:56) at kotlinx.coroutines.TimeoutCoroutine.afterCompletionInternal(Timeout.kt:98) at kotlinx.coroutines.JobSupport.completeStateFinalization(JobSupport.kt:310) at kotlinx.coroutines.JobSupport.tryFinalizeFinishingState(JobSupport.kt:236) at kotlinx.coroutines.JobSupport.tryMakeCompletingSlowPath(JobSupport.kt:849) at kotlinx.coroutines.JobSupport.tryMakeCompleting(JobSupport.kt:811) at kotlinx.coroutines.JobSupport.makeCompletingOnce$kotlinx_coroutines_core(JobSupport.kt:787) at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:111) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46) at kotlinx.coroutines.DispatchedTask.run(Dispatched.kt:334) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:594) at kotlinx.coroutines.scheduling.CoroutineScheduler.access$runSafely(CoroutineScheduler.kt:60) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:740) D/OkHttp: <-- HTTP FAILED: java.net.SocketTimeoutException: failed to connect to api.aimybox.com/63.34.12.130 (port 443) from /10.0.8.1 (port 40158) after 10000ms

morfeusys commented 3 years ago

There is a timeout of the server side. Please ensure your project is alive once you've done the training (in the case you're using aimybox console)

mellahysf commented 3 years ago

I try the project in action in aimybox console (https://app.aimybox.com/) and it works. it works also in postman (by accessing https://api.aimybox.com with a POST request). But when I try to test it in my device (with android studio), it still gives me the same error above !! :(

mellahysf commented 3 years ago

I found the problem. it was some configurations to do in the device to allow the app to use network and mic. Now It works both in my device and in the emulator :D thank you.