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

newpipe can't load any youtube link and show no result for any search #4201

Closed
mhdzli opened this issue Aug 28, 2020 · 50 comments · Fixed by TeamNewPipe/NewPipeExtractor#415
Closed
Labels
bug Issue is related to a bug youtube Service, https://www.youtube.com/

Comments

@mhdzli
Copy link

mhdzli commented Aug 28, 2020

Version

-0.19.8

Steps to reproduce the bug

  1. I search for anything in newpipe and there is no result with a sorry some error occurred message.
  2. If I open any youtube link in newpipe it can't load the page and info.

Screenshots/Screen recordings

Logs

Exception

  • User Action: searched
  • Request: swaywm
  • Content Country: US
  • Content Language: en-US
  • App Language: en_US
  • Service: YouTube
  • Version: 0.19.8
  • OS: Linux samsung/a6pltedx/a6plte:10/QP1A.190711.020/A605GDXU6CTC9:user/release-keys 10 - 29
Crash log

org.schabi.newpipe.extractor.exceptions.ParsingException: Could not get ytInitialData
	at org.schabi.newpipe.extractor.services.youtube.YoutubeParsingHelper.getInitialData(YoutubeParsingHelper.java:203)
	at org.schabi.newpipe.extractor.services.youtube.YoutubeParsingHelper.extractClientVersionAndKey(YoutubeParsingHelper.java:222)
	at org.schabi.newpipe.extractor.services.youtube.YoutubeParsingHelper.getKey(YoutubeParsingHelper.java:298)
	at org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeSearchExtractor.getNewNextPageFrom(YoutubeSearchExtractor.java:233)
	at org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeSearchExtractor.getInitialPage(YoutubeSearchExtractor.java:127)
	at org.schabi.newpipe.extractor.utils.ExtractorHelper.getItemsPageOrLogError(ExtractorHelper.java:19)
	at org.schabi.newpipe.extractor.search.SearchInfo.getInfo(SearchInfo.java:55)
	at org.schabi.newpipe.extractor.search.SearchInfo.getInfo(SearchInfo.java:30)
	at org.schabi.newpipe.util.ExtractorHelper.lambda$searchFor$0(ExtractorHelper.java:81)
	at org.schabi.newpipe.util.-$$Lambda$ExtractorHelper$BBduYDeZ_vXMQYaemaggmTPtqvA.call(Unknown Source:8)
	at io.reactivex.internal.operators.single.SingleFromCallable.subscribeActual(SingleFromCallable.java:44)
	at io.reactivex.Single.subscribe(Single.java:3666)
	at io.reactivex.internal.operators.single.SingleSubscribeOn$SubscribeOnObserver.run(SingleSubscribeOn.java:89)
	at io.reactivex.Scheduler$DisposeTask.run(Scheduler.java:578)
	at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:66)
	at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:57)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
	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:919)
Caused by: org.schabi.newpipe.extractor.utils.Parser$RegexException: failed to find pattern "window\["ytInitialData"\]\s*=\s*(\{.*?\});
	at org.schabi.newpipe.extractor.utils.Parser.matchGroup(Parser.java:72)
	at org.schabi.newpipe.extractor.utils.Parser.matchGroup(Parser.java:61)
	at org.schabi.newpipe.extractor.utils.Parser.matchGroup1(Parser.java:52)
	at org.schabi.newpipe.extractor.services.youtube.YoutubeParsingHelper.getInitialData(YoutubeParsingHelper.java:200)
	... 20 more


@mhdzli mhdzli added the bug Issue is related to a bug label Aug 28, 2020
@opusforlife2
Copy link
Collaborator

Interesting! I've never seen that error message before.

@opusforlife2 opusforlife2 added the youtube Service, https://www.youtube.com/ label Aug 29, 2020
@sandeeptardigrade
Copy link

this is so frustrating. I am also facing the same error from about a month , before that it was working fine. my phone oneplus 5

@mhdzli
Copy link
Author

mhdzli commented Aug 31, 2020

@sandeeptardigrade
I just delete all newpipe data and it works for a while till this happen again ¯_(ツ)_/¯

@wb9688
Copy link
Contributor

wb9688 commented Aug 31, 2020

If you could still reproduce it, could you install a debug version, connect your phone to your PC through USB, open Chrome, go to chrome://inspect, open that debug version of NewPipe on your phone, select that NewPipe instance in Chrome, go to the Network tab, try to reproduce the issue, and once you've successfully reproduced the issue, right-click in Chrome, select "Save as HAR with Content" and send me that HAR? Then I might be able to fix this issue.

