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

[Bug] NullPointerException on radio load while signed in #72

Closed
powl999 opened this issue Jul 17, 2023 · 24 comments
Closed

[Bug] NullPointerException on radio load while signed in #72

powl999 opened this issue Jul 17, 2023 · 24 comments
Labels

Comments

@powl999
Copy link

powl999 commented Jul 17, 2023

hi me again i just wanted to know if this error code is saying somthing importend i get it when i start playing a song but the app is still working normal

java.lang.NullPointerException
at com.toasterofbread.spmp.api.radio.GetSongRadioKt$getSongRadio$2.invokeSuspend(Unknown Source:515)
at com.toasterofbread.spmp.api.radio.GetSongRadioKt$getSongRadio$2.invoke(Unknown Source:8)
at com.toasterofbread.spmp.api.radio.GetSongRadioKt$getSongRadio$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.radio.GetSongRadioKt.getSongRadio(Unknown Source:60)
at com.toasterofbread.spmp.api.radio.RadioInstance.getInitialSongs-IoAF18A(Unknown Source:144)
at com.toasterofbread.spmp.api.radio.RadioInstance.access$getInitialSongs-IoAF18A(Unknown Source:0)
at com.toasterofbread.spmp.api.radio.RadioInstance$loadContinuation$1$1.invokeSuspend(Unknown Source:120)
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: [StandaloneCoroutine{Cancelling}@fd6c69b, Dispatchers.IO]

@powl999 powl999 changed the title maybe usless error message maybe useless error message Jul 17, 2023
@toasterofbread
Copy link
Owner

Yeah, issues like this are known to happen occasionally. Does it happen every time you try to play a song or just sometimes? If you're logged in to YouTube music, please try to see if it works when you log out.

Basically, what's happening here is that there's something unknown or invalid in the data YouTube sends the app about the song radio, which causes an error. I added a feature recently which allows users to upload the invalid data when parsing the home feed fails so that I can take a look and figure out what's wrong. Once I implement that feature for radio parsing I should be able to fix this issue.

@powl999
Copy link
Author

powl999 commented Jul 17, 2023

only happening when i'm logged in but then every time

@toasterofbread
Copy link
Owner

Ok, that's good. I should be able to fix this issue if you update the app and upload the invalid data once I implement that feature in the next few days,

I'll ping you here then if that's alright?

@toasterofbread toasterofbread changed the title maybe useless error message [Bug] NullPointerException on radio load while signed in Jul 17, 2023
@powl999
Copy link
Author

powl999 commented Jul 17, 2023

yeah thats ok

@powl999
Copy link
Author

powl999 commented Jul 18, 2023

I know now what doesn't work when I'm logged in and go to a song I can't press the next button there is no waiting queue but in the same scenario if I'm not logged in everything works

@toasterofbread
Copy link
Owner

Yeah, the error message happens when the song radio fail to load, which is why there's no queue.

toasterofbread added a commit that referenced this issue Jul 19, 2023
Replace JsonParseException with DataParseException, to be implemented for error reporting in more functions later
@toasterofbread
Copy link
Owner

@powl999 I've added the error display which should let you upload the invalid data, it will appear at the bottom of the queue if the loading fails. See if the error still occurs and paste the link to the uploaded data if it does.

@powl999
Copy link
Author

powl999 commented Jul 19, 2023

ok

@toasterofbread
Copy link
Owner

ok

I forgot to mention, you can get the APK with the feature here once the build finishes. You'll probably have to uninstall the app first since the signatures won't match.

@powl999
Copy link
Author

powl999 commented Jul 19, 2023

the error occurde agin but ther is no erro display on the bottom of the queue
Screenshot_20230719-234324_SpMp
java.lang.NullPointerException
at com.toasterofbread.spmp.api.radio.GetSongRadioKt$getSongRadio$2.invokeSuspend(Unknown Source:522)
at com.toasterofbread.spmp.api.radio.GetSongRadioKt$getSongRadio$2.invoke(Unknown Source:8)
at com.toasterofbread.spmp.api.radio.GetSongRadioKt$getSongRadio$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.radio.GetSongRadioKt.getSongRadio(Unknown Source:60)
at com.toasterofbread.spmp.api.radio.RadioInstance.getInitialSongs-IoAF18A(Unknown Source:144)
at com.toasterofbread.spmp.api.radio.RadioInstance.access$getInitialSongs-IoAF18A(Unknown Source:0)
at com.toasterofbread.spmp.api.radio.RadioInstance$loadContinuation$1$1.invokeSuspend(Unknown Source:124)
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: [StandaloneCoroutine{Cancelling}@4738867, Dispatchers.IO]

@powl999
Copy link
Author

powl999 commented Jul 19, 2023

i just wanted to point out that I can now make an radio with artists and it makes an queue but when i us ean lonley song the error still happens

@toasterofbread
Copy link
Owner

Try this androidApp-universal-release.zip

@powl999
Copy link
Author

powl999 commented Jul 19, 2023

ok i will try that

@powl999
Copy link
Author

powl999 commented Jul 19, 2023

paste.ee/p/LZwQ4

there is the link

@powl999
Copy link
Author

powl999 commented Jul 19, 2023

i hope thats helping

@toasterofbread
Copy link
Owner

i hope thats helping

Perfect, thanks. I should be able to figure out what's wrong from that.

@powl999
Copy link
Author

powl999 commented Jul 19, 2023

nice

@toasterofbread
Copy link
Owner

Fingers crossed, this should fix it:
androidApp-universal-release.zip

@powl999
Copy link
Author

powl999 commented Jul 20, 2023

Sorry i Was sleepping i will test it now

@powl999
Copy link
Author

powl999 commented Jul 20, 2023

Screenshot_20230720-105358_SpMp.png

Its fixed you are the best

@toasterofbread
Copy link
Owner

Its fixed you are the best

Awesome, thanks for helping with the debugging.

@toasterofbread
Copy link
Owner

Reopening until I commit the fix

toasterofbread added a commit that referenced this issue Nov 12, 2023
Replace JsonParseException with DataParseException, to be implemented for error reporting in more functions later
toasterofbread added a commit that referenced this issue Nov 12, 2023
@Carter0108
Copy link

I'm still getting this problem? Is this just something that continually breaks from time to time?

@toasterofbread
Copy link
Owner

@Carter0108 You're probably experiencing #292

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