akvo / akvo-flow-mobile

Akvo Flow app
GNU General Public License v3.0
18 stars 16 forks source link

Crash when adding a new datapoint and registration form is null #1799

Closed valllllll2000 closed 3 years ago

valllllll2000 commented 3 years ago

Crash found by firebase when registration survey is null:

Fatal Exception: java.lang.NullPointerException: surveyGroup.registerSurveyId must not be null
       at org.akvo.flow.presentation.survey.SurveyPresenter$onAddDataPointTap$1.invokeSuspend(SurveyPresenter.java:90)
       at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(BaseContinuationImpl.java:9)
       at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.java:94)
       at android.os.Handler.handleCallback(Handler.java:883)
       at android.os.Handler.dispatchMessage(Handler.java:100)
       at android.os.Looper.loop(Looper.java:237)
       at android.app.ActivityThread.main(ActivityThread.java:8173)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:496)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1100)