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

Couldn't find a playable Audio format #499

Open
3 tasks done
genericbetatester opened this issue Oct 24, 2024 · 44 comments
Open
3 tasks done

Couldn't find a playable Audio format #499

genericbetatester opened this issue Oct 24, 2024 · 44 comments
Labels
bug Something isn't working fixed This should be fixed, but it still needs testing

Comments

@genericbetatester
Copy link

Steps to reproduce the bug

  1. Play an uncached song in my library

Expected behavior

It should play as normal

Actual behavior

It doesn't. It just says it cannot find a playable Audio format

Screenshots/Screen recordings

Screenshot_20241023-191108

Logs

No response

ViTune version

v1.1.0

What kind of build are you using?

Release (GitHub / F-Droid)

Android version

Android 10

Device info

I'm using a

Upstream reproducibility

No response

Additional information

No response

Checklist

  • I am able to reach YouTube Music through the official app/website and can confirm that I live in a supported country (and this country is not temporarily unavailable)
  • I am not using a proxy, VPN, device policy or anything else that restricts access to YouTube Music
  • This issue has not been submitted already (this is not a duplicate of another issue)
@genericbetatester genericbetatester added the bug Something isn't working label Oct 24, 2024
@25huizengek1
Copy link
Owner

Just woke up, and before I went to sleep this still worked, now it seems YouTube Music forces users to log in when on mobile. The only working FOSS YouTube player that still works seems to be NewPipe, since they don't use YouTube Music, but just the YouTube endpoints.

I'll work on this later on.

@25huizengek1 25huizengek1 added help wanted Extra attention is needed prio:high labels Oct 24, 2024
@genericbetatester
Copy link
Author

Just woke up, and before I went to sleep this still worked, now it seems YouTube Music forces users to log in when on mobile. The only working FOSS YouTube player that still works seems to be NewPipe, since they don't use YouTube Music, but just the YouTube endpoints.

I'll work on this later on.

That's crazy. Yt always find ways to break one thing or the other.

@25huizengek1
Copy link
Owner

YouTube seems to have implemented a new anti-bot system, looking for a workaround...

@genericbetatester
Copy link
Author

YouTube seems to have implemented a new anti-bot system, looking for a workaround...

👀 Hmm

@25huizengek1
Copy link
Owner

I've seen a lot of people reply that Piped is down. Just to be clear: Piped (or the Piped instance ViTune uses) is definitely not down (and it shouldn't even matter, we only use Piped as a back-up for when YouTube blocks requests), but they are experiencing the exact same issue as ViTune:

@25huizengek1
Copy link
Owner

Haven't had the time yet to actually work on this, I'm sorry. I'll update y'all ASAP.

@Wqttzicue
Copy link

Wqttzicue commented Oct 24, 2024

Haven't had the time yet to actually work on this, I'm sorry. I'll update y'all ASAP.

You diffenetly need helpers, at least 1 more dev
Btw, im interested in programming, but im not enough computer-nerd

@th3y
Copy link

th3y commented Oct 24, 2024

Haven't had the time yet to actually work on this, I'm sorry. I'll update y'all ASAP.

There are two ways to fix the current issue
1- Use g00gle acc c00kies
2- Use piped /streams/

@25huizengek1
Copy link
Owner

Haven't had the time yet to actually work on this, I'm sorry. I'll update y'all ASAP.

There are two ways to fix the current issue 1- Use g00gle acc c00kies 2- Use piped /streams/

Both won't work, here's why:

  • ViTune already uses Piped as a backup mechanism for when calling YouTube Music directly doesn't work, and they are having the same issues as ViTune does
  • Google started enforcing a JavaScript challenge on all platforms other than iOS, so it seems like we have to impersonate iOS in order to make this work. NewPipe has been doing that for a while now
  • Even when logged in, the JavaScript challenge is still mandatory. See for yourself: open your devtools in your browser when starting a random song on music.youtube.com. The player request doesn't return stream urls anymore.

@MimirHim
Copy link

Are we cooked?

@25huizengek1
Copy link
Owner

Maybe. I'm looking into implementing this like NewPipe does; by using an entire JavaScript engine to make it work. Expect it to perform poor on low/medium-end devices. Might as well just import NewPipeExtractor at this point.

@gechoto
Copy link

gechoto commented Oct 25, 2024

Might as well just import NewPipeExtractor at this point.

Even that is not a guaranteed fix. NewPipe works unreliably for me lately. Often videos just don't play.
Others have the same issue, see: TeamNewPipe/NewPipe#11139

In my experience the only things that currently work are:
1.) Actually log in (no problems since I did in InnerTune)
2.) Use a real browser (I always use this as a workaround when NewPipe refuses to work)

@th3y
Copy link

th3y commented Oct 25, 2024

Haven't had the time yet to actually work on this, I'm sorry. I'll update y'all ASAP.

There are two ways to fix the current issue 1- Use g00gle acc c00kies 2- Use piped /streams/

Both won't work, here's why:

  • ViTune already uses Piped as a backup mechanism for when calling YouTube Music directly doesn't work, and they are having the same issues as ViTune does
  • Google started enforcing a JavaScript challenge on all platforms other than iOS, so it seems like we have to impersonate iOS in order to make this work. NewPipe has been doing that for a while now
  • Even when logged in, the JavaScript challenge is still mandatory. See for yourself: open your devtools in your browser when starting a random song on music.youtube.com. The player request doesn't return stream urls anymore.

Google account actually work, i did a minimal change and it works now. But videos that need confirmation are not working.
Other apps that use the same system are working if you logged in.
Also, some windows apps are not working too unless you log in

@gechoto
Copy link

gechoto commented Oct 25, 2024

yt-dlp added a po_token:
yt-dlp/yt-dlp#10648

Seems it needs to be "generated in a browser"
so it still needs a js engine (or maybe it works in a in-app webview?)
but maybe only once per session and not for every song?
Idk how it works - haven't had time to really look into it
not sure how much it helps in the case of ViTune but might be something to look into

@P4r73x3

This comment was marked as spam.

@25huizengek1
Copy link
Owner

Hi everyone, I committed an experimental fix ==> 504b6f7

Normally I would test a lot more, then release, but I'll release anyway, it's better than nothing.
For more information, read the commit message.

I'll keep this issue open even after the release, just so we can test a bit more before calling it 'fixed'.
I added a lot more logging to the entire stream fetching process, so debugging this became a lot easier. Feel free to post your logs in here.

@25huizengek1 25huizengek1 added fixed This should be fixed, but it still needs testing and removed help wanted Extra attention is needed labels Oct 25, 2024
@Mexiater
Copy link

@25huizengek1 soooo how do we make it work with the current release? Are you gonna make a new one soon?

@Ayusha94751
Copy link

Sir, I tried installing the app but only source code is available for version 1.1.1

@25huizengek1
Copy link
Owner

@Mexiater @Ayusha94751 I hadn't released the new version yet. You should be able to update your app in F-Droid / from GitHub releases now.

(F-Droid broke on me because of the AGP upgrade, so I literally had to debug Python in the meantime, see androguard/androguard#1014 if you're interested, I guess I should PR to fdroidserver or smth 😂 )

@Mexiater
Copy link

thank you!

@Ayusha94751
Copy link

I also want to learn how to do Android Developement like you. Could you suggest me the resources for it?

@Wqttzicue
Copy link

Wqttzicue commented Oct 25, 2024

Too much computernerding things for me T-T

@genericbetatester
Copy link
Author

Good job! everyone, it now works!

@Ayusha94751
Copy link

Oh! It works so smoothly. And this fluffy pip mode is insane. I can play ping pong with it all day long LOL.

@Ayusha94751
Copy link

Ayusha94751 commented Oct 25, 2024

You know what, I got this error once again
Screenshot_20241025-175522
Screenshot_20241025-175631

@Ayusha94751
Copy link

You know what, I got this error once again Screenshot_20241025-175522 Screenshot_20241025-175631

But now it worked after searching the same song again.

@25huizengek1
Copy link
Owner

That song works for me, maybe it got blocked in your region/you need to sign in. I'll work on a login system later on. (As I said earlier, some songs still won't work due to regional/age restrictions)

@Ayusha94751
Copy link

Nah, it's alright. Lemme be clear:

  1. When I tried to play the song from favourites after importing my data from Vimusic, it doesn't play and shows that error.
  2. When I searched the song from the app and then played it, it played normally.

By the way, the song in the 2nd step I mentioned was not set as favourite. So I think that these songs had a different IDs despite being the same song.

@25huizengek1
Copy link
Owner

I guess the song actually got deleted from YouTube Music and got re-released. That stuff happens every now and again, I don't know why.

@DaniloPedrazzi
Copy link

I just wanna thank the dev for the quick fix, appreciate that, thank you!!!

@pseudoparenchymatous
Copy link

Is this to be expected? No thumbnails

Screenshot_2024-10-26-11-12-42-974_app vitune android-edit

Screenshot_2024-10-26-11-12-25-441_app vitune android-edit

@Ayusha94751
Copy link

It works for me. I can see all of the thumbnails and it plays nicely. Maybe you can try to change the DNS settings or somethin'.

@kjay23
Copy link

kjay23 commented Oct 27, 2024

So far everything works pretty well on the latest release 🤷‍♂️

@Metgus
Copy link

Metgus commented Oct 28, 2024

I am writing through a translator so if something is not clear, all questions to the translator. As you know, there are already problems with YouTube in Russia and I am afraid that even if a solution to the problem is found, it will not work in Russia.

@Wqttzicue
Copy link

I am writing through a translator so if something is not clear, all questions to the translator. As you know, there are already problems with YouTube in Russia and I am afraid that even if a solution to the problem is found, it will not work in Russia.

Вообще, от провайдера и ВПН зависит, но да, если твой провайдер послушный, то вероятно ViTune не будет работать.

@25huizengek1
Copy link
Owner

I am writing through a translator so if something is not clear, all questions to the translator. As you know, there are already problems with YouTube in Russia and I am afraid that even if a solution to the problem is found, it will not work in Russia.

@Metgus YouTube is not available in Russia, I'm sorry. (Or as YouTube describes themselves: temporarily unavailable)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed This should be fixed, but it still needs testing
Projects
None yet
Development

No branches or pull requests