java.lang.RuntimeException: Unable to create application bou.amine.apps.readerforselfossv2.android.MyApp: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Long #112

Closed
opened 2022-12-13 20:20:40 +00:00 by AmineB · 0 comments
Owner
java.lang.RuntimeException: Unable to create application bou.amine.apps.readerforselfossv2.android.MyApp: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Long
	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7603)
	at android.app.ActivityThread.-$$Nest$mhandleBindApplication(ActivityThread.java:0)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2397)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loopOnce(Looper.java:226)
	at android.os.Looper.loop(Looper.java:313)
	at android.app.ActivityThread.main(ActivityThread.java:8741)
	at java.lang.reflect.Method.invoke(Method.java)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)
Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Long
	at android.app.SharedPreferencesImpl.getLong(SharedPreferencesImpl.java:329)
	at com.russhwolf.settings.SharedPreferencesSettings.getLong(SharedPreferencesSettings.java:123)
	at bou.amine.apps.readerforselfossv2.service.AppSettingsService.refreshApiTimeout(AppSettingsService.java:99)
	at bou.amine.apps.readerforselfossv2.service.AppSettingsService.refreshUserSettings(AppSettingsService.java:350)
	at bou.amine.apps.readerforselfossv2.service.AppSettingsService.<init>(AppSettingsService.java:44)
	at bou.amine.apps.readerforselfossv2.DI.ModulesKt$networkModule$2$1.invoke(ModulesKt.java:12)
	at bou.amine.apps.readerforselfossv2.DI.ModulesKt$networkModule$2$1.invoke(ModulesKt.java:12)
	at org.kodein.di.bindings.Singleton$getFactory$1$1$1.invoke(Singleton.java:134)
	at org.kodein.di.bindings.SingletonReference.make(SingletonReference.java:34)
	at org.kodein.di.bindings.Singleton$getFactory$1$1.invoke(Singleton.java:134)
	at org.kodein.di.bindings.Singleton$getFactory$1$1.invoke(Singleton.java:134)
	at org.kodein.di.bindings.StandardScopeRegistry.getOrCreate(StandardScopeRegistry.java:66)
	at org.kodein.di.bindings.Singleton$getFactory$1.invoke(Singleton.java:134)
	at org.kodein.di.bindings.Singleton$getFactory$1.invoke(Singleton.java:131)
	at org.kodein.di.DIContainer$DefaultImpls$provider$$inlined$toProvider$1.invoke(DIContainer.java:14)
	at org.kodein.di.internal.DirectDIBaseImpl.Instance(DirectDIBaseImpl.java:30)
	at bou.amine.apps.readerforselfossv2.DI.ModulesKt$networkModule$2$2.invoke(ModulesKt.java:16)
	at bou.amine.apps.readerforselfossv2.DI.ModulesKt$networkModule$2$2.invoke(ModulesKt.java:13)
	at org.kodein.di.bindings.Singleton$getFactory$1$1$1.invoke(Singleton.java:134)
	at org.kodein.di.bindings.SingletonReference.make(SingletonReference.java:34)
	at org.kodein.di.bindings.Singleton$getFactory$1$1.invoke(Singleton.java:134)
	at org.kodein.di.bindings.Singleton$getFactory$1$1.invoke(Singleton.java:134)
	at org.kodein.di.bindings.StandardScopeRegistry.getOrCreate(StandardScopeRegistry.java:66)
	at org.kodein.di.bindings.Singleton$getFactory$1.invoke(Singleton.java:134)
	at org.kodein.di.bindings.Singleton$getFactory$1.invoke(Singleton.java:131)
	at org.kodein.di.DIContainer$DefaultImpls$provider$$inlined$toProvider$1.invoke(DIContainer.java:14)
	at org.kodein.di.internal.DirectDIBaseImpl.Instance(DirectDIBaseImpl.java:30)
	at org.kodein.di.RetrievingKt.instance$default(RetrievingKt.java:528)
	at bou.amine.apps.readerforselfossv2.android.MyApp$di$2$3.invoke(MyApp.java:50)
	at bou.amine.apps.readerforselfossv2.android.MyApp$di$2$3.invoke(MyApp.java:50)
	at org.kodein.di.bindings.Singleton$getFactory$1$1$1.invoke(Singleton.java:134)
	at org.kodein.di.bindings.SingletonReference.make(SingletonReference.java:34)
	at org.kodein.di.bindings.Singleton$getFactory$1$1.invoke(Singleton.java:134)
	at org.kodein.di.bindings.Singleton$getFactory$1$1.invoke(Singleton.java:134)
	at org.kodein.di.bindings.StandardScopeRegistry.getOrCreate(StandardScopeRegistry.java:66)
	at org.kodein.di.bindings.Singleton$getFactory$1.invoke(Singleton.java:134)
	at org.kodein.di.bindings.Singleton$getFactory$1.invoke(Singleton.java:131)
	at org.kodein.di.DIContainer$DefaultImpls$provider$$inlined$toProvider$1.invoke(DIContainer.java:14)
	at org.kodein.di.DIAwareKt$Instance$1.invoke(DIAwareKt.java:209)
	at org.kodein.di.DIAwareKt$Instance$1.invoke(DIAwareKt.java:207)
	at org.kodein.di.DIProperty$provideDelegate$1.invoke(DIProperty.java:57)
	at kotlin.SynchronizedLazyImpl.getValue(SynchronizedLazyImpl.java:74)
	at bou.amine.apps.readerforselfossv2.android.MyApp.<clinit>(MyApp.java:57)
	at bou.amine.apps.readerforselfossv2.android.MyApp.getRepository(MyApp.java:57)
	at bou.amine.apps.readerforselfossv2.android.MyApp.onCreate(MyApp.java:76)
	at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1266)
	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7598)
	... 9 more```
``` java.lang.RuntimeException: Unable to create application bou.amine.apps.readerforselfossv2.android.MyApp: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Long at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7603) at android.app.ActivityThread.-$$Nest$mhandleBindApplication(ActivityThread.java:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2397) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loopOnce(Looper.java:226) at android.os.Looper.loop(Looper.java:313) at android.app.ActivityThread.main(ActivityThread.java:8741) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067) Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Long at android.app.SharedPreferencesImpl.getLong(SharedPreferencesImpl.java:329) at com.russhwolf.settings.SharedPreferencesSettings.getLong(SharedPreferencesSettings.java:123) at bou.amine.apps.readerforselfossv2.service.AppSettingsService.refreshApiTimeout(AppSettingsService.java:99) at bou.amine.apps.readerforselfossv2.service.AppSettingsService.refreshUserSettings(AppSettingsService.java:350) at bou.amine.apps.readerforselfossv2.service.AppSettingsService.<init>(AppSettingsService.java:44) at bou.amine.apps.readerforselfossv2.DI.ModulesKt$networkModule$2$1.invoke(ModulesKt.java:12) at bou.amine.apps.readerforselfossv2.DI.ModulesKt$networkModule$2$1.invoke(ModulesKt.java:12) at org.kodein.di.bindings.Singleton$getFactory$1$1$1.invoke(Singleton.java:134) at org.kodein.di.bindings.SingletonReference.make(SingletonReference.java:34) at org.kodein.di.bindings.Singleton$getFactory$1$1.invoke(Singleton.java:134) at org.kodein.di.bindings.Singleton$getFactory$1$1.invoke(Singleton.java:134) at org.kodein.di.bindings.StandardScopeRegistry.getOrCreate(StandardScopeRegistry.java:66) at org.kodein.di.bindings.Singleton$getFactory$1.invoke(Singleton.java:134) at org.kodein.di.bindings.Singleton$getFactory$1.invoke(Singleton.java:131) at org.kodein.di.DIContainer$DefaultImpls$provider$$inlined$toProvider$1.invoke(DIContainer.java:14) at org.kodein.di.internal.DirectDIBaseImpl.Instance(DirectDIBaseImpl.java:30) at bou.amine.apps.readerforselfossv2.DI.ModulesKt$networkModule$2$2.invoke(ModulesKt.java:16) at bou.amine.apps.readerforselfossv2.DI.ModulesKt$networkModule$2$2.invoke(ModulesKt.java:13) at org.kodein.di.bindings.Singleton$getFactory$1$1$1.invoke(Singleton.java:134) at org.kodein.di.bindings.SingletonReference.make(SingletonReference.java:34) at org.kodein.di.bindings.Singleton$getFactory$1$1.invoke(Singleton.java:134) at org.kodein.di.bindings.Singleton$getFactory$1$1.invoke(Singleton.java:134) at org.kodein.di.bindings.StandardScopeRegistry.getOrCreate(StandardScopeRegistry.java:66) at org.kodein.di.bindings.Singleton$getFactory$1.invoke(Singleton.java:134) at org.kodein.di.bindings.Singleton$getFactory$1.invoke(Singleton.java:131) at org.kodein.di.DIContainer$DefaultImpls$provider$$inlined$toProvider$1.invoke(DIContainer.java:14) at org.kodein.di.internal.DirectDIBaseImpl.Instance(DirectDIBaseImpl.java:30) at org.kodein.di.RetrievingKt.instance$default(RetrievingKt.java:528) at bou.amine.apps.readerforselfossv2.android.MyApp$di$2$3.invoke(MyApp.java:50) at bou.amine.apps.readerforselfossv2.android.MyApp$di$2$3.invoke(MyApp.java:50) at org.kodein.di.bindings.Singleton$getFactory$1$1$1.invoke(Singleton.java:134) at org.kodein.di.bindings.SingletonReference.make(SingletonReference.java:34) at org.kodein.di.bindings.Singleton$getFactory$1$1.invoke(Singleton.java:134) at org.kodein.di.bindings.Singleton$getFactory$1$1.invoke(Singleton.java:134) at org.kodein.di.bindings.StandardScopeRegistry.getOrCreate(StandardScopeRegistry.java:66) at org.kodein.di.bindings.Singleton$getFactory$1.invoke(Singleton.java:134) at org.kodein.di.bindings.Singleton$getFactory$1.invoke(Singleton.java:131) at org.kodein.di.DIContainer$DefaultImpls$provider$$inlined$toProvider$1.invoke(DIContainer.java:14) at org.kodein.di.DIAwareKt$Instance$1.invoke(DIAwareKt.java:209) at org.kodein.di.DIAwareKt$Instance$1.invoke(DIAwareKt.java:207) at org.kodein.di.DIProperty$provideDelegate$1.invoke(DIProperty.java:57) at kotlin.SynchronizedLazyImpl.getValue(SynchronizedLazyImpl.java:74) at bou.amine.apps.readerforselfossv2.android.MyApp.<clinit>(MyApp.java:57) at bou.amine.apps.readerforselfossv2.android.MyApp.getRepository(MyApp.java:57) at bou.amine.apps.readerforselfossv2.android.MyApp.onCreate(MyApp.java:76) at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1266) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7598) ... 9 more```
AmineB added the
Priority = CRITICAL
Type = Bug
labels 2022-12-13 20:21:00 +00:00
AmineB added this to the Dev project 2022-12-13 20:21:03 +00:00
AmineB referenced this issue from a commit 2022-12-13 20:32:53 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Louvorg/ReaderForSelfoss-multiplatform#112
No description provided.