-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Feed aborts loading videos/subscribers for channels with pronouns #11353
Comments
The issue is with any channel that has a pronouns field. Maybe the title could be updated to reflect this? I've done a little digging and I think the following two underlying issues are the cause: In YoutubeChannelExtractor.java: the metadata in the header is narrowed with the following filter: .filter(metadataParts -> metadataParts.size() == 2)
.findFirst() The comment explains that this is to "Find metadata parts which have two elements: channel handle and subscriber count." This approach appears to be outdated now, and only works by accident with most channels. Look at the JSON for a channel with no pronouns: [
{
"metadataParts": [
{
"text": {
"content": "@microzoe"
},
"enableTruncation": true
}
]
},
{
"metadataParts": [
{
"text": {
"content": "2.95K subscribers"
}
},
{
"text": {
"content": "3 videos",
"styleRuns": [
{
"startIndex": 0,
"length": 8
}
]
}
}
]
}
] That's not what the comment describes - the subscriber count is no longer in the same {
"text": {
"content": "@anarchozoe"
},
"enableTruncation": true
},
{
"text": {
"content": "she/her"
}
} So here this In addition, given that extracting subscriber count with a Regex is flaky in the first place (as the comments note), the code should be changed to catch the Ideally an expert in this code would come by and fix these issues; I'm not certain what issues there might be in a naive approach like grabbing the second If no one fixes it in a month or so I can do a PR to get the ball rolling. |
Updated the title. Thanks for the info! |
When the subscriber count extraction fails to find the Regex pattern, a RegexException is thrown. This is not a fatal error in most cases, for example when downloading the channel page in order to update the user's subscriptions, and so the correct behavior is to return UNKNOWN_SUBSCRIBER_COUNT. Related issue: TeamNewPipe/NewPipe#11353. This bug comprises two issues: subscribers cannot be extracted for channels with pronoun tags, and when the RegexException is thrown, channel subscriptions will fail to update because the exception is uncaught. This commit fixes the latter aspect of the issue.
Workaround, if you just want fetching your subscriptions to work: This is in the "Content" section of the NewPipe settings. It's true that it doesn't show the video duration in your subscription feed any more, but that's a trade I'm willing to make to have fetching the subscriptions work. I have a branch that fixes the issue with the regex exception, but I'm unable to test it because I can't compile the project. |
When the subscriber count extraction fails to find the Regex pattern, a RegexException is thrown. This is not a fatal error in most cases, for example when downloading the channel page in order to update the user's subscriptions, and so the correct behavior is to return UNKNOWN_SUBSCRIBER_COUNT. Related issue: TeamNewPipe/NewPipe#11353. This bug comprises two issues: subscribers cannot be extracted for channels with pronoun tags, and when the RegexException is thrown, channel subscriptions will fail to update because the exception is uncaught. This commit fixes the latter aspect of the issue.
I am getting this same-issue, recently: one-particular channel, ShempOfficial, is the only one which I'm subscribed to in NewPipe that will always say "subscriber count unavailable". I did a search for open-tickets on here and found this one. So I checked their channel on the YouTube website and indeed, they have their pronouns listed ("he/him/they/them") on their channel. Hopefully this issue will be fixed soon, as every time I refresh the "All" feed while subbed to them, I get "Sorry, something went wrong", and am asked to report it. Now I know what the cause is, at-least I now know I can safely ignore the errors. |
My PR is open now, so with any luck the issue with refreshing subscriptions will be fixed in the next NewPipe release. I'm going to leave the profile scraping changes to someone more experienced with this code, but my findings above should be easy to follow. |
Checklist
Affected version
0.27.2
Steps to reproduce the bug
Expected behavior
The channel videos should load properly.
Actual behavior
"Not loaded: 1" shows up at the top, and the channel videos don't load because it can't fetch the subscriber count.
Screenshots/Screen recordings
Logs
Exception
Crash log
Affected Android/Custom ROM version
Android 14 / OneUI 6.1
Affected device model
Samsung Galaxy S22 Ultra
Additional information
The affected channel has 229 subscribers at the time of writing. The subscriber count is correct when searching the channel in NewPipe. Clicking on the channel shows "Subscriber count unavailable" as in #10826, but avatar and banner load fine.
The "caused by" portion of the log is the same as #9442, but this error occurs in feed loading, not search. What I find odd is that my log doesn't show "Could not get subscriber count" like that one does.
Unsubscribing and resubscribing does not fix this. Haven't seen this error in any prior version.
The text was updated successfully, but these errors were encountered: