iv-org / invidious

Invidious is an alternative front-end to YouTube
https://invidious.io
GNU Affero General Public License v3.0
16.2k stars 1.79k forks source link

[Bug] List of videos on a channel page is incorrect - no pagination channel #3371

Closed LiberteIV closed 5 months ago

LiberteIV commented 1 year ago

Summarized by @unixfox:

The list of videos on a channel page is incorrect, sometimes it returns all the correct videos, sometimes nothing or other times only old videos.

Related issue: https://github.com/TeamNewPipe/NewPipe/issues/9223


Lately, since a week or so i'm having a wired issue that never happened before. Say for example i'm opening my browser and connecting to https://yewtu.be/channel/UCgFP46yVT-GG4o1TgXn-04Q The channel either show old content like couple of months ago, or it does not load any content at all, and sometimes it loads the latest content as expected, why does this happen?

First screenshot there are supposed to be videos between the channel name and the susbscribe button but there are none. Second screenshot shows videos from a month ago not the latest one, i had to reload the page like four times like gabling to get it load the latest videos.

2

1

unixfox commented 1 year ago

Youtube is A/B testing a new way of delivering the list of videos for a channel, Invidious only supports the old way. That's why you randomly see old videos or nothing.

JPcode05 commented 1 year ago

I've had this issue yesterday and I was going to report it; now I don't have to. Thanks!

What's the new way of delivering? Does it have to do with them removing the ability to sort by oldest?

LiberteIV commented 1 year ago

Right, makes sense. I heared youtube is doing some changes. Guess we just have to wait. Thanks for the info.

unixfox commented 1 year ago

Related issue: https://github.com/TeamNewPipe/NewPipe/issues/9223

unixfox commented 1 year ago

Interesting findings: https://www.reddit.com/r/NewPipe/comments/yie0ca/workarounds_for_the_new_youtube_channel_tabs/

meatspinner commented 1 year ago

Things got worse and right now channels aren't displaying videos at all.

Somehow Viewtube.io is displaying videos correctly.

seriocomedy commented 1 year ago

Things got worse and right now channels aren't displaying videos at all.

Somehow Viewtube.io is displaying videos correctly.

The main difference between viewtube and invidious's handling of channels that I can see is that invidious has hardcoded API keys while viewtube refreshes its API key by fetching a channel html and parsing the response.

meatspinner commented 1 year ago

Things got worse and right now channels aren't displaying videos at all. Somehow Viewtube.io is displaying videos correctly.

The main difference between viewtube and invidious's handling of channels that I can see is that invidious has hardcoded API keys while viewtube refreshes its API key by fetching a channel html and parsing the response.

Yeah, that might be the case, probably the same reason why Piped is working normally while Cloudtube is not showing videos.

I thought Freetube was broken when the videos weren't showing up on the channel's pages, glad to know that's not the case.

garoto commented 1 year ago

Workaround rule for the forked redirector legacy Palemoon extension (edit: it's called URL Rewritter now), but easily adapted to the current FF one:

{
    "exampleUrl": "https://yewtu.be/channel/UCBB0oz7Yo_35gnbPYGKGJTA",
    "includePattern": "https://yewtu.be/channel/UC*",
    "excludePattern": "",
    "redirectUrl": "https://yewtu.be/playlist?list=UU$1",
    "patternType": "W",
    "disabled": false
}
tunnckoCore commented 1 year ago

Yep, noticed that last few days, and I was thinking because some net problems on my end, or instance problems. So i came to hear what's happening.

Lovely, @garoto! WIll use it for now.

Trit34 commented 1 year ago

Interesting findings: https://www.reddit.com/r/NewPipe/comments/yie0ca/workarounds_for_the_new_youtube_channel_tabs/

This workaround works for Invidious, too.

Example: LGR’s channel returns no video on the FDN’s instance: https://invidious.fdn.fr/channel/UCLx053rWZxCiYWsBETgdKrQ

But showing the videos channel list as a playlist shows them all (I think): https://invidious.fdn.fr/playlist?list=UULx053rWZxCiYWsBETgdKrQ

Just remember to replace UC… string by UU… and paste the channel identifier as a playlist URL parameter and you’re OK.

Thanks for the tip!!! o/

unixfox commented 1 year ago

Just remember to replace UC… string by UU… and paste the channel identifier as a playlist URL parameter and you’re OK.

Works for me without replacing anything, see: https://invidious.fdn.fr/playlist?list=UCLx053rWZxCiYWsBETgdKrQ

salfter commented 1 year ago

Youtube is A/B testing a new way of delivering the list of videos for a channel, Invidious only supports the old way. That's why you randomly see old videos or nothing.

I just tried the first 10 channels from my subscriptions page. None of them worked.

Just remember to replace UC… string by UU… and paste the channel identifier as a playlist URL parameter and you’re OK.

That'll work in the meantime...just created a redirection rule to implement it. Thanks!

FreeBornAngel commented 1 year ago

Working again, for me.

SamantazFox commented 1 year ago

Reopening because the fix isn't complete (channel paging is still broken)

artenax commented 1 year ago

Hello. I'm using User Script in Greasemonkey in Firefox to redirect from YouTube to Invidious. Here is the code:

// ==UserScript==
// @name               YouTube Redirect to Invidious
// @namespace          Backend
// @include            https://m.youtube.com/*
// @include            http://m.youtube.com/*
// @include            https://www.youtube.com/*
// @include            http://www.youtube.com/*
// @version            1.0
// @run-at             document-start
// @author             Denis
// @grant              none
// ==/UserScript==

var a = 0;
setInterval(function () {
 if (a === 0 && window.location.href.indexOf('watch?') > -1 && window.location.href.indexOf('list=WL') < 0) {
  a = '//yewtu.be/watch?' + window.parent.location.href.split('?')[1];
  window.location.replace(a);
 }
}, 10);

Please tell me how I can change it to also redirect from https://yewtu.be/channel/ID to https://yewtu.be/playlist?list=ID ?

There is only one page on yewtu.be with a list of videos (on the yewtu.be/channel/ID). page=2, page=3, etc. are gone! I would be very upset if page=2+ disappeared forever. On other Invidious instances, the video list is empty everywhere.

artenax commented 1 year ago

I set up a redirect in Firefox using the Redirector extension. Following the example of Palemoon. And it's even better than User Script in Greasemonkey, because it works instantly.

Here are my rules: Standard redirect to yewtu.be:

Redirect: https://www.youtube.com/watch?v=*
to: https://yewtu.be/watch?v=$1
Redirect: https://m.youtube.com/watch?v=*
to: https://yewtu.be/watch?v=$1

Redirect from channel to playlist?list=:

Redirect: https://yewtu.be/channel/UC*
to: https://yewtu.be/playlist?list=UU$1

This is because the channel/ pages now don't contain all the videos the channel has. Unfortunately, I don't know if the Invidious developers will fix this (to have ?page=2, ?page=3 in the channel section as before). Maybe it's a YouTube limitation. By the way, replacing UC with UU is not required. It's also bad that playlist?list= page doesn't contain the release dates of the videos.

Removing &list= from watch?v=*&list=* (controversial rule):

Redirect: https://yewtu.be/watch?v=*&list=*
to: https://yewtu.be/watch?v=$1

This is because videos from the playlist?list= page work in playlist mode. And after one video ends, it goes to the next video (this is not turned off in the settings, although I've unchecked all the boxes):

LiberteIV commented 1 year ago

Asuming the devs fixed this by now because for me invidious is working again, thank you very much, marking this as solved now!

sonicrules1234 commented 1 year ago

They haven't finished the fix, as you can see the pull request that goes with this bug says part 1 in it. Channel paging is still broken, and livestreams do not appear yet.

sonicrules1234 commented 1 year ago

Found something interesting: The new ui doesn't seem to be there for music channels https://www.youtube.com/channel/UCL_qhgtOy0dy1Agp8vkySQg and https://www.youtube.com/channel/UCP0BspO_AMEe3aQqqpo89Dg for example.

artenax commented 1 year ago

Still no "Next page" button on the channel page. And the Invidious developers are silent, as always. Apparently, this will not be fixed, as well as many other bugs.

JPcode05 commented 1 year ago

Still no "Next page" button on the channel page. And the Invidious developers are silent, as always. Apparently, this will not be fixed, as well as many other bugs.

Trying to sort by oldest and most popular don't work either, they always sort by newest only. You can still sort by most popular on YouTube, but you can't sort by oldest anymore.

SamantazFox commented 1 year ago

There is only one page on yewtu.be with a list of videos (on the yewtu.be/channel/ID). page=2, page=3, etc. are gone! I would be very upset if page=2+ disappeared forever. On other Invidious instances, the video list is empty everywhere.

Yup, we're aware!

Paging is gone because I preferred to deploy a partial fix as fast as possible, rather than making people wait forever. That way, you're able to at least see the 30 latest videos of a channel ! (The playlist workaround remains if you want more of them).

Unfortunately, I don't know if the Invidious developers will fix this (to have ?page=2, ?page=3 in the channel section as before). Maybe it's a YouTube limitation.

Sadly, it seems that the paging can't be brought back. Instead, we'll have to resort to continuation tokens, as for channel playlists.

And yes, blame Youtube for that :/

They haven't finished the fix, as you can see the pull request that goes with this bug says part 1 in it. Channel paging is still broken, and livestreams do not appear yet.

Yes! Part 2 is coming, I'm working on it :)

JPcode05 commented 1 year ago

There is only one page on yewtu.be with a list of videos (on the yewtu.be/channel/ID). page=2, page=3, etc. are gone! I would be very upset if page=2+ disappeared forever. On other Invidious instances, the video list is empty everywhere.

Yup, we're aware!

Paging is gone because I preferred to deploy a partial fix as fast as possible, rather than making people wait forever. That way, you're able to at least see the 30 latest videos of a channel ! (The playlist workaround remains if you want more of them).

Wait, how do we use that?

Unfortunately, I don't know if the Invidious developers will fix this (to have ?page=2, ?page=3 in the channel section as before). Maybe it's a YouTube limitation.

Sadly, it seems that the paging can't be brought back. Instead, we'll have to resort to continuation tokens, as for channel playlists.

And yes, blame Youtube for that :/

Or we could create our own workaround somehow. Get a list of all the videos (cache it if necessary) and create the pages out of that.

They haven't finished the fix, as you can see the pull request that goes with this bug says part 1 in it. Channel paging is still broken, and livestreams do not appear yet.

Yes! Part 2 is coming, I'm working on it :)

Just have separate pages for shorts and livestreams on Invidious.

SamantazFox commented 1 year ago

The playlist workaround remains if you want more of them.

Wait, how do we use that?

this is explained here: https://github.com/iv-org/invidious/issues/3371#issuecomment-1300017158

Or we could create our own workaround somehow. Get a list of all the videos (cache it if necessary) and create the pages out of that.

This does not scale well. Mind that there are thousands of users browsing dozens of different channels, with thousands of videos each. That's a lot of data to cache and keep up to date!

accessiblepixel commented 1 year ago

Yes! Part 2 is coming, I'm working on it :)

@SamantazFox

I've pulled the latest build, thank you and to all the devs for adding a quick workaround to get something up and running (especially for people who aren't using the workaround)!

Just an idea, but is there maybe some scope to add a link within the top of the channel links to the playlist version of a channel, ("All Video Playlist" maybe) as a temporary workaround until the full list is fixed (however that will be)?

Does anyone know of a workaround from the playlist version to just open the video without it automatically playing the next one from the channel? I could maybe use redirector to strip the playlist argument from the URL but then that would stop actual playlists I want to watch from working, but I guess that might be okay until the team gets the channels working fully again.

Thank you!

forLoop42 commented 1 year ago

Gentlemen, pleased to present you my script that solves the problem with channel view: Fix Invidious Channel View. Only two things that I can't fix is amount of views (and when video was created) and sorting. (Tampermonkey / Greasemonkey / Violentmonkey required)

TheFrenchGhosty commented 1 year ago

@artenax

And the Invidious developers are silent, as always. Apparently, this will not be fixed, as well as many other bugs.

Hey my guy. The "Invidious developers" have lives and day jobs.

We are only silent on GitHub, things happened daily on Matrix-IRC, even though all of us have day jobs.

Bugs exist, yes, we know, Invidious has only 2 developers, so go ahead and pay them a salary if you want things to go faster. Invidious is FOSS, and no one in the team is getting paid to work on it, so if you aren't happy, go ahead and contribute your time or your money.

We don't owe you anything, remember that.

ZackiBoiz commented 1 year ago

Youtube is breaking Yewtube.

SamantazFox commented 1 year ago

Note: #3419 fixed the paging. It also added the "shorts", "livestream" and "channels" tabs

I'm keeping this open until the code has tests for the various channel tabs, and while we try to have the pagination with numbers back like before.

user234683 commented 1 year ago

@SamantazFox

I'm keeping this open until the code has tests for the various channel tabs, and while we try to have the pagination with numbers back like before.

Arbitrary paging has been found to be possible, at least when sorting by newest: https://github.com/user234683/youtube-local/issues/151#issuecomment-1435996523

Trit34 commented 1 year ago

It seems that this bug is back: on a channel’s videos page, the “Next page” link sometimes go back to the most recent vidéos, or does not show any video (in this case, I have to reload the page several times to make it show them again).

Tested on the FDN instance (version 2023.03.26-51085c5b @ master) with Clint Basinger’s “LGR” channel (and more, but it is the same with any channel): https://invidious.fdn.fr/channel/UCLx053rWZxCiYWsBETgdKrQ

It seems that reloading the page circumvents the bug quite well and finally shows the expected videos.

garoto commented 1 year ago

Tested on the FDN instance (version 2023.03.26-51085c5b @ master)

There are no commits with this 51085c5b hash on invidious/master as far as I can see.

Trit34 commented 1 year ago

It has worsened: Invidious’ channel page for LGR or another channel shows an error message, now:

Could not extract JSON. Youtube API returned error 500 with message: "ExecuteQuery for ChannelMiddlewareService-GetShelves failed: RET_CHECK failure (video/youtube/channels/frontend/shared/continuations/channel_middleware_token_encoding.cc:15) absl::WebSafeBase64Unescape(web_safe_token, &unescaped_token) ; OneMustSucceed: input 'mw_shelf_source_exp_continuation_unwrapper'; OneMustSucceed: input 'mw_shelf_source_exp_subgraphs'; OneMustSucceed: input 'mw_shelf_source_exp_empty_shelf_filter'; OneMustSucceed: input 'ShelfSourceExpansion__graph'; OneMustSucceed: input 'get_shelves_shelf_candidate_rank_sorter'; OneMustSucceed: input 'wrapped_main_subgraph'; OneMustSucceed: input 'pre_decoration_subgraph'; OneMustSucceed: input 'decoration_annotator_subgraph'; OneMustSucceed: input 'post_decoration_subgraph'; PropagateAllErrors: input 'GetShelvesEndpoint__graph'; PropagateAllErrors: input 'default_filter_survivor_probe_op'; PropagateAllErrors: input 'policy_enforcement_candidate_predicate'; /ChannelMiddlewareService.GetShelves RPC failed"

user234683 commented 1 year ago

Not sure if this is related, but yesterday the ctoken format for arbitrary paging was changed slightly, see this commit in youtube-local. Not sure if you guys are synthesizing the ctoken or just extracting it, either way the timing is coincidental

unixfox commented 1 year ago

Not sure if this is related, but yesterday the ctoken format for arbitrary paging was changed slightly, see this commit in youtube-local. Not sure if you guys are synthesizing the ctoken or just extracting it, either way the timing is coincidental

you are correct, I did notice it I pushed a quick fix here: https://github.com/iv-org/invidious/pull/3718 with explaining what really changed

github-actions[bot] commented 6 months ago

This issue has been automatically marked as stale and will be closed in 30 days because it has not had recent activity and is much likely outdated. If you think this issue is still relevant and applicable, you just have to post a comment and it will be unmarked.