@mhdzli
Copy link
Author

mhdzli commented Aug 31, 2020

@wb9688
Absolutely sure! I will be happy if I can be of any help.

@wb9688
Copy link
Contributor

wb9688 commented Aug 31, 2020

@mhdzli: You could download a debug apk at https://github.com/TeamNewPipe/NewPipe/files/5083926/app-debug.zip (it will install side-by-side)

You'll probably need to export database (in Settings -> Content) from your normal NewPipe and import it into that debugging NewPipe to be able to reproduce it.

Btw have you at any point got a reCAPTCHA in NewPipe?

@mhdzli
Copy link
Author

mhdzli commented Aug 31, 2020

@wb9688
Yes I got reCAPCHA every now and then. And thank you and all of newpipe team for this great app.

@vomindoraan

This comment has been minimized.

@opusforlife2

This comment has been minimized.

@vomindoraan

This comment has been minimized.

@Tybalta
Copy link

Tybalta commented Sep 15, 2020

I have the same issue...

@opusforlife2
Copy link
Collaborator

@Tybalta Could you try this #4201 (comment)? Thanks.

@vomindoraan

This comment has been minimized.

@opusforlife2

This comment has been minimized.

@vomindoraan

This comment has been minimized.

@vomindoraan

This comment has been minimized.

@opusforlife2

This comment has been minimized.

@Tybalta
Copy link

Tybalta commented Sep 18, 2020

@Tybalta Could you try this #4201 (comment)? Thanks.
@opusforlife2
I dont know how to do that in chrome? Which chrome? Phone or Pc chrome?

@opusforlife2
Copy link
Collaborator

That's okay. We have got HARs above. If none of them helps solve the problem, then we could ask for them again.

Chrome on PC, by the way.

@mhdzli
Copy link
Author

mhdzli commented Oct 5, 2020

@wb9688
I installed the debug version and tried reproducing it several times, but everything works fine and the problem just went away. I did everything came into my mind. If you can think of anything that I should consider give me the instruction and I'll try again.

@Stypox Stypox closed this as completed Oct 5, 2020
@opusforlife2 opusforlife2 reopened this Oct 5, 2020
@vomindoraan

This comment has been minimized.

@Stypox

This comment has been minimized.

@Stypox

This comment has been minimized.

@Stypox Stypox closed this as completed Oct 5, 2020
@Stypox
Copy link
Member

Stypox commented Oct 16, 2020

Here is the two network files causing the following crash @wb9688 network.zip

Exception

  • User Action: searched
  • Request: fsd
  • Content Country: US
  • Content Language: en-US
  • App Language: en_US
  • Service: YouTube
  • Version: 0.20.0
  • OS: Linux Android 10 - 29
Crash log

org.schabi.newpipe.extractor.exceptions.ParsingException: Could not get ytInitialData
	at org.schabi.newpipe.extractor.services.youtube.YoutubeParsingHelper.getInitialData(YoutubeParsingHelper.java:203)
	at org.schabi.newpipe.extractor.services.youtube.YoutubeParsingHelper.extractClientVersionAndKey(YoutubeParsingHelper.java:222)
	at org.schabi.newpipe.extractor.services.youtube.YoutubeParsingHelper.getKey(YoutubeParsingHelper.java:298)
	at org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeSearchExtractor.getNewNextPageFrom(YoutubeSearchExtractor.java:233)
	at org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeSearchExtractor.getInitialPage(YoutubeSearchExtractor.java:127)
	at org.schabi.newpipe.extractor.utils.ExtractorHelper.getItemsPageOrLogError(ExtractorHelper.java:19)
	at org.schabi.newpipe.extractor.search.SearchInfo.getInfo(SearchInfo.java:55)
	at org.schabi.newpipe.extractor.search.SearchInfo.getInfo(SearchInfo.java:30)
	at org.schabi.newpipe.util.ExtractorHelper.lambda$searchFor$0(ExtractorHelper.java:81)
	at org.schabi.newpipe.util.-$$Lambda$ExtractorHelper$qyxpuXgomWa-cbONQns-pd7zxm0.call(Unknown Source:8)
	at io.reactivex.internal.operators.single.SingleFromCallable.subscribeActual(SingleFromCallable.java:44)
	at io.reactivex.Single.subscribe(Single.java:3666)
	at io.reactivex.internal.operators.single.SingleSubscribeOn$SubscribeOnObserver.run(SingleSubscribeOn.java:89)
	at io.reactivex.Scheduler$DisposeTask.run(Scheduler.java:578)
	at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:66)
	at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:57)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
	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:919)
Caused by: org.schabi.newpipe.extractor.utils.Parser$RegexException: failed to find pattern "window\["ytInitialData"\]\s*=\s*(\{.*?\});
	at org.schabi.newpipe.extractor.utils.Parser.matchGroup(Parser.java:72)
	at org.schabi.newpipe.extractor.utils.Parser.matchGroup(Parser.java:61)
	at org.schabi.newpipe.extractor.utils.Parser.matchGroup1(Parser.java:52)
	at org.schabi.newpipe.extractor.services.youtube.YoutubeParsingHelper.getInitialData(YoutubeParsingHelper.java:200)
	... 20 more


@TobiGr

This comment has been minimized.

@wb9688
Copy link
Contributor

wb9688 commented Oct 16, 2020

Could you guys please test the following APK? app-debug.apk.zip

@mehedihasanziku
Copy link

Please test the APK and tell us if the problem still persists: app-debug.zip

Screenshot_2020-10-17-00-46-19
Screenshot_2020-10-17-00-46-06

Just tested seems working fine.

Step:
Installed > Import Database from release version > Searched Multiple times, working fine

@opusforlife2
Copy link
Collaborator

@mehedihasanziku We don't need the screenshots. Your word is enough.

@AnonymousSeal
Copy link

so i had the same issue the past couple of days and I was wondering what I should do now. Will a fix be released or should I use the apk that you provided?

@opusforlife2
Copy link
Collaborator

@EliasKomar It's already released.

@AnonymousSeal
Copy link

I'm not sure where to put this question, but i can't install the apk from the website and f-droid warns me that the version is signed with a different key and that I would have to delete the old app (I would lose all the data) in order to install it. Why did the key change and how can I transition without losing my data?

@opusforlife2
Copy link
Collaborator

@EliasKomar Export database, uninstall the app, install the new version, import database.

@wb9688
Copy link
Contributor

wb9688 commented Oct 18, 2020

@EliasKomar: If you've downloaded it from F-Droid, it's possible you downloaded the version that was signed by F-Droid. On GitHub, and on our F-Droid repo we of course sign it with our own keys. Normal F-Droid nowadays has an .apk signed by us and one signed by them.

@AnonymousSeal
Copy link

Thanks, it works now and I am going to use the NewPipe signed version from now on since I trust the project :)

@opusforlife2
Copy link
Collaborator

@EliasKomar Since Newpipe is reproducible, F-Droid's server also signs using Newpipe's key, which means your trust is verified as well. ;)

@vomindoraan
Copy link

I was able to sidestep this issue by changing my DNS resolver to 1.1.1.1 using the Cloudflare 1.1.1.1 app from the Play Store. Only after doing this has NewPipe v0.20.2 started working over mobile data on my Android 7.1.1 phone.

The issue seems to have occurred because www.youtube.com was inaccessible, whereas m.youtube.com was working fine.

@mehedihasanziku
Copy link

I was able to sidestep this issue by changing my DNS resolver to 1.1.1.1 using the Cloudflare 1.1.1.1 app from the Play Store. Only after doing this has NewPipe v0.20.2 started working over mobile data on my Android 7.1.1 phone.

The issue seems to have occurred because www.youtube.com was inaccessible, whereas m.youtube.com was working fine.

It was fixed on last version and it was captcha cookie issue, so your issue seems to me different.

@G-i-o
Copy link

G-i-o commented May 15, 2021

HI.

Just wanted to report that I also was unable to do any search nor downloads or even access any video. Then I read few comments above and sb deleted the app data with success. It happened to me too; once I deleted the cache + data NewPipe appeared to work again.

I have saved the report log of when the issue presented and if you want me to post it or send it somewhere, JLMK. 🙏🏼

P.S. Big thank You to the devs, by the way, for all their great efforts.

@opusforlife2
Copy link
Collaborator

@G-i-o Please send it right here as an attachment to your comment. 👍

@G-i-o
Copy link

G-i-o commented May 15, 2021

👍 @opusforlife2

Please find it below:

2021.05.15 NewPipe Report.txt

Hope it helps.

@opusforlife2
Copy link
Collaborator

Oh. @G-i-o I thought you meant you took a logcat or network activity log of when the issue occurred. What you've sent is the Newpipe crash report, which is the same as the original poster's crash report. But thanks, anyway!

@G-i-o
Copy link

G-i-o commented May 15, 2021 via email

@WickyNilliams
Copy link

Exporting my database, clearing data, then reimporting without settings fixed this issue for me. Thanks!

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 a pull request may close this issue.