-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Fix ReCaptcha Activity for another type of recaptcha page #3414
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
Conversation
Newest apk: NewPipe_recaptcha-debug_1.zip |
e.printStackTrace(); | ||
Log.d(TAG, "handleCookiesFromUrl: invalid google abuse starting at " | ||
+ abuseStart + " and ending at " + abuseEnd + " for url " + url); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that information useful to find further cookies? We might want to show a snackbar to allow reporting the error and more importantly, the url
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This piece of code has never been useful in my testing, since it just obtains a cookie that would anyway appear as a cookie in one of the subsequent requests. Though to prevent issues under different environment where the webview behaves strangely (who knows?), it doesn't hurt to obtain the cookie twice in a different way and call it a day.
I left a Log there just so that when I send people an apk to debug, I don't have to make a custom one that throws a random Exception with the log message inside (as I did with the other cookie testing apk), but I can just tell them to install a logcat viewer and I have the information needed for the whole execution of the activity.
Anyway, if the catch block is ever reached it means the url isn't useful to obtain a cookie, so there is no need to report anything to a normal user imho.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
However logcat apps need root access since Jelly Bean.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, do they? I didn't know ;-)
But what could I implement then, that would log everything and display it to the user after he presses "Ok" on a snackbar? Should I do some kind of bug report, but with logs instead of stack trace?
Try to get cookies from pages even when they start loading, because non-html pages like ones with `pbj=1` never stop loading. Try to extract the cookie directly from the redirection url, by looking at the field "google_abuse=". Add `GOOGLE_ABUSE_EXEMPTION=` to the youtube recaptcha cookies.
So that the user does not have to solve a recaptcha every time he opens the app
@jniniinoinoino from #3418 (comment)
There has to be yet another different behaviour with recaptchas that only comes up sometimes. The recaptcha-solved page is never loaded and due to this no cookie is ever obtained. I'm investingating |
Yes I am using this latest debug apk, but i tried it so many times but captcha page not loading at all completely blank white screen with top tik (√) bar. I don't think it's a network issue, because i am running everything else very smoothly even youtube also in browser. |
I think this should be merged now, and just leave the other reCAPTCHA page to another PR. |
I tried to understand in many ways what the problem is with the other recaptcha behaviour, but I still haven't understood anything because there seems to be no difference.
So yes, for now this can be merged, I'll leave further investigation for a future PR |
What is it?
Description of the changes in your PR
pbj=1
never stop loading.google_abuse=
.GOOGLE_ABUSE_EXEMPTION=
to the youtube recaptcha cookies.Fixes the following issue(s)
Fixes #3134 fixes #3272 fixes #3418 fixes #3310
Testing apk
@mehedihasanziku @baraa272 @LargePrime @tusch001 could you test this, if recaptchas still pop up for you? Also, @Ristovski, even though I didn't change anything about webviews, could you test, too?
NewPipe_recaptcha-debug_1.zip
Agreement