spmp icon indicating copy to clipboard operation
spmp copied to clipboard

YT song playback fails

Open Cookiemonster75 opened this issue 11 months ago • 31 comments

Checklist

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

Steps to reproduce

Click download and nothing happens. When I force stop the app and reopen I get the error.

Expected behavior

Should download the song

Actual behavior

Nothing then error

Screenshots / recordings

java.lang.RuntimeException: No valid formats returned by getVideoFormats(IeW9F4sGzf0) at com.toasterofbread.spmp.model.mediaitem.song.SongAudioQualityKt.getSongFormats(Unknown Source:134) at com.toasterofbread.spmp.model.mediaitem.song.SongAudioQualityKt$getSongFormats$1.invokeSuspend(Unknown Source:10) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(Unknown Source:8) at kotlinx.coroutines.DispatchedTask.run(Unknown Source:106) at androidx.concurrent.futures.ToContinuation.run(Unknown Source:11) at kotlinx.coroutines.scheduling.TaskImpl.run(Unknown Source:2) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(Unknown Source:92)

Logs

java.lang.RuntimeException: No valid formats returned by getVideoFormats(IeW9F4sGzf0) at com.toasterofbread.spmp.model.mediaitem.song.SongAudioQualityKt.getSongFormats(Unknown Source:134) at com.toasterofbread.spmp.model.mediaitem.song.SongAudioQualityKt$getSongFormats$1.invokeSuspend(Unknown Source:10) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(Unknown Source:8) at kotlinx.coroutines.DispatchedTask.run(Unknown Source:106) at androidx.concurrent.futures.ToContinuation.run(Unknown Source:11) at kotlinx.coroutines.scheduling.TaskImpl.run(Unknown Source:2) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(Unknown Source:92)

SpMp version

0.4.2

SpMp platform

Android

OS version

Android 15

Additional information

None

Cookiemonster75 avatar Dec 15 '24 00:12 Cookiemonster75

Which commit did you test this with?

toasterofbread avatar Dec 15 '24 00:12 toasterofbread

This is the very latest build.

Cookiemonster75 avatar Dec 15 '24 00:12 Cookiemonster75

This is the notification which keeps popping up -

java.lang.RuntimeException: No valid formats returned by getVideoFormats(IeW9F4sGzf0) at com.toasterofbread.spmp.model.mediaitem.song.SongAudioQualityKt.getSongFormats(Unknown Source:134) at com.toasterofbread.spmp.model.mediaitem.song.SongAudioQualityKt$getSongFormats$1.invokeSuspend(Unknown Source:10) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(Unknown Source:8) at kotlinx.coroutines.DispatchedTask.run(Unknown Source:106) at androidx.concurrent.futures.ToContinuation.run(Unknown Source:11) at kotlinx.coroutines.scheduling.TaskImpl.run(Unknown Source:2) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(Unknown Source:92)

Cookiemonster75 avatar Dec 15 '24 00:12 Cookiemonster75

Please confirm which commit you've tested. There have been a lot of changes recently around stream fetching (due to YouTube's changes) so I just want to be sure.

toasterofbread avatar Dec 15 '24 00:12 toasterofbread

I am on commit 415.

Cookiemonster75 avatar Dec 15 '24 00:12 Cookiemonster75

What do you mean by 415? Could you provide a commit hash or link?

toasterofbread avatar Dec 15 '24 00:12 toasterofbread

I thought it was maybe my storage access but I cleared app data and reinstalled.

Cookiemonster75 avatar Dec 15 '24 00:12 Cookiemonster75

Sorry if I sound a bit silly. https://github.com/toasterofbread/spmp/actions/runs/12333875235

Cookiemonster75 avatar Dec 15 '24 00:12 Cookiemonster75

Yeah same to me

gelimorto2 avatar Dec 26 '24 13:12 gelimorto2

This is an ongoing issue caused by YouTube constantly changing their API and making it harder for third-party clients to stream audio. There's currently no consistent solution I know of, and even if I did it probably wouldn't work in a few weeks.

Potential workaround:

  1. Make sure you're using the latest nightly build on the main branch
  2. If that doesn't work out of the box, switch the song stream method to NewPipe and/or enable stream method fallbacks
  3. If that doesn't work and you're signed in to YTM, try signing out and restarting the app, and use the Youtubei stream method

Will keep this issue open.

toasterofbread avatar Dec 26 '24 13:12 toasterofbread

See also: https://github.com/TeamNewPipe/NewPipe/issues/11139

toasterofbread avatar Dec 28 '24 13:12 toasterofbread

Use Newpipe as play/download

Samad-31 avatar Jan 06 '25 17:01 Samad-31

here is a summery of what's going on:

  1. if you chose to download to spmp library , it will download in mp4 format. (only one song per app lunch )

  2. but if you chose to download to a custom location , it will download into m4p format but woth (0) Byte.

  3. if you want to download multiple songs, you must force close and relunch the app before every song download ... does the Continuous permanently looping download notification have to do anything with this?

  4. Download only works with youtubei and newpipe, does not work with piped Api... streaming works with all.

  5. when downloading a song, spmp loss its link with previous song. so it shows the correct thumbnail of the last download song in Library> download songs section. (almost like it writes over the previous song)

  6. vpn has no effect on this issue

  7. was not logged in when testing, however I was experiencing these issues when I was logged in.

using Nightly 2025-01-08 15:45:19

MD77MD avatar Jan 14 '25 21:01 MD77MD

(Potentially) relevant links for future reference:

  • https://github.com/yt-dlp/yt-dlp/issues/11868
  • https://github.com/gsuberland/UMP_Format/blob/main/UMP_Format.md
  • https://tyrrrz.me/blog/reverse-engineering-youtube-revisited
  • https://github.com/iv-org/inv_sig_helper/blob/614e2e2b497f54054310571ed03733b408a1ecc1/src/consts.rs
  • https://discord.com/channels/1133321339495788625/1133321340393361431/1334645934906277971

I've made several attempts to work around this issue, nothing seems to work on my IP.

toasterofbread avatar Jan 22 '25 17:01 toasterofbread

Use Newpipe as play/download

Which version are you using?

coder-eb avatar Feb 05 '25 03:02 coder-eb

Use Newpipe as play/download

Which version are you using?

Latest available on f droid

Samad-31 avatar Feb 05 '25 04:02 Samad-31

What about a client switcher like the one from Musify?

kairusds avatar Feb 06 '25 08:02 kairusds

Use Newpipe as play/download

Which version are you using?

Latest available on f droid

Is it working for you? I'm using the same version but it does not load.

coder-eb avatar Feb 06 '25 18:02 coder-eb

The latest release (on all platforms) is practically ancient, I'd recommend using a nightly build.

toasterofbread avatar Feb 06 '25 18:02 toasterofbread

The latest release (on all platforms) is practically ancient, I'd recommend using a nightly build.

It's working in the nightly build. Awesome!

coder-eb avatar Feb 06 '25 18:02 coder-eb

The latest release (on all platforms) is practically ancient, I'd recommend using a nightly build.

It's working in the nightly build. Awesome!

Can confirm it's also working, though I had to relogin with YT Music and wait for a few seconds for songs to load.

kairusds avatar Feb 06 '25 22:02 kairusds

The latest release (on all platforms) is practically ancient, I'd recommend using a nightly build.

Are there any plans to make a new release soon then? I don't see any way of installing nightly as a Flatpak short of building it myself.

Newbytee avatar Feb 09 '25 11:02 Newbytee

In my case, it takes 10 minutes or so for the first song to play, then it works properly for a while (15 min or so)

wait-what avatar Mar 14 '25 07:03 wait-what

is this app dead or what? other streaming apps are already fixed and updated ... i prefer this app but what's the point if its not working

MD77MD avatar Mar 14 '25 13:03 MD77MD

Have you tried nightly build?

Can you provide example of the other apps that got it fixed? It might help as reference

On Fri, 14 Mar 2025, 20:30 MD77MD, @.***> wrote:

is this app dead or what? other streaming apps are already fixed and updated ... i prefer this app but what's the point if its not working

— Reply to this email directly, view it on GitHub https://github.com/toasterofbread/spmp/issues/416#issuecomment-2724718423, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALAHSPSRRECP7HRVLKN3DT2ULKXHAVCNFSM6AAAAABTT7YJPOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOMRUG4YTQNBSGM . You are receiving this because you are subscribed to this thread.Message ID: @.***> [image: MD77MD]MD77MD left a comment (toasterofbread/spmp#416) https://github.com/toasterofbread/spmp/issues/416#issuecomment-2724718423

is this app dead or what? other streaming apps are already fixed and updated ... i prefer this app but what's the point if its not working

— Reply to this email directly, view it on GitHub https://github.com/toasterofbread/spmp/issues/416#issuecomment-2724718423, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALAHSPSRRECP7HRVLKN3DT2ULKXHAVCNFSM6AAAAABTT7YJPOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOMRUG4YTQNBSGM . You are receiving this because you are subscribed to this thread.Message ID: @.***>

R-N avatar Mar 14 '25 13:03 R-N

Can you provide example of the other apps that got it fixed? It might help as reference

This would be appreciated. I'm not actively maintaining SpMp at the moment, but if an actual fix is discovered I'll probably implement it.

The main branch should be working with NewPipeExtractor at the moment, as that was updated recently.

toasterofbread avatar Mar 14 '25 17:03 toasterofbread

The main branch should be working with NewPipeExtractor at the moment, as that was updated recently.

Newpipe playback on latest nightly (from few minutes ago, 5a76563) still broken for me

R-N avatar Mar 14 '25 18:03 R-N

@toasterofbread from my testing harmony music from F-droid is working

MD77MD avatar Mar 21 '25 23:03 MD77MD

When you get a new version of spmp?

Tyriqscott avatar Apr 12 '25 20:04 Tyriqscott

are there any.plans to fix this soon.... please let us know weather to keep the app or not

MD77MD avatar Jul 13 '25 22:07 MD77MD