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

NullPointerException when starting song radio #292

Closed
4 tasks done
RichSexum opened this issue Apr 14, 2024 · 2 comments
Closed
4 tasks done

NullPointerException when starting song radio #292

RichSexum opened this issue Apr 14, 2024 · 2 comments
Labels

Comments

@RichSexum
Copy link

Checklist

  • I am able to reproduce the bug with the latest debug version (Android, Linux, Windows)
  • I've checked that there is no open or closed issue about this bug.
  • This issue contains only one bug.
  • The title of this issue accurately describes the bug.

Steps to reproduce

Play any music, and the radio feature doesn't start.

Expected behavior

java.lang.IllegalStateException: Fail to prepare request body for sending.
The body type is: class java.util.Collections$SingletonMap (Kotlin reflection is not available), with Content-Type: null.

If you expect serialized body, please check that you have installed the corresponding plugin(like ContentNegotiation) and set Content-Type header.
at io.ktor.client.engine.HttpClientEngine$install$1.invokeSuspend(SourceFile:256)
at io.ktor.client.engine.HttpClientEngine$install$1.invoke(SourceFile:4)
at io.ktor.client.engine.HttpClientEngine$install$1.invoke(SourceFile:5)
at io.ktor.util.pipeline.SuspendFunctionGun.loop(SourceFile:36)
at io.ktor.util.pipeline.SuspendFunctionGun.proceed(SourceFile:28)
at io.ktor.util.pipeline.SuspendFunctionGun.proceedWith(SourceFile:8)
at io.ktor.client.plugins.HttpCallValidator$Companion$install$1.invokeSuspend(SourceFile:161)
at io.ktor.client.plugins.HttpCallValidator$Companion$install$1.invoke(SourceFile:46)
at io.ktor.util.pipeline.SuspendFunctionGun.loop(SourceFile:36)
at io.ktor.util.pipeline.SuspendFunctionGun.proceed(SourceFile:28)
at io.ktor.client.HttpClient$4.invokeSuspend(SourceFile:197)
at io.ktor.client.HttpClient$4.invoke(SourceFile:42)
at io.ktor.util.pipeline.SuspendFunctionGun.loop(SourceFile:36)
at io.ktor.util.pipeline.SuspendFunctionGun.proceed(SourceFile:28)
at io.ktor.util.pipeline.SuspendFunctionGun.execute$ktor_utils(SourceFile:24)
at io.ktor.util.pipeline.Pipeline.execute(SourceFile:190)
at io.ktor.client.HttpClient.execute$ktor_client_core(SourceFile:64)
at io.ktor.client.statement.HttpStatement.executeUnsafe(Unknown Source:64)
at io.ktor.client.statement.HttpStatement.execute(SourceFile:1)
at io.ktor.client.statement.HttpStatement.execute(SourceFile:2)
at com.toasterofbread.spmp.ui.component.ErrorInfoDisplayKt.uploadErrorToPasteEe(SourceFile:341)
at com.toasterofbread.spmp.ui.component.ErrorInfoDisplayKt.uploadErrorToPasteEe$default(Unknown Source:19)
at com.toasterofbread.spmp.ui.component.ErrorInfoDisplayKt$ExpandedContent$2$1$1$1$2$1.invokeSuspend(SourceFile:99)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(Unknown Source:8)
at kotlinx.coroutines.DispatchedTask.run(Unknown Source:107)
at androidx.compose.ui.platform.AndroidUiDispatcher.access$performTrampolineDispatch(SourceFile:7)
at androidx.compose.ui.platform.AndroidUiDispatcher$dispatchCallback$1.run(SourceFile:3)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:210)
at android.os.Looper.loop(Looper.java:299)
at android.app.ActivityThread.main(ActivityThread.java:8250)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:556)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1045)

Actual behavior

java.lang.IllegalStateException: Fail to prepare request body for sending.
The body type is: class java.util.Collections$SingletonMap (Kotlin reflection is not available), with Content-Type: null.

If you expect serialized body, please check that you have installed the corresponding plugin(like ContentNegotiation) and set Content-Type header.
at io.ktor.client.engine.HttpClientEngine$install$1.invokeSuspend(SourceFile:256)
at io.ktor.client.engine.HttpClientEngine$install$1.invoke(SourceFile:4)
at io.ktor.client.engine.HttpClientEngine$install$1.invoke(SourceFile:5)
at io.ktor.util.pipeline.SuspendFunctionGun.loop(SourceFile:36)
at io.ktor.util.pipeline.SuspendFunctionGun.proceed(SourceFile:28)
at io.ktor.util.pipeline.SuspendFunctionGun.proceedWith(SourceFile:8)
at io.ktor.client.plugins.HttpCallValidator$Companion$install$1.invokeSuspend(SourceFile:161)
at io.ktor.client.plugins.HttpCallValidator$Companion$install$1.invoke(SourceFile:46)
at io.ktor.util.pipeline.SuspendFunctionGun.loop(SourceFile:36)
at io.ktor.util.pipeline.SuspendFunctionGun.proceed(SourceFile:28)
at io.ktor.client.HttpClient$4.invokeSuspend(SourceFile:197)
at io.ktor.client.HttpClient$4.invoke(SourceFile:42)
at io.ktor.util.pipeline.SuspendFunctionGun.loop(SourceFile:36)
at io.ktor.util.pipeline.SuspendFunctionGun.proceed(SourceFile:28)
at io.ktor.util.pipeline.SuspendFunctionGun.execute$ktor_utils(SourceFile:24)
at io.ktor.util.pipeline.Pipeline.execute(SourceFile:190)
at io.ktor.client.HttpClient.execute$ktor_client_core(SourceFile:64)
at io.ktor.client.statement.HttpStatement.executeUnsafe(Unknown Source:64)
at io.ktor.client.statement.HttpStatement.execute(SourceFile:1)
at io.ktor.client.statement.HttpStatement.execute(SourceFile:2)
at com.toasterofbread.spmp.ui.component.ErrorInfoDisplayKt.uploadErrorToPasteEe(SourceFile:341)
at com.toasterofbread.spmp.ui.component.ErrorInfoDisplayKt.uploadErrorToPasteEe$default(Unknown Source:19)
at com.toasterofbread.spmp.ui.component.ErrorInfoDisplayKt$ExpandedContent$2$1$1$1$2$1.invokeSuspend(SourceFile:99)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(Unknown Source:8)
at kotlinx.coroutines.DispatchedTask.run(Unknown Source:107)
at androidx.compose.ui.platform.AndroidUiDispatcher.access$performTrampolineDispatch(SourceFile:7)
at androidx.compose.ui.platform.AndroidUiDispatcher$dispatchCallback$1.run(SourceFile:3)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:210)
at android.os.Looper.loop(Looper.java:299)
at android.app.ActivityThread.main(ActivityThread.java:8250)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:556)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1045)

Screenshots / recordings

Screenshot_2024-04-13-22-13-02-948_com toasterofbread spmp
Screenshot_2024-04-13-22-13-07-155_com toasterofbread spmp

Logs

java.lang.IllegalStateException: Fail to prepare request body for sending.
The body type is: class java.util.Collections$SingletonMap (Kotlin reflection is not available), with Content-Type: null.

If you expect serialized body, please check that you have installed the corresponding plugin(like ContentNegotiation) and set Content-Type header.
at io.ktor.client.engine.HttpClientEngine$install$1.invokeSuspend(SourceFile:256)
at io.ktor.client.engine.HttpClientEngine$install$1.invoke(SourceFile:4)
at io.ktor.client.engine.HttpClientEngine$install$1.invoke(SourceFile:5)
at io.ktor.util.pipeline.SuspendFunctionGun.loop(SourceFile:36)
at io.ktor.util.pipeline.SuspendFunctionGun.proceed(SourceFile:28)
at io.ktor.util.pipeline.SuspendFunctionGun.proceedWith(SourceFile:8)
at io.ktor.client.plugins.HttpCallValidator$Companion$install$1.invokeSuspend(SourceFile:161)
at io.ktor.client.plugins.HttpCallValidator$Companion$install$1.invoke(SourceFile:46)
at io.ktor.util.pipeline.SuspendFunctionGun.loop(SourceFile:36)
at io.ktor.util.pipeline.SuspendFunctionGun.proceed(SourceFile:28)
at io.ktor.client.HttpClient$4.invokeSuspend(SourceFile:197)
at io.ktor.client.HttpClient$4.invoke(SourceFile:42)
at io.ktor.util.pipeline.SuspendFunctionGun.loop(SourceFile:36)
at io.ktor.util.pipeline.SuspendFunctionGun.proceed(SourceFile:28)
at io.ktor.util.pipeline.SuspendFunctionGun.execute$ktor_utils(SourceFile:24)
at io.ktor.util.pipeline.Pipeline.execute(SourceFile:190)
at io.ktor.client.HttpClient.execute$ktor_client_core(SourceFile:64)
at io.ktor.client.statement.HttpStatement.executeUnsafe(Unknown Source:64)
at io.ktor.client.statement.HttpStatement.execute(SourceFile:1)
at io.ktor.client.statement.HttpStatement.execute(SourceFile:2)
at com.toasterofbread.spmp.ui.component.ErrorInfoDisplayKt.uploadErrorToPasteEe(SourceFile:341)
at com.toasterofbread.spmp.ui.component.ErrorInfoDisplayKt.uploadErrorToPasteEe$default(Unknown Source:19)
at com.toasterofbread.spmp.ui.component.ErrorInfoDisplayKt$ExpandedContent$2$1$1$1$2$1.invokeSuspend(SourceFile:99)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(Unknown Source:8)
at kotlinx.coroutines.DispatchedTask.run(Unknown Source:107)
at androidx.compose.ui.platform.AndroidUiDispatcher.access$performTrampolineDispatch(SourceFile:7)
at androidx.compose.ui.platform.AndroidUiDispatcher$dispatchCallback$1.run(SourceFile:3)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:210)
at android.os.Looper.loop(Looper.java:299)
at android.app.ActivityThread.main(ActivityThread.java:8250)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:556)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1045)

SpMp version

0.3.1

SpMp platform

Android

OS version

Android 12 miui 13

Additional information

No response

@RichSexum RichSexum added the Bug label Apr 14, 2024
@JGlazunov
Copy link

Same problem

@toasterofbread
Copy link
Owner

YouTube changed something in their API, causing this issue in older builds. It was fixed in spmp by f3b9ce5.

Expect a hotfix release containing the fix within the next week.

@toasterofbread toasterofbread changed the title Doesn't play the radio settings NullPointerException when starting song radio Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants