LivingWithHippos / unchained-android

App to interact with real-debrid API
GNU General Public License v3.0
404 stars 50 forks source link

Crashes of version 46 (1.3.2) #393

Open LivingWithHippos opened 2 months ago

LivingWithHippos commented 2 months ago

Multiple small issues causing crashes to people upgrading to this version, start from the previous version and update to this one to check these.

First one has a lot of errors, second and third one just some and the others have a single one and could be ignored

java.util.IllegalFormatConversionException

Exception java.util.IllegalFormatConversionException: d != java.lang.Float
  at java.util.Formatter$FormatSpecifier.failConversion (Formatter.java:4539)
  at java.util.Formatter$FormatSpecifier.printInteger (Formatter.java:3045)
  at java.util.Formatter$FormatSpecifier.print (Formatter.java:2999)
  at java.util.Formatter.format (Formatter.java:2684)
  at java.util.Formatter.format (Formatter.java:2614)
  at java.lang.String.format (String.java:4058)
  at android.content.res.Resources.getString (Resources.java:629)
  at android.content.Context.getString (Context.java:920)
  at com.github.livingwithhippos.unchained.data.service.ForegroundTorrentService.updateNotification (ForegroundTorrentService.java:173)
  at com.github.livingwithhippos.unchained.data.service.ForegroundTorrentService.startForegroundService$lambda$7 (ForegroundTorrentService.java:120)
  at com.github.livingwithhippos.unchained.data.service.ForegroundTorrentService$sam$androidx_lifecycle_Observer$0.onChanged (ForegroundTorrentService.java:90)
  at androidx.lifecycle.LiveData.considerNotify (LiveData.java:133)
  at androidx.lifecycle.LiveData.dispatchingValue (LiveData.java:151)
  at androidx.lifecycle.LiveData.setValue (LiveData.java:309)
  at androidx.lifecycle.MutableLiveData.setValue (MutableLiveData.java:50)
  at androidx.lifecycle.LiveData$1.run (LiveData.java:93)
  at android.os.Handler.handleCallback (Handler.java:958)
  at android.os.Handler.dispatchMessage (Handler.java:99)
  at android.os.Looper.loopOnce (Looper.java:230)
  at android.os.Looper.loop (Looper.java:319)
  at android.app.ActivityThread.main (ActivityThread.java:9063)
  at java.lang.reflect.Method.invoke
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:588)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1103)

seems like we tried to format a float with something that wasn't a float in the torrent notification service

java.lang.IllegalArgumentException

Exception java.lang.IllegalArgumentException:
  at com.github.livingwithhippos.unchained.data.repository.BaseRepository.getToken (BaseRepository.kt:118)
  at com.github.livingwithhippos.unchained.data.repository.BaseRepository$getToken$1.invokeSuspend (BaseRepository.kt:12)
  at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith (ContinuationImpl.kt:33)
  at kotlinx.coroutines.DispatchedTask.run (DispatchedTask.kt:102)
  at kotlinx.coroutines.EventLoop.processUnconfinedEvent (EventLoop.java:65)
  at kotlinx.coroutines.internal.DispatchedContinuationKt.resumeCancellableWith (DispatchedContinuation.kt:371)
  at kotlinx.coroutines.internal.DispatchedContinuationKt.resumeCancellableWith$default (DispatchedContinuation.kt:274)
  at kotlinx.coroutines.internal.ScopeCoroutine.afterCompletion (Scopes.kt:23)
  at kotlinx.coroutines.JobSupport.continueCompleting (JobSupport.java:947)
  at kotlinx.coroutines.JobSupport.access$continueCompleting (JobSupport.java:22)
  at kotlinx.coroutines.JobSupport$ChildCompletion.invoke (JobSupport.kt:1166)
  at kotlinx.coroutines.JobSupport.notifyCompletion (JobSupport.kt:1502)
  at kotlinx.coroutines.JobSupport.completeStateFinalization (JobSupport.kt:322)
  at kotlinx.coroutines.JobSupport.finalizeFinishingState (JobSupport.kt:239)
  at kotlinx.coroutines.JobSupport.tryMakeCompletingSlowPath (JobSupport.kt:917)
  at kotlinx.coroutines.JobSupport.tryMakeCompleting (JobSupport.kt:874)
  at kotlinx.coroutines.JobSupport.makeCompletingOnce$kotlinx_coroutines_core (JobSupport.kt:839)
  at kotlinx.coroutines.AbstractCoroutine.resumeWith (AbstractCoroutine.kt:97)
  at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith (ContinuationImpl.kt:46)
  at kotlinx.coroutines.DispatchedTask.run (DispatchedTask.kt:230)
  at android.os.Handler.handleCallback (Handler.java:958)
  at android.os.Handler.dispatchMessage (Handler.java:99)
  at android.os.Looper.loopOnce (Looper.java:230)
  at android.os.Looper.loop (Looper.java:319)
  at android.app.ActivityThread.main (ActivityThread.java:8919)
  at java.lang.reflect.Method.invoke
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:578)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1103)

Issue with retrieving the login token, probably a call done when the login is not up or when credentials are deleted

java.lang.IllegalArgumentException

Exception java.lang.IllegalArgumentException:
  at androidx.core.util.Preconditions.checkArgument (Preconditions.java:1)
  at androidx.recyclerview.selection.DefaultSelectionTracker.anchorRange (DefaultSelectionTracker.java:1)
  at androidx.recyclerview.selection.MotionInputHandler.selectItem (MotionInputHandler.java:40)
  at androidx.recyclerview.selection.TouchInputHandler.onLongPress (TouchInputHandler.java:62)
  at androidx.recyclerview.selection.GestureRouter.onLongPress (GestureRouter.java:1)
  at android.view.GestureDetector.dispatchLongPress (GestureDetector.java:894)
  at android.view.GestureDetector.-$$Nest$mdispatchLongPress
  at android.view.GestureDetector$GestureHandler.handleMessage (GestureDetector.java:326)
  at android.os.Handler.dispatchMessage (Handler.java:107)
  at android.os.Looper.loopOnce (Looper.java:232)
  at android.os.Looper.loop (Looper.java:317)
  at android.app.ActivityThread.main (ActivityThread.java:8592)
  at java.lang.reflect.Method.invoke
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:580)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:878)

no idea

android.content.res.Resources$NotFoundException

Exception android.content.res.Resources$NotFoundException:
  at android.content.res.ResourcesImpl.getQuantityText (ResourcesImpl.java:352)
  at android.content.res.Resources.getQuantityText (Resources.java:545)
  at android.content.res.Resources.getQuantityString (Resources.java:621)
  at com.github.livingwithhippos.unchained.databinding.FragmentTorrentDetailsBindingImpl.executeBindings (FragmentTorrentDetailsBindingImpl.java:314)
  at androidx.databinding.ViewDataBinding.executeBindingsInternal (ViewDataBinding.java:512)
  at androidx.databinding.ViewDataBinding.executePendingBindings (ViewDataBinding.java:484)
  at androidx.databinding.ViewDataBinding$7.run (ViewDataBinding.java:218)
  at androidx.databinding.ViewDataBinding$8.doFrame (ViewDataBinding.java:320)
  at android.view.Choreographer$CallbackRecord.run (Choreographer.java:1403)
  at android.view.Choreographer$CallbackRecord.run (Choreographer.java:1413)
  at android.view.Choreographer.doCallbacks (Choreographer.java:1040)
  at android.view.Choreographer.doFrame (Choreographer.java:920)
  at android.view.Choreographer$FrameDisplayEventReceiver.run (Choreographer.java:1388)
  at android.os.Handler.handleCallback (Handler.java:942)
  at android.os.Handler.dispatchMessage (Handler.java:99)
  at android.os.Looper.loopOnce (Looper.java:240)
  at android.os.Looper.loop (Looper.java:351)
  at android.app.ActivityThread.main (ActivityThread.java:8423)
  at java.lang.reflect.Method.invoke
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:584)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1013)

