toasterofbread / spmp

A YouTube Music client with a focus on customisation of colours and song metadata. Built with Compose Multiplatform for Android and desktop.
GNU General Public License v3.0
1.16k stars 44 forks source link

[BUG] Error during background playback #92

Closed Atharv-Pathak-14 closed 1 year ago

Atharv-Pathak-14 commented 1 year ago

Just played a song and put the app in background but suddenly it popped out with the following error.... Didn't found any relevant issue with the same error. Error:-

    at com.toasterofbread.spmp.resources.uilocalisation.LocalisedYoutubeString.getLocalised(Unknown Source:8)
    at com.toasterofbread.spmp.resources.uilocalisation.LocalisedYoutubeString.getString(Unknown Source:0)
    at com.toasterofbread.spmp.api.LoadMediaitemKt$processDefaultResponse$2$ret$1$3.invoke(Unknown Source:22)
    at com.toasterofbread.spmp.api.LoadMediaitemKt$processDefaultResponse$2$ret$1$3.invoke(Unknown Source:2)
    at com.toasterofbread.spmp.model.mediaitem.MediaItem.editData(Unknown Source:9)
    at com.toasterofbread.spmp.api.LoadMediaitemKt$processDefaultResponse$2.invokeSuspend(Unknown Source:1225)
    at com.toasterofbread.spmp.api.LoadMediaitemKt$processDefaultResponse$2.invoke(Unknown Source:8)
    at com.toasterofbread.spmp.api.LoadMediaitemKt$processDefaultResponse$2.invoke(Unknown Source:4)
    at androidx.core.R$dimen.startUndispatchedOrReturn(Unknown Source:4)
    at coil.util.-Contexts.withContext(Unknown Source:71)
    at com.toasterofbread.spmp.api.LoadMediaitemKt.processDefaultResponse(Unknown Source:13)
    at com.toasterofbread.spmp.api.LoadMediaitemKt$loadMediaItemData$2.invokeSuspend(Unknown Source:241)
    at com.toasterofbread.spmp.api.LoadMediaitemKt$loadMediaItemData$2.invoke(Unknown Source:8)
    at com.toasterofbread.spmp.api.LoadMediaitemKt$loadMediaItemData$2.invoke(Unknown Source:4)
    at androidx.core.R$dimen.startUndispatchedOrReturn(Unknown Source:4)
    at coil.util.-Contexts.withContext(Unknown Source:71)
    at com.toasterofbread.spmp.api.LoadMediaitemKt.loadMediaItemData(Unknown Source:76)
    at com.toasterofbread.spmp.model.mediaitem.MediaItem$loadGeneralData$2.invokeSuspend(Unknown Source:121)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(Unknown Source:8)
    at kotlinx.coroutines.DispatchedTask.run(Unknown Source:100)
    at kotlinx.coroutines.internal.LimitedDispatcher.run(Unknown Source:12)
    at kotlinx.coroutines.scheduling.TaskImpl.run(Unknown Source:2)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(Unknown Source:79)
    Suppressed: coil.network.HttpException: [androidx.compose.ui.platform.MotionDurationScaleImpl@90bee00, androidx.compose.runtime.BroadcastFrameClock@988639, StandaloneCoroutine{Cancelling}@2ecb47e, AndroidUiDispatcher@53b6ddf]

Btw thanks for making the app the UI is sick.... Just switched from Vi music to it.

toasterofbread commented 1 year ago

It looks like the error might have been cut off, could you send a screenshot of when the error appears if you can get it to trigger again? Also, what versions of Android and SpMp are you using? Thanks.

Atharv-Pathak-14 commented 1 year ago

It looks like the error might have been cut off, could you send a screenshot of when the error appears if you can get it to trigger again? Also, what versions of Android and SpMp are you using? Thanks.

Android 11 and spmp version 0.1.3

Atharv-Pathak-14 commented 1 year ago

Also I found something else too (I think) when you play a download song and click on it's cover page it throws a error but music still plays but you have to restart the app to use it because it freezes

Error :-

java.lang.NullPointerException
    at com.toasterofbread.spmp.ui.layout.nowplaying.overlay.MainOverlayMenu.Menu(Unknown Source:548)
    at com.toasterofbread.spmp.ui.layout.nowplaying.NowPlayingThumbnailRowKt$ThumbnailRow$2$3$2$4$2$1$2.invoke(Unknown Source:124)
    at com.toasterofbread.spmp.ui.layout.nowplaying.NowPlayingThumbnailRowKt$ThumbnailRow$2$3$2$4$2$1$2.invoke(Unknown Source:8)
    at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(SourceFile:8)
    at androidx.appcompat.R$id.CompositionLocalProvider(Unknown Source:182)
    at com.toasterofbread.spmp.ui.layout.nowplaying.NowPlayingThumbnailRowKt$ThumbnailRow$2$3$2$4$2$1.invoke(Unknown Source:138)
    at com.toasterofbread.spmp.ui.layout.nowplaying.NowPlayingThumbnailRowKt$ThumbnailRow$2$3$2$4$2$1.invoke(Unknown Source:10)
    at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(SourceFile:3)
    at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(Unknown Source:8)
    at androidx.compose.animation.CrossfadeKt$Crossfade$4$1.invoke(SourceFile:62)
    at androidx.compose.animation.CrossfadeKt$Crossfade$4$1.invoke(SourceFile:14)
    at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(SourceFile:8)
    at coil.decode.DecodeUtils.Crossfade(SourceFile:43)
    at coil.decode.DecodeUtils.Crossfade(Unknown Source:171)
    at com.toasterofbread.spmp.ui.layout.nowplaying.NowPlayingThumbnailRowKt$ThumbnailRow$2$3$2.invoke(Unknown Source:439)
    at com.toasterofbread.spmp.ui.layout.nowplaying.NowPlayingThumbnailRowKt$ThumbnailRow$2$3$2.invoke(Unknown Source:10)
    at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(SourceFile:3)
    at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(Unknown Source:8)
    at androidx.compose.ui.ActualKt.AnimatedEnterExitImpl(Unknown Source:1620)
    at androidx.compose.ui.ActualKt.AnimatedVisibility(SourceFile:10)
    at com.toasterofbread.spmp.ui.layout.nowplaying.NowPlayingThumbnailRowKt.ThumbnailRow(Unknown Source:952)
    at com.toasterofbread.spmp.ui.layout.nowplaying.NowPlayingThumbnailRowKt$ThumbnailRow$3.invoke(Unknown Source:15)
    at com.toasterofbread.spmp.ui.layout.nowplaying.NowPlayingThumbnailRowKt$ThumbnailRow$3.invoke(Unknown Source:8)
    at androidx.compose.runtime.ComposerImpl.recomposeToGroupEnd(Unknown Source:282)
    at okhttp3.CertificatePinner$check$1.invoke(SourceFile:189)
    at okhttp3.CertificatePinner$check$1.invoke(SourceFile:18)
    at androidx.appcompat.R$id.observeDerivedStateRecalculations(Unknown Source:43)
    at androidx.compose.runtime.ComposerImpl.doCompose(Unknown Source:130)
    at androidx.compose.runtime.ComposerImpl.recompose$runtime_release(Unknown Source:35)
    at androidx.compose.runtime.CompositionImpl.recompose(Unknown Source:17)
    at androidx.compose.runtime.Recomposer.access$performRecompose(Unknown Source:116)
    at androidx.compose.material3.CheckboxKt$CheckboxImpl$1$1.invoke(Unknown Source:851)
    at androidx.compose.ui.platform.AndroidUiFrameClock$withFrameNanos$2$callback$1.doFrame(Unknown Source:8)
    at androidx.compose.ui.platform.AndroidUiDispatcher$dispatchCallback$1.doFrame(Unknown Source:47)
    at android.view.Choreographer$CallbackRecord.run(Choreographer.java:970)
    at android.view.Choreographer.doCallbacks(Choreographer.java:796)
    at android.view.Choreographer.doFrame(Choreographer.java:727)
    at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:957)
    at android.os.Handler.handleCallback(Handler.java:938)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:250)
    at android.app.ActivityThread.main(ActivityThread.java:7851)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:958)
    Suppressed: coil.network.HttpException: [androidx.compose.runtime.PausableMonotonicFrameClock@3766e8c, androidx.compose.ui.platform.MotionDurationScaleImpl@b63e9d5, StandaloneCoroutine{Cancelling}@a87a5ea, AndroidUiDispatcher@d6e9d78]

https://github.com/toasterofbread/spmp/assets/78468172/a65d4d18-3603-45d4-88f0-924b54aff684

toasterofbread commented 1 year ago

Also I found something else too (I think) when you play a download song and click on it's cover page it throws a error but music still plays but you have to restart the app to use it because it freezes

Yeah, downloaded songs are somewhat buggy. This should be fixed in the next release because of the backend rewrite #93

Were you able to reproduce the original issue?

Atharv-Pathak-14 commented 1 year ago

Also I found something else too (I think) when you play a download song and click on it's cover page it throws a error but music still plays but you have to restart the app to use it because it freezes

Yeah, downloaded songs are somewhat buggy. This should be fixed in the next release because of the backend rewrite #93

Were you able to reproduce the original issue?

No I was not able to reproduce it I tried all possible things I can do but didn't got that error again

toasterofbread commented 1 year ago

No I was not able to reproduce it I tried all possible things I can do but didn't got that error again

OK. From the partial stacktrace in the original post, this bug seems to be localised string related so it's probably already been fixed by now on main anyway. I'll close this for now until there's more information.