InnerTune icon indicating copy to clipboard operation
InnerTune copied to clipboard

YT Music Official blocks non-login user's music play aggressively

Open CanglanXYA opened this issue 1 year ago • 9 comments

Checklist

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

  1. Open a new music
  2. "Please sign in"

Expected behavior

Play music in anonymous mode.

PS: Change the local identity when YT blocks you (to try to evade ban) or guide user to login page automatically

Actual behavior

YT block you

Screenshots/Screen recordings

e5c033c4-9d65-487d-b148-15aba766183c

Logs

no

InnerTune version

0.5.10

Android version

Android 14

Additional information

Thats not an IP based ban, I changed my ip to different locations but the ban is persisting.

CanglanXYA avatar Oct 16 '24 10:10 CanglanXYA

I had this problem too. This problem just appeared a few hours ago imo

stephnradd avatar Oct 16 '24 13:10 stephnradd

Same problem

Aji-prakoso avatar Oct 16 '24 14:10 Aji-prakoso

they're blocking legit browser access too btw, i guess it's time to abandon this terrible spyware company products. it was fun while it lasted, bye2 youtube/music.

celengbalap avatar Oct 17 '24 06:10 celengbalap

I have tested multiple requests, if not visitorData proivided that reject. Some Times, there IS visitorData that work, and some other visitorData that don't work. I speak about Android music requests. But maybe for solve this issue, do requests with tv or browser music client, i have noticed if not visitorData that don't reject the request

pigeonmal avatar Oct 17 '24 12:10 pigeonmal

they're blocking legit browser access too btw, i guess it's time to abandon this terrible spyware company products. it was fun while it lasted, bye2 youtube/music.

i'm sure there's a way around this since rimusic had this issue, let's not lose hope

blacklizzt avatar Oct 17 '24 14:10 blacklizzt

For over a week, I've been listening to music. Now, every time I want to listen to any music, I get the same: 'Please sign in'

Vasco10 avatar Oct 17 '24 15:10 Vasco10

Yup! I'm also facing the same problem

rayn000 avatar Oct 18 '24 15:10 rayn000

Newpipe (and its forks) function at the time of writing (use the background player to stream only audio).

user-1-2-3-4-5 avatar Oct 19 '24 08:10 user-1-2-3-4-5

They're just banning sessions (visitorData) imo, because if we delete the db from the app's data, it works totally well (for me personally).

ghost avatar Oct 21 '24 20:10 ghost

Having the same exact issue Screenshot_20241024_221555_Gallery.jpg

eu-kode avatar Oct 24 '24 20:10 eu-kode

This is upsetting. Tried a couple alternatives, and just one working at the moment - ViTune (forked from ViMusic)

ben2talk avatar Oct 26 '24 01:10 ben2talk

Can someone investigate on this commit and make a PR? https://github.com/25huizengek1/ViTune/commit/504b6f717b6b3bef8e71e7ff976a0a2fed4c4e0d Sorry, I'm busy these days.

z-huang avatar Oct 26 '24 03:10 z-huang

Can someone investigate on this commit and make a PR? 25huizengek1/ViTune@504b6f7 Sorry, I'm busy these days.

Maybe @Malopieds could help? 😇

BluePixel4k avatar Oct 26 '24 06:10 BluePixel4k

Maybe @Malopieds could help? 😇

I was looking for something yesterday, I'll have a look into this later on today, and PR if I found something.

Malopieds avatar Oct 26 '24 07:10 Malopieds

Will this issue be fixed soon cause rimusic, vi tune, harmony music and my favorite Inner tune isn't working 😢

techy2245 avatar Oct 26 '24 12:10 techy2245

issue now is I can't play songs even though I have signed showing some Java error Screenshot_2024_1025_230625.jpg

techy2245 avatar Oct 26 '24 12:10 techy2245

Setting it to IOS player is enough to make it work (maybe not for long). The commit linked before is also trying to implement a way to make it work without using IOS agent, in the same way as youtube is doing it, but is still buggy. I'm trying to find a workaround but I won't be able to PR before tomorrow at least.

const val USER_AGENT_IOS = "com.google.ios.youtube/19.29.1 (iPhone16,2; U; CPU iOS 17_5_1 like Mac OS X;)"
val IOS =
  YouTubeClient(
     clientName = "IOS",
     clientVersion = "19.29.1",
     api_key = "AIzaSyB-63vPrdThhKuerbB2N_l7Kwwcxj6yUAc",
     userAgent = USER_AGENT_IOS,
  )

This should be enough, by replacing the old call from the player in YouTube.kt (from ANDROID_MUSIC to IOS) I will try to get the other way working tomorrow. But they can easily replace it anytime now. @z-huang

Malopieds avatar Oct 26 '24 12:10 Malopieds

Why not use basic web remix client and do decipher ?

pigeonmal avatar Oct 26 '24 14:10 pigeonmal

They're just banning sessions (visitorData) imo, because if we delete the db from the app's data, it works totally well (for me personally).

you deleted the data/cache or a db at the app folder?

thetalkingsquirrel avatar Oct 26 '24 14:10 thetalkingsquirrel

Why not use basic web remix client and do decipher ?

That's what I'm planning in the end, but do you know how to decipher? They're curently using some obfuscated js, I think I got most of it, but I'll need more time. Furthermore I'm missing a parameter called cpn, so I need to know where get that from.

Malopieds avatar Oct 26 '24 14:10 Malopieds

Why not use basic web remix client and do decipher ?

That's what I'm planning in the end, but do you know how to decipher? They're curently using some obfuscated js, I think I got most of it, but I'll need more time. Furthermore I'm missing a parameter called cpn, so I need to know where get that from.

Yes I have created my own music app for mobile, but I use innertune for my tablet. Check youtube.js source code they have down very usefull decipher code. An other usefull code IS ytdl core but not work any more, you must change the regex for 'n', because youtube changed their code : they do .slice(0,0). I Can send you my personal code, but it's in typescript not kotlin (my app is in react native)

For "cpn" it's not mandatorry, it's for send After playback stats. It's usefull if you have a unique visitorData of the user. Youtube music will update their home page, with New recommandations, because you send playback stats request (like you watched the song)

Sorry for my Bad english, i'm french

pigeonmal avatar Oct 26 '24 15:10 pigeonmal

@Malopieds Thanks for the quick fix! I've committed the change. It will be grateful for other people to double-check.

Why not use basic web remix client and do decipher ?

Running js in JVM is noticeably slow. In fact, the very old version of InnerTune uses a JavaScript Emulator to do decipher. This will be the last step if no other viable methods are found.

z-huang avatar Oct 26 '24 16:10 z-huang

You have right, it will be very slow. So if the problem IS from visitorData, why can't create session and save locally the generate visitorData ?The Android client for player will be not rejected. Maybe thinks about that if they block on iOS client too. In my last tests, they have also blocked tv client

pigeonmal avatar Oct 26 '24 17:10 pigeonmal

I Can send you my personal code, but it's in typescript not kotlin (my app is in react native)

In your code do you decipher or call a js script from youtube? If decipher yourself I could maybe use some of that.

For "cpn" it's not mandatorry, it's for send After playback stats. It's usefull if you have a unique visitorData of the user. Youtube music will update their home page, with New recommandations, because you send playback stats request (like you watched the song)

I see, but when not sending cpn the cipher does not look the same...

@Malopieds Thanks for the quick fix

No problem!

Running js in JVM is noticeably slow. In fact, the very old version of InnerTune uses a JavaScript Emulator to do decipher. This will be the last step if no other viable methods are found.

I also agree.

Malopieds avatar Oct 26 '24 18:10 Malopieds

So if the problem IS from visitorData, why can't create session and save locally the generate visitorData ?The Android client for player will be not rejected.

The problem doesn't seem to be visitorData, since I create different visitorData for each user. https://github.com/z-huang/InnerTune/blob/dev/app/src/main/java/com/zionhuang/music/App.kt#L79:L92

z-huang avatar Oct 27 '24 02:10 z-huang

@z-huang Is there a working workaround yet? If so, do you know when it will be incorporated into a release? Thank you for your time and effort!

ShaKabosh avatar Oct 27 '24 06:10 ShaKabosh

Yes, you can try out the latest build. If there's no other issue from this fix, I will release a new version as soon as possible.

z-huang avatar Oct 27 '24 06:10 z-huang

Hey, I found a way to decipher the sig without involving js. But after that we need to get a n from the n we get in the request. This involves a 300-ish lines obfuscated js code. I don't see other way to do it without running js somehow... If anyone has ideas?

Malopieds avatar Oct 27 '24 20:10 Malopieds

Hey, I found a way to decipher the sig without involving js. But after that we need to get a n from the n we get in the request. This involves a 300-ish lines obfuscated js code. I don't see other way to do it without running js somehow... If anyone has ideas?

Hey, Where is the obfuscated JS code?

ghost avatar Oct 27 '24 20:10 ghost

Where is the obfuscated JS code?

https://www.youtube.com/s/player/fb725ac8/player_ias.vflset/en_US/base.js Search for enhanced_except, the function is called cna

Malopieds avatar Oct 27 '24 20:10 Malopieds