futo-org / grayjay-android

Read-only mirror of Grayjay repo for issue tracking
https://gitlab.futo.org/videostreaming/grayjay
Other
689 stars 41 forks source link

Grayjay isn't taking/giving Watch info to YouTube #1253

Open SdoggaMan opened 3 weeks ago

SdoggaMan commented 3 weeks ago

Hi there! In the last 1-2 weeks, Grayjay seems to have stopped giving watch metrics from Grajay to YouTube, and from pulling YouTube's watches into Grayjay (though this isn't conclusive as some suggested content is flowing through; but that could just be the algorithm on YouTube's side translating into Grayjay.)

My feed is primarily watched content in Grayjay, and if I go to YouTube, they're served up as unwatched videos that it knows I'd like to watch next.

Notably, I do have a Pihole at home, but it isn't blocking anything YouTube-functionality-relted, and the problem persists outside of the home network, like at work and on mobile data.

I have reset the source and re-updated it, logged out with/without clear, and reset Grayjay, but it seems as if it's something within how Grayjay handles returning info to YouTube.

Grayjay 253, YouTube 191

Grayjay Version

253

What plugins are you seeing the problem on?

Youtube

Plugin Version

191

When do you experience the issue?

Relevant log output

No response

VoxelPrismatic commented 3 weeks ago

Grayjay is read only; no likes, views, comments etc are ever posted to YouTube. This way, Grayjay doesn't have to agree to the terms of the YouTube API.

SdoggaMan commented 3 weeks ago

Grayjay is read only; no likes, views, comments etc are ever posted to YouTube. This way, Grayjay doesn't have to agree to the terms of the YouTube API.

This is a break in functionality as Grayjay was doing this previously. Grayjay supports logging into an account via the source, and there is literally a 'watch' setting - Sources > YouTube > Provide Youtube Activity "Use authenticated client for playback, telling Youtube what you watched".

Additionally, I feel it makes little sense to have a product like Grayjay at all if core functionality like this isn't supported, since the algorithm drives nearly all interaction with the service these days, and viewed videos is core to that algorithm.

Comments, likes and so on, I fully understand and agree (frankly it's nice sometimes not to be able to chip in on some idiot's comment on the YouTube side) but watch history is a core and critical mechanic that was working.

VoxelPrismatic commented 3 weeks ago

Oh, you're right. I never noticed that option.

SdoggaMan commented 3 weeks ago

All good! Depends on how/what you use Grayjay for of course. Mine is essentially a YouTube replacement, so I notice really quickly when existing YouTube functionality breaks, but more intermixed feeds probably suffer this far less!

sigboe commented 2 weeks ago

It is an issue with the iOS user agent "hack" to get around YouTube blocking 3rd party apps.

I temporarily switched to revanced, which has the same issue. The workaround in revanced is to switch to the YouTube VR user agent. This has tons of other issues, like no HD videos. It's super annoying.

SmartTube on android TV doesn't have this issue at least for me. I don't know what they do different, or if YouTube for Android TV user agent is better

ApexDevelopment commented 2 weeks ago

It is an issue with the iOS user agent "hack" to get around YouTube blocking 3rd party apps.

I temporarily switched to revanced, which has the same issue. The workaround in revanced is to switch to the YouTube VR user agent. This has tons of other issues, like no HD videos. It's super annoying.

SmartTube on android TV doesn't have this issue at least for me. I don't know what they do different, or if YouTube for Android TV user agent is better

Here's SmartTube's implementation for reference. From just glancing at it I can't really tell what's key to getting it working but maybe someone more familiar with YouTube's API will spot it.

SdoggaMan commented 2 weeks ago

It is an issue with the iOS user agent "hack" to get around YouTube blocking 3rd party apps.

I temporarily switched to revanced, which has the same issue. The workaround in revanced is to switch to the YouTube VR user agent. This has tons of other issues, like no HD videos. It's super annoying.

SmartTube on android TV doesn't have this issue at least for me. I don't know what they do different, or if YouTube for Android TV user agent is better

Oh excellent point, I hadn't put two and two together yet, but now that you mention it I do notice that my toast popups have changed from "Block detected, attempting bypass..." to the iOS bypass message above. I had just assumed they'd changed the way those toasts were worded or how they worked.

I wonder if there's something I can do to free up "regular" loading? I didn't change anything on the network filtering side, but perhaps there's something unique that the Pihole is blocking or something that might free this up.

This, and more especially, the buffering issue (#1164), is really driving me away from Grayjay back to YouTube app for the time being.

VoxelPrismatic commented 2 weeks ago

YouTube is trying to block these alternative apps by several means, including the user-agent string, IP address, and other fingerprinting techniques. Switching to iOS tricks YouTube into believing it's a new client, allowing you to actually watch the videos.

I find the most reliable method is to use a VPN out of the country. I'm using Mullvad connected to Sweden.

SdoggaMan commented 2 weeks ago

Interestingly, while this is still happening, I've noticed today that while listening to a video in Grayjay, I pulled up YouTube to look up something else and it gave me the "Continue watching with premium" video, accurate to my current position in Grayjay, at the bottom - so there's definitely some communication happening between Grayjay and YouTube, just not the watched history. Couldn't tell you why... (Unless this bug has just been fixed/bypassed!)

I'm now on YouTube source version 192.

z2rec commented 1 week ago

Make sure s.youtube.com domain is whitelisted and that you can resolve it.

Edit: For more clearance this isn't something you do inside the app. This can be an issue if you are using pi-hole or private DNS like AdGuard or something similar. This is something that blocked watch history for me on Revanced Youtube as well.

SdoggaMan commented 4 days ago

Hey @z2rec - sorry for the delay in replying to you! s.youtube.com is definitely whitelisted - I first had the issue with YouTube history not working when I rolled out the Pihole and whitelisted it then, back before I got onto Grayjay, so definitely in place now. I did a quick check and it's on the whitelist in Pihole now.

mohag commented 4 days ago

Mine works after logging out and logging in again... (it was doing the "blocking attempt detect, failing back to iOS" thing, but I thought that was an app issue, not an issue with the session....)

SdoggaMan commented 3 days ago

One of the updates seems to have fixed this. My YouTube feed and Grayjay are both working normally again. I haven't logged out and back in since my initial comment mentioning doing so, but there have been several updates to both YouTube source and Grayjay. Great stuff guys, thank you!

I'll leave this open a bit just in case it reoccurs, but will try to come back and close it in a few days, all going well.