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

Unable to play songs in the app #1748

Open
4 tasks done
Meow-141 opened this issue Dec 16, 2024 · 221 comments
Open
4 tasks done

Unable to play songs in the app #1748

Meow-141 opened this issue Dec 16, 2024 · 221 comments
Labels
bug Something isn't working

Comments

@Meow-141
Copy link

Checklist

  • I am able to reproduce the bug with the latest debug version.
  • 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 the bug

"1. Look up for the song in the search menu or select song from library"
"2. Select song to play"

Expected behavior

"song should play"

Actual behavior

Shows:"Unknown error"

Screenshots/Screen recordings

Screenshot_2024-12-17-00-41-02-82_f4703f2d42345ac28c56f11a6100c500

Logs

Unable to provide log file, apologies.

InnerTune version

0.5.10

Android version

Android 12

Additional information

Have tried reinstalling the app but the issue persists.

@Meow-141 Meow-141 added the bug Something isn't working label Dec 16, 2024
@7agi
Copy link

7agi commented Dec 16, 2024

same for me, innertune server things i suppose

@Wolver78
Copy link

I am experiencing the same thing.

@Miguelin96
Copy link

I have the same problem

@p-1749
Copy link

p-1749 commented Dec 16, 2024

same for me, innertune server things i suppose

I thought it used youtube's servers?

@Upgrayedd710
Copy link

Same here.

@BrandonIsHere5
Copy link

Yeah, hoping it won't be just like the ViMusic app

@7agi
Copy link

7agi commented Dec 17, 2024

I thought it used youtube's servers?

yes, but some apps like innertune still works even without account, but innertune doesn't work, with neither no account nor with one

@Zephyr-debugg
Copy link

Yaa, same thing I can't play any songs & it's showing unknown error

@Hhkhhhj
Copy link

Hhkhhhj commented Dec 17, 2024

Yeah, hoping it won't be just like the ViMusic app

Yea fr I got a bit scared

@maxinewyntir
Copy link

Yup, I'm having the same issue for the last two days now. Rebooted my phone, logged-out from my YouTube Music account, reinstalled the app, installed an older version — and the problem persists.

@mvaishwarya
Copy link

Screenshot_2024-12-17-14-18-52-795_com zionhuang music
I'm facing the same issue as well and I did all the basic troubleshooting. Nothing works as of now.

@SortingFarmer
Copy link

The error also occurs for me, however I noticed that any songs that are downloaded or are in the cache are working, so I guess its something with getting the songs from youtube

@p4p1
Copy link

p4p1 commented Dec 17, 2024

Same problem here

@Techy05
Copy link

Techy05 commented Dec 17, 2024

Same issue.
I was able to play 1 song, after that no new song works. Only cached songs play fine.

@Hikari2w2
Copy link

Same problem

@183efa
Copy link

183efa commented Dec 17, 2024

Same here

@Lokilisa
Copy link

I've had the same issue but this only started the latter half of yesterday the app worked fine in the morning, also all the songs I downloaded before all work fine. I think it's the problem of fetching songs from YouTube bit idk why

@CranialTyrant
Copy link

Until the issue's resolved, I recommend using YouTube Music patched with Revanced.

@zg4real
Copy link

zg4real commented Dec 17, 2024

I have the same issue and only downloaded/cached songs play just fine other than that i get "unknown error"

@zeepfds
Copy link

zeepfds commented Dec 17, 2024

i have the same problem but only happen with songs i dont downloaded

@HARI00070777
Copy link

Plz solve it! We have faith!

@WarrenOni
Copy link

Same problem here too.
Please solve it..🥺🥺

@diam0ndkiller
Copy link

Same problem.
Seems to be on youtube's side as it appears in revanced as well but has been fixed there (https://www.reddit.com/r/revancedapp/comments/1hfr6ne/youtube_music_playback_issues_fixed/)

@josprox
Copy link

josprox commented Dec 17, 2024

It is a query error to YouTube, it seems that the API does not work correctly and returns an error as shown below.
bash { "error": { "code": 400, "message": "Precondition check failed.", "errors": [ { "message": "Precondition check failed.", "domain": "global", "reason": "failedPrecondition" } ], "status": "FAILED_PRECONDITION" } }

@ManuelBoe14
Copy link

It worked yesterday still fine for me but I am having the same issue now, it seems like Google is slowly blocking unauthorized access to their API

@LNRDshine
Copy link

Im going crazy rn, i got back to innertune two days ago (Used to use it in 2022) and this happens

@josprox
Copy link

josprox commented Dec 17, 2024

I have discovered that the error comes from the android key "ANDROID_MUSIC" which is in YoutubeCient, it is necessary to change it and you will be able to get the youtube streaming.

@jioroJI
Copy link

jioroJI commented Dec 17, 2024

We all hv the same issue at the same time... ayooo😭🙏

@EdgiestNickel89
Copy link

https://github.com/DD3Boh/OuterTune seems to have made a temporary fix, it's a fork of this project and they just removed the account for streaming, this means you can't access content that's restricted by account (private)

@javdc
Copy link
Contributor

javdc commented Dec 23, 2024

https://github.com/DD3Boh/OuterTune seems to have made a temporary fix, it's a fork of this project and they just removed the account for streaming, this means you can't access content that's restricted by account (private)

Yep, I just checked the code of the fork Metrolist because some people have been recommending it here and it just does the same, it removes login info to get the audio stream, so age restricted songs don't play but at least the rest works.

@EdgiestNickel89
Copy link

https://github.com/DD3Boh/OuterTune seems to have made a temporary fix, it's a fork of this project and they just removed the account for streaming, this means you can't access content that's restricted by account (private)

Yep, I just checked the code of the fork Metrolist because some people have been recommending it here and it just does the same, it removes login info to get the audio stream, so age restricted songs don't play but at least the rest works.

Is there a way I can remove the account from the app? Will that fix it? I want to play just public, none age restricted music, the only reason I even logged in was to sync my playlists

@schich02
Copy link

Use metrolists guys, I see z-huang is a contributor there https://github.com/mostafaalagamy/Metrolist Give an emoticon so that other friends can see it.😉

not working for me, says to login altough I am logged in

@schich02
Copy link

just use metrolist guys, it works flawlessly

not for me, tells me to log in although I am

@ilovemoddingappsok
Copy link

Is it fixed now? 12/24

@Lileyy
Copy link

Lileyy commented Dec 24, 2024

Use metrolists guys, I see z-huang is a contributor there https://github.com/mostafaalagamy/Metrolist Give an emoticon so that other friends can see it.😉

not working for me, says to login altough I am logged in

I wasn't logged in, initially I could play some songs until finally, the song I was playing suddenly stopped playing, and the message "unknown error" appeared.

Guys, it turns out we have to log in to be able to do it.

@gechoto
Copy link
Contributor

gechoto commented Dec 24, 2024

Is it fixed now? 12/24

Multiple approaches are in the works. You can test a build from my yt-dlp PR here:
https://github.com/z-huang/InnerTune/actions/runs/12447733806/artifacts/2352183730

There is no decision yet on what will be the final solution.

@FiresoulGamz
Copy link

Is it fixed now? 12/24

Multiple approaches are in the works. You can test a build from my yt-dlp PR here: https://github.com/z-huang/InnerTune/actions/runs/12447733806/artifacts/2352183730

There is no decision yet on what will be the final solution.

Is the link taken down. It shows page not found for me

@gechoto
Copy link
Contributor

gechoto commented Dec 24, 2024

Is the link taken down. It shows page not found for me

You have to be logged-in to download

@josprox
Copy link

josprox commented Dec 26, 2024

Hello, @gechoto :

I've noticed that you're working on a version using yt-dlp. Do you think this could be the definitive solution for the current issues?

I've been reviewing your code, and it looks like you've adapted it quite well. However, I've encountered an issue on my device: when trying to play music restricted by YouTube on its normal connection, the application crashes. I'm not sure if this is specific to my device or a general issue.

Is there anything we can assist with to help you perform additional tests?
Screenshot_20241225-205858_InnerTune Debug

@CranialTyrant
Copy link

CranialTyrant commented Dec 27, 2024

Malopieds' Innertune fork is back up and running. Signing into Google does break song playback however, so I would suggest not doing that.

@gechoto
Copy link
Contributor

gechoto commented Dec 28, 2024

Hello, @gechoto :

I've noticed that you're working on a version using yt-dlp. Do you think this could be the definitive solution for the current issues?

I hope we don't have to use yt-dlp but currently it is the only working solution.

Currently I experiment with NewPipeExtractor in a new PR. If that turns out to be working I would prefer that over yt-dlp.

I've encountered an issue on my device: when trying to play music restricted by YouTube on its normal connection, the application crashes.

I pushed an update to the yt-dlp PR. Please test the latest build. If it still doesn't work I need logs.
But I probably won't fix it soon because the other PR with NewPipeExtractor has higher priority.

Is there anything we can assist with to help you perform additional tests?

Not about tests but if anyone wants to help you can work on this:
TeamNewPipe/NewPipeExtractor#1252

We need it to get the PR with NewPipeExtractor working.
If anyone has some time you could work on this issue and make a PR to the NewPipeExtractor repository.

@josprox
Copy link

josprox commented Dec 28, 2024

I pushed an update to the yt-dlp PR. Please test the latest build. If it still doesn't work I need logs. But I probably won't fix it soon because the other PR with NewPipeExtractor has higher priority.

Hello @gechoto ,

I will test the new version you released to see if I can resolve the issue when loading songs.

I’m not very familiar with NewPipe Extractor, but from what I understand, it seems you're dealing with an issue related to "translating a URL for streaming." If you have an adapted version of NewPipe Extractor for Innertune that I can review, I’d like to analyze the request results and attempt to deobfuscate them. Even if the request shows an error, it would be helpful to see where it fails or at least understand how NewPipe Extractor works to handle obfuscation.

If the issue is similar to what I experienced with Joss Red while adapting music streaming for Joss Music, the most appropriate solution I found was passing cookie parameters using the Netscape format. However, this has a drawback, as the URL would need to go through a "proxy streaming," which impacts response speed.

Additionally, Google’s protections, which rely on account and IP-based responses, are challenging to adapt without a closed backend. These cases require "access" with an account that remains unnoticed—something I hope is not the case with NewPipe Extractor.

In Joss Music, we are already using a proxy streaming method with the YouTube V1 and V3 APIs combined with cookie injection. This allowed some flexibility to deobfuscate URLs. However, integrating this approach in a public environment would represent a security risk for users. Therefore, we need to proceed cautiously with these methods.

Let me know if there’s a version or information you can share. I hope we can find a solution!

@gechoto
Copy link
Contributor

gechoto commented Dec 29, 2024

@josprox

In Joss Music, we are already using a proxy streaming method

Just so you know a proxy solution probably won't work for long. YT is very aggressive lately blocking datacenter/VPN/proxy IPs so as soon as they detect for example an unusual amount of requests from your server it will likely be blocked.

combined with cookie injection

integrating this approach in a public environment would represent a security risk for users

This means you also proxy the users cookies? Indeed a risk and not a small one. Don't do that.

Let me know if there’s a version or information you can share. I hope we can find a solution!

See next post

@gechoto
Copy link
Contributor

gechoto commented Dec 29, 2024

Potential fix - please test

Download: https://github.com/z-huang/InnerTune/actions/runs/12531278666/artifacts/2368550482

This is a build from my current PR which changes some clients, params and integrates NewPipeExtractor.

Please test:

  • Logged in playback
  • Logged out playback
  • Age-restricted songs (when logged in)
  • Playback of premium exclusive content (if you can)
  • ... ?

Note:

  • Premium audio quality does not work currently

@josprox
Copy link

josprox commented Dec 29, 2024

@gechoto
In fact, a barrier was implemented to obtain the URL, acting as a proxy and ensuring that the origin of the request cannot be traced. However, as I mentioned earlier, this solution is temporary while a more stable alternative is developed.

Regarding cookies, they are indeed injected, but never from users. These cookies come from an account specifically configured as a developer. This prevents detection or blocking, as requests are processed as if made through YouTube’s V1 API. This is a functionality that SASID (if I’m not mistaken) used to perform, but it now works again.

I’ll test your PR and let you know what I find. For now, I owe you feedback on exclusive content playback, but I’ll share the results of the other tests. Does that work for you?

@josprox
Copy link

josprox commented Dec 29, 2024

@gechoto

Innertune with NewPipe Extractor

Test Results:

  • [x] Play any song without login.
    Result: Successful. The application behaves as expected when playing a song.

  • [ ] Play age-restricted content without login.
    Result: Failed. Attempting to play age-restricted content without login causes the app to crash. If data is not cleared, the app cannot be reopened.
    Detected error:

12-28 20:54:06.600 E/AndroidRuntime(25875): java.lang.IllegalStateException: Default FirebaseApp is not initialized in this process com.zionhuang.music.debug. Make sure to call FirebaseApp.initializeApp(Context) first.
  • [ ] Play any song with login.
    Result: Works correctly initially
    Detected errors:
12-28 20:55:34.452 E/MediaResumeListener(2300): Cannot resume with ComponentInfo{com.zionhuang.music.debug/com.zionhuang.music.playback.MusicService}  
12-28 20:56:08.774 E/MediaSyncManager_3742_3742(3742): updateController packageName:com.zionhuang.music.debug playbackState:0 playbackState?.actions:7339655 playbackState:PlaybackState {state=NONE(0), position=0, buffered position=0, speed=0.0, updated=20319431, actions=7339655, custom actions=[], active item id=0, error=null}
  • [x] Play age-restricted content with login.
    Result: Successful. Age-restricted content can be played after logging in.

Observations:

When attempting to play restricted content without login, a special content block should be implemented to prevent such actions instead of causing the app to crash.

Additionally, the streaming quality has decreased, which might hinder the user experience. It would be useful to explore if NewPipe Extractor offers an option to select the quality when retrieving the URL.

To avoid quality loss, it is recommended to always use YouTube’s V1 API and only rely on NewPipe Extractor when strictly necessary.

Additional Information:

These tests were conducted on a Redmi 10C running Rising OS based on Android 15, rooted with KernelSU. The console used was MatLog.

@gechoto
Copy link
Contributor

gechoto commented Dec 29, 2024

These cookies come from an account specifically configured as a developer. This prevents detection or blocking, as requests are processed as if made through YouTube’s V1 API.

Your account can get banned like in this case:
zerodytrash/Simple-YouTube-Age-Restriction-Bypass#263 (comment)

  • Play age-restricted content without login

this is expected to not work - you need to be logged in

  • Attempting to play age-restricted content without login causes the app to crash. If data is not cleared, the app cannot be reopened.

Default FirebaseApp is not initialized

I haven't changed anything about Firebase so it seem unrelated to my PR.
Seems you ran into this issue already reported before:
#1223

Can you try to build a foss version (without firebase) and see if this works?

  • [ ] Play any song with login.
    Result: Works correctly initially
    Detected errors

Please test again with the latest changes from the PR. Also make sure to test with songs which were never loaded before. If in doubt just reset the app (delete all data or uninstall->reinstall without restoring a backup).

When attempting to play restricted content without login, a special content block should be implemented to prevent such actions instead of causing the app to crash.

This is already the case. The app shouldn't crash. The crashes are likely related to Firebase. Try again without Firebase.

Additionally, the streaming quality has decreased, which might hinder the user experience. It would be useful to explore if NewPipe Extractor offers an option to select the quality when retrieving the URL.

Known issue. See the "Disadvantages" in my PR description for more info.

To avoid quality loss, it is recommended to always use YouTube’s V1 API and only rely on NewPipe Extractor when strictly necessary.

This already happens. The main relevant requests are still done by InnerTune directly.

Thanks for your test results so far.

@gechoto
Copy link
Contributor

gechoto commented Dec 29, 2024

Updated test build

Download: https://github.com/z-huang/InnerTune/actions/runs/12536995462/artifacts/2369536291

This is now a foss build which does not contain Firebase stuff so it should prevent the crashes.

@josprox Can you test with this?

@SCPF-Bot
Copy link

SCPF-Bot commented Dec 29, 2024

Updated test build

Download: https://github.com/z-huang/InnerTune/actions/runs/12536995462/artifacts/2369536291

This is now a foss build which does not contain Firebase stuff so it should prevent the crashes.

@josprox Can you test with this?

@gechoto

  • UI response time is slower than official latest build (or it's just my phone, idk).
  • Able to play songs with login
  • Able to play songs without login.
  • Able to play age restricted song without login.
  • Able to play age restricted song with login.

@javdc
Copy link
Contributor

javdc commented Dec 29, 2024

  • UI response time is slower than official latest build (or it's just my phone, idk).

This is normal, apps that use Compose (like this one) have a much worse performance when compiled in debug mode. When this is merged and a new official release is launched performance should be the same as before.

@gechoto
Copy link
Contributor

gechoto commented Dec 29, 2024

  • Able to play age restricted song without login.

This usually doesn't work. I guess it just played the song from the cache.
Which song did you test with?
Does it still work if you reset the app (clear all data or uninstall->reinstall without restoring backup)?

@javdc
Copy link
Contributor

javdc commented Dec 29, 2024

Also, I think it's worth to note that age-restricted is not the same as explicit. There are explicit songs that are not age-restricted and can be played without login even in current version. I was confused about this earlier as well.

If you want to actually test age-restricted content, the first seven videos of this playlist are age-restricted: https://www.youtube.com/playlist?list=PL132PBk1ji-HyjqSuw2I7bXXB-QdpP7IB

@gechoto
Copy link
Contributor

gechoto commented Dec 29, 2024

Also, I think it's worth to note that age-restricted is not the same as explicit

This is exactly why I included this question:

Which song did you test with?

Also sometimes only the video of a song is age-restricted but the audio-only version is not.

@SCPF-Bot
Copy link

@javdc
@gechoto

Tried this playlist:

Update:

  • Unable to play age restricted song without login.
    Screenshot_20241230-025856

  • Able to play age restricted song with login.
    Screenshot_20241230-030326

@josprox
Copy link

josprox commented Dec 30, 2024

Hello @gechoto ,

I’ve tested the latest version and conducted the corresponding tests. Here are the results:

  • Songs without login: They play without issues, working as expected.
  • Age-restricted songs without login: While they cannot be played (as expected), the app no longer crashes when attempting to play them.
  • Age-restricted songs with login: Everything works perfectly, with no issues or restrictions.

Regarding the audio quality, it’s excellent regardless of whether NewPipe Extractor is used or not. Additionally, I noticed there are no delays when loading the app, which significantly enhances the user experience.

In summary, this version seems very complete. I believe it could now be released as a final version since I didn’t encounter any major issues.

@josprox
Copy link

josprox commented Dec 30, 2024

What I Noticed

I’ve observed that, at least in my case, the volume seems to be capped at 56%, no matter how much I try to adjust it. From what I can tell, the player is failing to set the volume to its maximum level.

Screenshot_20241229-235525_InnerTune Debug
Screenshot_20241229-235519_InnerTune Debug

@josprox
Copy link

josprox commented Dec 30, 2024

Observations on Volume Adjustment

As you can see in the following two images, Innertune allowed users to set the volume to 100% and adjust it directly from the application without issues. It seems that NewPipe Extractor might not be properly configured to retrieve the volume range from the player when fetching a song.

Previously, this worked seamlessly, whether through the YouTube API V1, as Innertune natively handles it, or when streaming songs via Joss Red, as used in Joss Music.

It’s likely that a minor change was made when fetching or editing the playback range. While it’s not a critical issue, it is an important one to address.

Screenshot_20241229-235826_Joss Music
Screenshot_20241229-235830_Joss Music

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.