Skip to content

fix: added default value to the AppConfig to prevent crashes in some cases - #372

Merged
k1rill merged 1 commit into
openedx:developfrom
touchapp:fix/crash/appdata
Sep 9, 2024
Merged

fix: added default value to the AppConfig to prevent crashes in some cases#372
k1rill merged 1 commit into
openedx:developfrom
touchapp:fix/crash/appdata

Conversation

@k1rill

@k1rill k1rill commented Sep 6, 2024

Copy link
Copy Markdown
Contributor

Fix based on the crash report:

PreferencesManager.getAppConfig
Caused by java.lang.NullPointerException: fromJson(...) must not be null
       at org.openedx.app.data.storage.PreferencesManager.getAppConfig(PreferencesManager.kt:20)
       at org.openedx.profile.presentation.settings.SettingsViewModel.getConfiguration(SourceFile:7)
       at org.openedx.profile.presentation.settings.SettingsViewModel.<init>(SourceFile:32)
       at org.openedx.app.di.ScreenModuleKt$screenModule$1$28.invoke(ScreenModule.kt:193)
       at org.openedx.app.di.ScreenModuleKt$screenModule$1$28.invoke(ScreenModule.kt:193)
       at org.koin.core.instance.InstanceFactory.create(InstanceFactory.kt:53)

Steps to reproduce:

  • Fresh install app
  • Login into app
  • See What's new
  • Turn off internet connection
  • Go to profile and open settings
  • App crashing

@k1rill
k1rill merged commit d282fb0 into openedx:develop Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants