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

Implement content and session PO tokens #6931

Open
wants to merge 4 commits into
base: development
Choose a base branch
from

Conversation

absidue
Copy link
Member

@absidue absidue commented Feb 26, 2025

Implement content and session PO tokens

Pull Request Type

  • Bugfix

Related issue

Will link it after other devs have confirmed that it solves the issue for them too.

Description

YouTube has switched from just using session based PO tokens that are added to the streaming URLs, which is what we are currently doing, to also introducing content PO tokens which are tied to the video ID added to the /player request. This pull request implements that new PO token. Challenges are now fetched from the https://www.youtube.com/api/jnn which is a proxy for jnn-pa.googleapis.com instead of fetching it directly from the latter URL, which should hopefully help with people's misconfiguring their ad-blocker to block jnn-pa.googleapis.com.

This will definitely have code conflicts with the potoken proxy pull request, I will resolve the code conflicts in whichever pull request is merged later.

Testing

Open various videos and check that you don't get any 403s or Error: Error invoking remote method 'generate-po-token' errors.

Desktop

  • OS: Windows
  • OS Version: 10
  • FreeTube version: e4092aa

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) February 26, 2025 18:23
@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Feb 26, 2025
@PikachuEXE
Copy link
Collaborator

Putting into custom build to test for 1 week+

@github-actions github-actions bot added PR: merge conflicts / rebase needed and removed PR: waiting for review For PRs that are complete, tested, and ready for review labels Mar 2, 2025
Copy link
Contributor

github-actions bot commented Mar 2, 2025

This pull request has conflicts, please resolve those before we can evaluate the pull request.

Copy link
Contributor

github-actions bot commented Mar 2, 2025

Conflicts have been resolved. A maintainer will review the pull request shortly.

@absidue absidue added the PR: waiting for review For PRs that are complete, tested, and ready for review label Mar 2, 2025
@kommunarr
Copy link
Collaborator

I don't experience this bug in my regular usage but will start testing this build.

@ArthurKun21

This comment has been minimized.

@absidue
Copy link
Member Author

absidue commented Mar 5, 2025

@ArthurKun21 That build is based on the older commits that were using a hardcoded timeout which is no longer present in the latest commits. If you want to help test PRs, please make sure you are actually using the latest changes next time before commenting that something doesn't work for you.

Copy link
Collaborator

@PikachuEXE PikachuEXE left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested > 1 week

Copy link
Member

@efb4f5ff-1298-471a-8973-3d47447115dc efb4f5ff-1298-471a-8973-3d47447115dc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got a 403 on the first video i tried to watch. Didnt happen on my nightly build so i think its related to the PR but weirdly enough all videos after that did play fine though

VirtualBoxVM_sXiUhLgMql

@efb4f5ff-1298-471a-8973-3d47447115dc

2nd 403 in a short period of testing and i cant replicate this behavior at all on the nightly build which im almost using daily

VirtualBoxVM_CynvPYgPHQ

@PikachuEXE
Copy link
Collaborator

I got several 403 but not frequently and I did not use normal build for a while so no idea if YT doing stuff or this PR causing it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: waiting for review For PRs that are complete, tested, and ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants