Skip to content

[UninitializedPropertyAccessException] displayLocale in AppLanguageLocaleHandler #3817

Closed
@anandwana001

Description

Describe the bug
Practice tab skills are crashing when trying to start.

To Reproduce
Steps to reproduce the behavior:

  1. Install app using Bazel from branch localization-part7-add-gate-for-selecting-written-language-and-add-todos
  2. Go to Topic Practice tab from any exploration
  3. Select any skills and click start
  4. See error

Expected behavior
No crash should be there and skill should work correctly.

Device

  • Device being used
  • SDK version - Android 11, API 28 (Emulator)

Additional context
Error Log

2021-09-20 17:01:44.200 21485-21485/org.oppia.android E/AndroidRuntime: FATAL EXCEPTION: main
    Process: org.oppia.android, PID: 21485
    java.lang.RuntimeException: Unable to start activity ComponentInfo{org.oppia.android/org.oppia.android.app.home.HomeActivity}: kotlin.UninitializedPropertyAccessException: lateinit property displayLocale has not been initialized
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3431)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3595)
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:223)
        at android.app.ActivityThread.main(ActivityThread.java:7664)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
     Caused by: kotlin.UninitializedPropertyAccessException: lateinit property displayLocale has not been initialized
        at org.oppia.android.app.translation.AppLanguageLocaleHandler.initializeLocaleForActivity(AppLanguageLocaleHandler.kt:28)
        at org.oppia.android.app.activity.InjectableAppCompatActivity.attachBaseContext(InjectableAppCompatActivity.kt:48)
        at android.app.Activity.attach(Activity.java:7893)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3383)

Metadata

Labels

Priority: EssentialThis work item must be completed for its milestone.Priority: ImportantThis work item is really important to complete for its milestone, but it can be scoped out.Z-ibtTemporary label for Ben to keep track of issues he's triaged.

Type

No type

Relationships

None yet

Development

No branches or pull requests

Issue actions