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

[YouTube] Fix some decryption exceptions by retrying #406

Merged
merged 1 commit into from
Oct 15, 2020

Conversation

Stypox
Copy link
Member

@Stypox Stypox commented Oct 4, 2020

By looking at the HAR from TeamNewPipe/NewPipe#3753 (comment) it seems like YouTube sometimes does not provide the player config object even though it should. In that case the extractor would crash, since it didn't have the needed information to decrypt the signatures. Therefore this PR detects when there is no player config object, and in that case runs the same request again, with at most 3 attempts. This should drastically reduce the number of exceptions caused by YouTube not providing the needed information (e.g. if the probability was 1% before, now it should be 0.0001%. Small, isn't it? ;-) ).

Closes TeamNewPipe/NewPipe#3753

@Stypox Stypox requested a review from wb9688 October 4, 2020 13:40
@TobiGr TobiGr added bug Issue is related to a bug youtube service, https://www.youtube.com/ labels Oct 4, 2020
Copy link
Contributor

@TobiGr TobiGr left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@opusforlife2
Copy link
Collaborator

You haz a test apk?

@Stypox
Copy link
Member Author

Stypox commented Oct 5, 2020

@opusforlife2 here it is: app-debug.zip

@xibr
Copy link

xibr commented Oct 5, 2020

I have tested this apk and no crashes yet.

I will confirm it tomorrow after further use.

Thanks

@xibr
Copy link

xibr commented Oct 6, 2020

I tested this apk file and it looks like the issue has been fixed, the app has not been crashing with me and is working fine.

I suggest adding the apk file and linking it to issue #3753 so that people who have the same problem can test it.

Thanks

@Stypox
Copy link
Member Author

Stypox commented Oct 6, 2020

@xibr basically everyone has this problem from time to time ;-)

@opusforlife2
Copy link
Collaborator

Branch name is missing in the package ID. Can the extractor branches be read by the build.gradle of the other repo?

@xibr
Copy link

xibr commented Oct 6, 2020

@Stypox You're right, for me this apk fixed the problem. Because I can reproduce the problem on Release version 0.20.0

@TobiGr TobiGr merged commit 527945e into TeamNewPipe:dev Oct 15, 2020
@opusforlife2
Copy link
Collaborator

Yay!

@Stypox Stypox deleted the fix-decrypt branch October 15, 2020 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is related to a bug youtube service, https://www.youtube.com/
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ParsingException: Could not load decryption code for the Youtube service
4 participants