missing quantity string for something in the torrent details fragment

java.lang.RuntimeException

Exception java.lang.RuntimeException:
  at android.app.ActivityThread.handleCreateService (ActivityThread.java:4925)
  at android.app.ActivityThread.-$$Nest$mhandleCreateService
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2407)
  at android.os.Handler.dispatchMessage (Handler.java:107)
  at android.os.Looper.loopOnce (Looper.java:232)
  at android.os.Looper.loop (Looper.java:317)
  at android.app.ActivityThread.main (ActivityThread.java:8592)
  at java.lang.reflect.Method.invoke
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:580)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:878)
Caused by java.lang.IllegalStateException: Hilt service must be attached to an @HiltAndroidApp Application. Found: class android.app.Application
  at dagger.hilt.internal.Preconditions.checkState (Preconditions.java:83)
  at dagger.hilt.android.internal.managers.ServiceComponentManager.createComponent (ServiceComponentManager.java:65)
  at dagger.hilt.android.internal.managers.ServiceComponentManager.generatedComponent (ServiceComponentManager.java:58)
  at com.github.livingwithhippos.unchained.data.service.ForegroundTorrentService.onBind (ForegroundTorrentService.kt:55)
  at com.github.livingwithhippos.unchained.data.service.Hilt_ForegroundTorrentService.generatedComponent (Hilt_ForegroundTorrentService.java:55)
  at com.github.livingwithhippos.unchained.data.service.Hilt_ForegroundTorrentService.inject (Hilt_ForegroundTorrentService.java:49)
  at com.github.livingwithhippos.unchained.data.service.Hilt_ForegroundTorrentService.onCreate (Hilt_ForegroundTorrentService.java:26)
  at com.github.livingwithhippos.unchained.data.service.ForegroundTorrentService.onCreate (ForegroundTorrentService.kt:68)
  at android.app.ActivityThread.handleCreateService (ActivityThread.java:4912)

missing hilt tag in the torrent service? check tutorial

android.database.sqlite.SQLiteConstraintException

Exception android.database.sqlite.SQLiteConstraintException: FOREIGN KEY constraint failed (code 787 SQLITE_CONSTRAINT_FOREIGNKEY[787])
  at android.database.sqlite.SQLiteConnection.nativeExecuteForLastInsertedRowId
  at android.database.sqlite.SQLiteConnection.executeForLastInsertedRowId (SQLiteConnection.java:1232)
  at android.database.sqlite.SQLiteSession.executeForLastInsertedRowId (SQLiteSession.java:790)
  at android.database.sqlite.SQLiteStatement.executeInsert (SQLiteStatement.java:89)
  at androidx.sqlite.db.framework.FrameworkSQLiteStatement.executeInsert (FrameworkSQLiteStatement.kt:42)
  at androidx.room.EntityInsertionAdapter.insert (EntityInsertionAdapter.java:84)
  at com.github.livingwithhippos.unchained.data.local.RepositoryDataDao_Impl$11.call (RepositoryDataDao_Impl.java:266)
  at com.github.livingwithhippos.unchained.data.local.RepositoryDataDao_Impl$11.call (RepositoryDataDao_Impl.java:260)
  at androidx.room.CoroutinesRoom$Companion$execute$2.invokeSuspend (CoroutinesRoom.kt:64)
  at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith (ContinuationImpl.kt:33)
  at kotlinx.coroutines.DispatchedTask.run (DispatchedTask.kt:104)
  at androidx.room.TransactionExecutor.execute$lambda$1$lambda$0 (TransactionExecutor.java:36)
  at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1167)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
  at java.lang.Thread.run (Thread.java:920)

check the foreign keys in the repository data dao related entities