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

Fix REGEX_HELPER_OBJ_NAME #43

Merged
merged 1 commit into from
Dec 16, 2024

Conversation

lifo9
Copy link
Contributor

@lifo9 lifo9 commented Dec 16, 2024

Fixes #41.
Fixes #42.

Tested, working.

@rockerBOO
Copy link

Tested and working for me as well

@techmetx11 techmetx11 merged commit 23932bf into iv-org:master Dec 16, 2024
1 check passed
@lifo9 lifo9 deleted the lifo/fix-regex-helper-obj-name branch December 16, 2024 18:31
@uncaney
Copy link

uncaney commented Dec 16, 2024

hi, can you tell me how you came out to find the fix that issue, i'm trying to radically change how it's managed and make it more resilient to youtube change when regex can't follow up. (moreover where in the /base.js look for errors and what to investigate first when stuff break)

@lifo9
Copy link
Contributor Author

lifo9 commented Dec 16, 2024

hi, can you tell me how you came out to find the fix that issue, i'm trying to radically change how it's managed and make it more resilient to youtube change when regex can't follow up. (moreover where in the /base.js look for errors and what to investigate first when stuff break)

Hey,
it would be awesome to make the parser more resilient!
I don't have time to make a proper refactor (and I wanted to get my instance working ASAP), so my naive / quick and dirty approach was to:

  1. clone the repo and set RUST_LOG to debug in docker-compose.yaml
  2. run it with docker compose up -d
  3. check the logs, error was on this line
  4. added debug!("sig function body: {}", sig_function_body);
  5. asked claude 3.5 sonnet to fix the regex - provided sig_function_body, current regex and bit more context from the player.rs 😆
  6. tested the fix on my instance, it worked -> submitted PR

Maybe you could get some inspiration from yt-dlp code?

But I'm afraid it will always be a cat-and-mouse game...

@unixfox
Copy link
Member

unixfox commented Dec 16, 2024

hi, can you tell me how you came out to find the fix that issue, i'm trying to radically change how it's managed and make it more resilient to youtube change when regex can't follow up. (moreover where in the /base.js look for errors and what to investigate first when stuff break)

Invidious will soon drop the support for inv sig helper in favor of invidious companion (iv-org/invidious#4985) which includes a built-in decryption system so don't spend all your efforts on this.

@lifo9
Copy link
Contributor Author

lifo9 commented Dec 16, 2024

hi, can you tell me how you came out to find the fix that issue, i'm trying to radically change how it's managed and make it more resilient to youtube change when regex can't follow up. (moreover where in the /base.js look for errors and what to investigate first when stuff break)

Invidious will soon drop the support for inv sig helper in favor of invidious companion (iv-org/invidious#4985) which includes a built-in decryption system so don't spend all your efforts on this.

Awesome news, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Container stuck in restart loop nsig function ending did not work
5 participants