SkyTubeTeam / SkyTube

Copylefted libre / open source YouTube player for Android
GNU General Public License v3.0
2.34k stars 322 forks source link

reCaptcha Challenge requested error #674

Open okan35 opened 4 years ago

okan35 commented 4 years ago

How can this be fixed ? Added different errors below also

2020-03-01 18:31:02.403 22159-22416/free.rm.skytube.extra E/NewPipeService: An error has occurred while getting streams metadata. URL=https://www.youtube.com/watch?v=FbnI09Ivbyw org.schabi.newpipe.extractor.exceptions.ReCaptchaException: reCaptcha Challenge requested at free.rm.skytube.businessobjects.YouTube.VideoStream.HttpDownloader.execute(HttpDownloader.java:98) at org.schabi.newpipe.extractor.downloader.Downloader.get(Downloader.java:70) at org.schabi.newpipe.extractor.downloader.Downloader.get(Downloader.java:42) at org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeStreamExtractor.onFetchPage(YoutubeStreamExtractor.java:616) at org.schabi.newpipe.extractor.Extractor.fetchPage(Extractor.java:56) at org.schabi.newpipe.extractor.stream.StreamInfo.getInfo(StreamInfo.java:65) at org.schabi.newpipe.extractor.stream.StreamInfo.getInfo(StreamInfo.java:61) at free.rm.skytube.businessobjects.YouTube.newpipe.NewPipeService.getStreamMetaDataListByUrl(NewPipeService.java:86) at free.rm.skytube.businessobjects.YouTube.newpipe.NewPipeService.getStreamMetaDataList(NewPipeService.java:116) at free.rm.skytube.businessobjects.YouTube.Tasks.GetVideoStreamTask.doInBackground(GetVideoStreamTask.java:44) at free.rm.skytube.businessobjects.YouTube.Tasks.GetVideoStreamTask.doInBackground(GetVideoStreamTask.java:30) at android.os.AsyncTask$2.call(AsyncTask.java:333) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:764)

2020-03-01 18:34:51.823 22560-22560/free.rm.skytube.extra E/GetChannelInfo: Error: Could not get client version org.schabi.newpipe.extractor.exceptions.ParsingException: Could not get client version at org.schabi.newpipe.extractor.services.youtube.linkHandler.YoutubeParsingHelper.getClientVersion(YoutubeParsingHelper.java:255) at org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeChannelExtractor.onFetchPage(YoutubeChannelExtractor.java:70) at org.schabi.newpipe.extractor.Extractor.fetchPage(Extractor.java:56) at free.rm.skytube.businessobjects.YouTube.newpipe.NewPipeService.getChannelExtractor(NewPipeService.java:237) at free.rm.skytube.businessobjects.YouTube.newpipe.NewPipeService.getChannelPager(NewPipeService.java:175) at free.rm.skytube.businessobjects.YouTube.newpipe.NewPipeService.getChannelDetails(NewPipeService.java:203) at free.rm.skytube.businessobjects.db.Tasks.GetChannelInfo.getChannelInfoSync(GetChannelInfo.java:81) at free.rm.skytube.businessobjects.db.Tasks.GetChannelInfo.doInBackground(GetChannelInfo.java:68) at free.rm.skytube.businessobjects.db.Tasks.GetChannelInfo.doInBackground(GetChannelInfo.java:40) at android.os.AsyncTask$2.call(AsyncTask.java:333) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:764)


2020-03-01 18:34:51.618 22560-22642/free.rm.skytube.extra E/NewPipeService: An error has occurred while getting streams metadata. URL=https://www.youtube.com/watch?v=0jz0GAFNNIo org.schabi.newpipe.extractor.exceptions.ReCaptchaException: reCaptcha Challenge requested at free.rm.skytube.businessobjects.YouTube.VideoStream.HttpDownloader.execute(HttpDownloader.java:98) at org.schabi.newpipe.extractor.downloader.Downloader.get(Downloader.java:70) at org.schabi.newpipe.extractor.downloader.Downloader.get(Downloader.java:42) at org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeStreamExtractor.onFetchPage(YoutubeStreamExtractor.java:616) at org.schabi.newpipe.extractor.Extractor.fetchPage(Extractor.java:56) at org.schabi.newpipe.extractor.stream.StreamInfo.getInfo(StreamInfo.java:65) at org.schabi.newpipe.extractor.stream.StreamInfo.getInfo(StreamInfo.java:61) at free.rm.skytube.businessobjects.YouTube.newpipe.NewPipeService.getStreamMetaDataListByUrl(NewPipeService.java:86) at free.rm.skytube.businessobjects.YouTube.newpipe.NewPipeService.getStreamMetaDataList(NewPipeService.java:116) at free.rm.skytube.businessobjects.YouTube.Tasks.GetVideoStreamTask.doInBackground(GetVideoStreamTask.java:44) at free.rm.skytube.businessobjects.YouTube.Tasks.GetVideoStreamTask.doInBackground(GetVideoStreamTask.java:30) at android.os.AsyncTask$2.call(AsyncTask.java:333) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:764)

okan35 commented 4 years ago

just saw that the recaptcha is shown by google and the solution would be to show this page to user and let user pass it then video is watchable as I also got this after I imported my channels into skytube.

gzsombor commented 4 years ago

Good question, unfortunately - or luckily - I haven't seen this error yet - showing the captcha to the user won't be an easily implemented thing. What I could imagine is to retry the request - and hope the best, or to launch the official Youtube player to play this video. Neither is particularly good solution, but maybe works - and both easy to implement.

okan35 commented 4 years ago

Retrying request would not help because after I got this, I also got it on my computer, the only way to watch video was by solvig recaptcha, I got this also on new pipe and there, they show it but error catching activity immediately goes over it and you cant do anything.

So the only solution is to let user solve recaptcha which would not be easy to implement unless loading the YouTube page into a webview solves everything.

gzsombor commented 4 years ago

If the captcha could be triggered, and properly solved with opening the browser on the device, without interacting with the browser deeply - than that we can do it. Luckily, I haven't encountered such an IP based block. What do you think, what was the trigger? I have ~100 channels, and during subscription checks, the app is sending 100 requests in 4 threads, concurrently. That could be interpreted as a very simple crawler 'attack', but it wasn't enough to alert Google yet :smile:

okan35 commented 4 years ago

I have more than 1000 channels subscribed I think. If you want I can send you my channels, you will also immediately get api problems and loading takes more time, this why I was also experimenting adding index on subscriptions table so it would maybe make things faster but didn't really do anything or I need to put in more places as adding indexes on tables make things quite faster, of course on id columns.