Hello dhis2 android capture app 3.1.0.1.
I’m encountering an error or issue in my Android Capture app. I would like to understand why this is happening and how we can avoid it.
Regards
Hi @Bakari If you could give us some more informatin on what you are trying to do do when that crash occurs that would help us a lot to trouble shoot the issue.
What kind of configuration/usecase you have, how to replicate it and what android and core version is being used for example.
Best wishes,
Xavier.
java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState
at androidx.fragment.app.FragmentManager.checkStateLoss(FragmentManager.java:1632)
at androidx.fragment.app.FragmentManager.enqueueAction(FragmentManager.java:1672)
at androidx.fragment.app.BackStackRecord.commitInternal(BackStackRecord.java:341)
at androidx.fragment.app.BackStackRecord.commit(BackStackRecord.java:306)
at org.dhis2.usescases.teiDashboard.TeiDashboardMobileActivity.navigateToFragment(TeiDashboardMobileActivity.kt:399)
at org.dhis2.usescases.teiDashboard.TeiDashboardMobileActivity.access$navigateToFragment(TeiDashboardMobileActivity.kt:89)
at org.dhis2.usescases.teiDashboard.TeiDashboardMobileActivity$setUpNavigationBar$1$1.invoke(TeiDashboardMobileActivity.kt:356)
at org.dhis2.usescases.teiDashboard.TeiDashboardMobileActivity$setUpNavigationBar$1$1.invoke(TeiDashboardMobileActivity.kt:337)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:109)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
at androidx.compose.runtime.RecomposeScopeImpl.compose(RecomposeScopeImpl.kt:192)
at androidx.compose.runtime.ComposerImpl.recomposeToGroupEnd(Composer.kt:2556)
at androidx.compose.runtime.ComposerImpl.skipCurrentGroup(Composer.kt:2827)
at androidx.compose.runtime.ComposerImpl.doCompose(Composer.kt:3314)
at androidx.compose.runtime.ComposerImpl.recompose$runtime_release(Composer.kt:3265)
at androidx.compose.runtime.CompositionImpl.recompose(Composition.kt:940)
at androidx.compose.runtime.Recomposer.performRecompose(Recomposer.kt:1155)
at androidx.compose.runtime.Recomposer.access$performRecompose(Recomposer.kt:127)
at androidx.compose.runtime.Recomposer$runRecomposeAndApplyChanges$2$1.invoke(Recomposer.kt:583)
at androidx.compose.runtime.Recomposer$runRecomposeAndApplyChanges$2$1.invoke(Recomposer.kt:551)
at androidx.compose.ui.platform.AndroidUiFrameClock$withFrameNanos$2$callback$1.doFrame(AndroidUiFrameClock.android.kt:41)
at androidx.compose.ui.platform.AndroidUiDispatcher.performFrameDispatch(AndroidUiDispatcher.android.kt:109)
at androidx.compose.ui.platform.AndroidUiDispatcher.access$performFrameDispatch(AndroidUiDispatcher.android.kt:41)
at androidx.compose.ui.platform.AndroidUiDispatcher$dispatchCallback$1.doFrame(AndroidUiDispatcher.android.kt:69)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1036)
at android.view.Choreographer.doCallbacks(Choreographer.java:846)
at android.view.Choreographer.doFrame(Choreographer.java:776)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1023)
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:7986)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:553)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [androidx.compose.runtime.PausableMonotonicFrameClock@8bfaaf2, androidx.compose.ui.platform.MotionDurationScaleImpl@8ddb543, StandaloneCoroutine{Cancelling}@872c7c0, AndroidUiDispatcher@3bbcf9]
Hi @Bakari
What happens before this error appears please?
Thanks,
Mostly this happen when discard changes in the enrollment/registration of the profile section
Regards
Okay, thanks! So if we want to try to reproduce this, a possible scenario would be:
- register a TEI in a tracker program
- Enter the profile, make changes but don’t save
- Discard the changes
Does this error appears every time you repeat the steps above?
So it’s important to debug what’s triggering this error. Thank you!
This error mostly occurs under the following conditions:
2. The user enters the profile, make changes but don’t save and .
3. The user discards the changes.
Additionally, another issue arises: even after discarding the changes, the “sync” button appears. This is problematic because no changes require synchronization.
Regards,
Hi @Bakari!
I am not able to replicate the crash. Could you add a bit more information? What type of changes do you do before discarding? does it happen when you save the changes as well?
Is there a testing instance that we could look at?
Thank you!
Thanks @nancyesp
If you register TEI in a tracker program and not save the TEI or discards the changes, then the App popup that message.
Another issue is that when you add a new event or edit an existing one without saving the event or changes, the ‘sync’ notification appears even if you discard the changes or don’t save the event.
Regards