ground-android icon indicating copy to clipboard operation
ground-android copied to clipboard

[Activate survey] "Unexpected error has occurred" toast shown on slow connections

Open gino-m opened this issue 1 year ago • 0 comments

Loading the survey times out with this ambiguous error. We should instead increase the timeout, and on a real time out show a more appropriate message.

This error is also incorrectly logged as:

12:01:46.005 SurveySele...vateSurvey  E  Failed to activate survey (Ask Gemini)
                                         java.lang.IllegalStateException: Survey G5EMk9isu4H0j0Yv0eiS not found in remote db
                                         	at com.google.android.ground.domain.usecases.survey.ActivateSurveyUseCase.invoke(ActivateSurveyUseCase.kt:43)
                                         	at com.google.android.ground.domain.usecases.survey.ActivateSurveyUseCase$invoke$1.invokeSuspend(Unknown Source:15)
                                         	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
                                         	at kotlinx.coroutines.internal.ScopeCoroutine.afterResume(Scopes.kt:32)
                                         	at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:102)
                                         	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
                                         	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
                                         	at android.os.Handler.handleCallback(Handler.java:938)
                                         	at android.os.Handler.dispatchMessage(Handler.java:99)
                                         	at android.os.Looper.loopOnce(Looper.java:201)
                                         	at android.os.Looper.loop(Looper.java:288)
                                         	at android.app.ActivityThread.main(ActivityThread.java:7870)
                                         	at java.lang.reflect.Method.invoke(Native Method)
                                         	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
                                         	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)

gino-m avatar Nov 27 '24 17:11 gino-m