Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android] App crashes after rotating device to portrait or landscape orientation #246

Closed
Tracked by #180
nizmaylova opened this issue Mar 4, 2024 · 0 comments · Fixed by #256
Closed
Tracked by #180
Assignees
Labels
bug Report of or fix for something that isn't working as intended

Comments

@nizmaylova
Copy link

nizmaylova commented Mar 4, 2024

Link to content

Steps to reproduce:

  1. Open app
  2. Open Medical Terminology course
  3. Tap on Module 1
  4. Tap on Structural Organization of the Body
  5. Tap on the "Finish" button
  6. Tap on the "Next Section" button
  7. Quickly rotate your device to landscape and then to portrait orientation
  8. Sometimes, need to repeat steps 5-7

Result: App crashes after rotating device to portrait or landscape orientation.

Expected result: No crashes.

Attachment:
https://github.com/openedx/openedx-app-android/assets/121940663/ff7383a7-8b4f-4511-8a2a-f94d7c49a0b2

FATAL EXCEPTION: main Process: org.openedx.app, PID: 3568 java.lang.RuntimeException: Unable to start activity ComponentInfo{org.openedx.app/org.openedx.app.AppActivity}: java.lang.IllegalStateException: Task is not yet complete at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4164) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4322) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:139) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:96) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2685) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loopOnce(Looper.java:230) at android.os.Looper.loop(Looper.java:319) at android.app.ActivityThread.main(ActivityThread.java:8893) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:608) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103) Caused by: java.lang.IllegalStateException: Task is not yet complete at com.google.android.gms.common.internal.Preconditions.checkState(com.google.android.gms:play-services-basement@@18.2.0:2) at com.google.android.gms.tasks.zzw.zzf(com.google.android.gms:play-services-tasks@@18.0.2:1) at com.google.android.gms.tasks.zzw.getResult(com.google.android.gms:play-services-tasks@@18.0.2:1) at org.openedx.course.presentation.unit.video.EncodedVideoUnitViewModel.onCreate(EncodedVideoUnitViewModel.kt:83) at androidx.lifecycle.DefaultLifecycleObserverAdapter.onStateChanged(DefaultLifecycleObserverAdapter.kt:24) at androidx.lifecycle.LifecycleRegistry$ObserverWithState.dispatchEvent(LifecycleRegistry.kt:314) at androidx.lifecycle.LifecycleRegistry.forwardPass(LifecycleRegistry.kt:251) at androidx.lifecycle.LifecycleRegistry.sync(LifecycleRegistry.kt:287) at androidx.lifecycle.LifecycleRegistry.moveToState(LifecycleRegistry.kt:136) at androidx.lifecycle.LifecycleRegistry.handleLifecycleEvent(LifecycleRegistry.kt:119) at androidx.fragment.app.Fragment.performCreate(Fragment.java:3100) at androidx.fragment.app.FragmentStateManager.create(FragmentStateManager.java:504) at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:268) at androidx.fragment.app.FragmentStore.moveToExpectedState(FragmentStore.java:114) at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1455) at androidx.fragment.app.FragmentManager.dispatchStateChange(FragmentManager.java:3034) at androidx.fragment.app.FragmentManager.dispatchCreate(FragmentManager.java:2941) at androidx.fragment.app.Fragment.restoreChildFragmentState(Fragment.java:1989) at androidx.fragment.app.Fragment.onCreate(Fragment.java:1967) at org.openedx.course.presentation.unit.container.CourseUnitContainerFragment.onCreate(CourseUnitContainerFragment.kt:76) at androidx.fragment.app.Fragment.performCreate(Fragment.java:3094) at androidx.fragment.app.FragmentStateManager.create(FragmentStateManager.java:504) at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:268) at androidx.fragment.app.FragmentStore.moveToExpectedState(FragmentStore.java:114) at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1455) at androidx.fragment.app.FragmentManager.dispatchStateChange(FragmentManager.java:3034) at androidx.fragment.app.FragmentManager.dispatchCreate(FragmentManager.java:2941) at androidx.fragment.app.FragmentController.dispatchCreate(FragmentController.java:252) at androidx.fragment.app.FragmentActivity.onCreate(FragmentActivity.java:219) at org.openedx.app.AppActivity.onCreate(AppActivity.kt:62) at android.app.Activity.performCreate(Activity.java:8944) at android.app.Activity.performCreate(Activity.java:8913)

@nizmaylova nizmaylova added the bug Report of or fix for something that isn't working as intended label Mar 4, 2024
@dixidroid dixidroid self-assigned this Mar 8, 2024
@dixidroid dixidroid moved this to In Development in Open edX Mobile Roadmap Mar 8, 2024
@dixidroid dixidroid linked a pull request Mar 8, 2024 that will close this issue
@github-project-automation github-project-automation bot moved this from In Development to Done in Open edX Mobile Roadmap Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Report of or fix for something that isn't working as intended
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants