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

Sponsorblock settings crash after update debug build #4042

Closed
3 tasks done
luckkmaxx opened this issue Jun 19, 2023 · 1 comment · Fixed by #4044
Closed
3 tasks done

Sponsorblock settings crash after update debug build #4042

luckkmaxx opened this issue Jun 19, 2023 · 1 comment · Fixed by #4044
Labels
bug Something isn't working

Comments

@luckkmaxx
Copy link
Contributor

Steps to reproduce

have a previous version of debug app with own settings and data.
update to latest debug and open settings > sponsorblock then chash.

Expected behavior

open sponsorblock settings menu

Actual behavior

java.lang.ClassCastException: java.lang.Boolean cannot be cast to java.lang.String at android.app.SharedPreferencesImpl.getString(SharedPreferencesImpl.java:302) at androidx.preference.Preference.getPersistedString(Preference.java:1706) at com.github.libretube.ui.views.SbSpinnerPreference.onSetInitialValue(SbSpinnerPreference.kt:66) at androidx.preference.Preference.onSetInitialValue(Preference.java:1634) at androidx.preference.Preference.dispatchSetInitialValue(Preference.java:1607) at androidx.preference.Preference.onAttachedToHierarchy(Preference.java:1330) at androidx.preference.Preference.onAttachedToHierarchy(Preference.java:1345) at androidx.preference.PreferenceGroup.addPreference(PreferenceGroup.java:253) at androidx.preference.PreferenceGroup.addItemFromInflater(PreferenceGroup.java:173) at androidx.preference.PreferenceInflater.rInflate(PreferenceInflater.java:350) at androidx.preference.PreferenceInflater.rInflate(PreferenceInflater.java:351) at androidx.preference.PreferenceInflater.inflate(PreferenceInflater.java:161) at androidx.preference.PreferenceInflater.inflate(PreferenceInflater.java:112) at androidx.preference.PreferenceManager.inflateFromResource(PreferenceManager.java:217) at androidx.preference.PreferenceFragmentCompat.setPreferencesFromResource(PreferenceFragmentCompat.java:380) at com.github.libretube.ui.preferences.SponsorBlockSettings.onCreatePreferences(SponsorBlockSettings.kt:11) at androidx.preference.PreferenceFragmentCompat.onCreate(PreferenceFragmentCompat.java:161) at androidx.fragment.app.Fragment.performCreate(Fragment.java:3090) at androidx.fragment.app.FragmentStateManager.create(FragmentStateManager.java:475) at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:257) at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:1899) at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:1817) at androidx.fragment.app.FragmentManager.execSingleAction(FragmentManager.java:1729) at androidx.fragment.app.BackStackRecord.commitNow(BackStackRecord.java:317) at com.github.libretube.ui.preferences.MainSettings.navigateToSettingsFragment(MainSettings.kt:138) at com.github.libretube.ui.preferences.MainSettings.onCreatePreferences$lambda$3(MainSettings.kt:43) at com.github.libretube.ui.preferences.MainSettings.$r8$lambda$38yMrwsTZfZXiuB6Yq-FCiX22KM(Unknown Source:0) at com.github.libretube.ui.preferences.MainSettings$$ExternalSyntheticLambda5.onPreferenceClick(Unknown Source:2) at androidx.preference.Preference.performClick(Preference.java:1200) at androidx.preference.Preference.performClick(Preference.java:1182) at androidx.preference.Preference$1.onClick(Preference.java:182) at android.view.View.performClick(View.java:7506) at android.view.View.performClickInternal(View.java:7483) at android.view.View.-$$Nest$mperformClickInternal(Unknown Source:0) at android.view.View$PerformClick.run(View.java:29364) at android.os.Handler.handleCallback(Handler.java:942) 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:7896) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:854)

LibreTube version

0.15.1 1687172234

Android version

13

Other details

No response

Acknowledgements

  • I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open issue.
  • I have written a short but informative title.
  • I will fill out all of the requested information in this form.
@luckkmaxx luckkmaxx added the bug Something isn't working label Jun 19, 2023
@luckkmaxx
Copy link
Contributor Author

You have to clean app data to get it to work.
Obviously this is due to new way to setup sponsorblock.
Maybe to get it to work in updates you will need to translate the previously selected option when updating.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant