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

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

Merged
merged 1 commit into from
Sep 9, 2024

Conversation

k1rill
Copy link
Contributor

@k1rill k1rill commented Sep 6, 2024

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
4 checks passed
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