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

Search Isn't working for either API #662

Closed
pawlosck opened this issue Oct 13, 2020 · 30 comments
Closed

Search Isn't working for either API #662

pawlosck opened this issue Oct 13, 2020 · 30 comments
Labels
bug Something isn't working

Comments

@pawlosck
Copy link

SyntaxError: Unexpected token < in JSON at position 0

I see this message when I want to find something. I don't know how to reproduce it, because it's not 100% reproducible.
One time, I saw it immediately after start program and next time I saw it after few minutes.

@pawlosck pawlosck added the bug Something isn't working label Oct 13, 2020
@Svallinn
Copy link
Member

Svallinn commented Oct 13, 2020

Refer to TimeForANinja/node-ytsr#71 (one of the dependencies for this project) for discussion about this problem

@PrestonN
Copy link
Member

Yep. This is an upstream issue and not something on my end. I will update the dependencies when the fix is made.

@PrestonN PrestonN changed the title SyntaxError: Unexpected token < in JSON at position 0 Search Isn't working for either API Oct 17, 2020
@PrestonN PrestonN reopened this Oct 17, 2020
@PrestonN PrestonN pinned this issue Oct 17, 2020
@SimonMGS
Copy link

So, to be clear, Freetube is essentially broken until this is fixed upstream at some point?

@PrestonN
Copy link
Member

Everything except for search still works, so you can still follow your subscriptions and watch videos.

Also I'm testing a temporary fix for search at this very moment. Assuming the build tools don't get angry with this method, I'll likely make a patch release later today.

@stemy2
Copy link

stemy2 commented Oct 22, 2020

It stills not working, but for a different reason
TypeError: Cannot read property 'runs' of undefined

@GilgusMaximus
Copy link
Contributor

Yes, but most of the time it works at the moment (from what I have read on the Matrix channel), and we unfortunately cannot change that the upstream module is not working 100%. So we'll just have to sit it out for now,

@stemy2
Copy link

stemy2 commented Oct 22, 2020

I tested multiple times, and not once i didn't have the error. So as far as I'm concerned, it doesn't work most of the time.

@EchedelleLR
Copy link

@stemy2 you meant with the new changes or currently?

If currently, it is the same for me as you.

@stemy2
Copy link

stemy2 commented Oct 22, 2020

@stemy2 you meant with the new changes or currently?

If currently, it is the same for me as you.

With the version 0.9.1.

@EchedelleLR
Copy link

In that version to which I upgraded rn I get 3/5 fast searchs working

However, I don't see 'Fetch more results' button anymore which allowed me, before, try to do the same search again and show some results if worked. So, the non-working results get cached and that doesn't allow me to search the same terms twice from scratch.

@PrestonN
Copy link
Member

So just for the record, yes, search is definitely still not completely fixed. If you've searched a little bit within the app that probably wasn't difficult to tell. The Fetch More Results button doesn't appear because there's nothing more to get. Our module isn't returning the proper information in order to get the next page, so the button will be hidden.

I figured it was better to have it sort of fixed instead of waiting for the full fix as it seems like it might be a while. When we have the full fix I'll push out another release.

@EchedelleLR
Copy link

The Fetch More Results button doesn't appear because there's nothing more to get. Our module isn't returning the proper information in order to get the next page, so the button will be hidden.

In the version before, when failing, the button appeared at least and I used it as a try because results didn't load.

@yepyepyep4711
Copy link

as a work-around, could you introduce an "open YouTube URL" function? This way we could search on the website, do a "copy link address" from there and open it with FreeTube

@PrestonN
Copy link
Member

@yepyepyep4711 You can already paste YouTube links into the search bar to open them up in FreeTube

@yepyepyep4711
Copy link

@yepyepyep4711 You can already paste YouTube links into the search bar to open them up in FreeTube

D'oh! Stupid me. Hadn't noticed. Neer mind me. Thanks though.

@yepyepyep4711
Copy link

well, actually, today even go to URL is not working anymore. I guess YouTube changed something again :/

@GilgusMaximus
Copy link
Contributor

Please refer to the solution of #733

@yepyepyep4711
Copy link

Please refer to the solution of #733

if you meant "download the last beta", yes, that fixed it. Thanks

@stemy2
Copy link

stemy2 commented Oct 31, 2020

Please refer to the solution of #733

I still have the problem, but for another reason. Now, the error message is:

TypeError: Cannot read property 'runs' of undefined

@GilgusMaximus
Copy link
Contributor

GilgusMaximus commented Nov 1, 2020

Search isn't fully fixed yet. There will be another patch in a couple of days that will include the search fixes.

from Preston in the Matrix channel.
So stay patient for the moment :)

@stemy2
Copy link

stemy2 commented Nov 3, 2020

New error:

TypeError: Cannot read property 'reverse' of undefined

@ThisNekoGuy
Copy link

I get:
SyntaxError: Unexpected end of JSON input

When I try to run a search and falling back to the other API doesn't work either :/

@neurodiverseEsoteric
Copy link

GTK+ Straw Viewer is broken as well

@GilgusMaximus
Copy link
Contributor

Yes, Youtube seems to have changed things on their website again. So this leaves the search module not working

@pawlosck
Copy link
Author

I have one question. Why you can't implement solution from NewPipe? NewPipe max few days is not working, when YT change something.

@GilgusMaximus
Copy link
Contributor

Hi, so the problem is that Preston and I are currently the people developing this application, with additional contributions from the community in our and their free time.

We also have other things to do like work and university. Therefore we cannot create forks of all modules we use and maintain them ourselves. This adds much more code to the maintaining list, which we can not and do not want to handle.

Implementing the NewPipe scraper would make this even more cumbersome because we'd first have to port the whole scraper to JavaScript, which in itself would take weeks of hard work.

And to be fair, in the last few weeks a lot in YouTubes internal structures changed causing more problems for us. The months before the rewrite release it worked seamlessly for weeks. So this is just bad luck for us

@pawlosck
Copy link
Author

pawlosck commented Dec 6, 2020

I understand, that FreeTube is not your commercial project and you have other more important tasks. I am not sure, but I suppose, problem with YT probably are connected with searching specific part of website using xpath. If yes, it shouldn't be hard to change xpath and fix new bugs. Maybe it's good idea to think about changing this module if similar bugs will be more.

@GilgusMaximus
Copy link
Contributor

We are not searching anything on the search page at the moment. We are simply relying on a node module. You'd have to suggest something like this over there.

@TriggerDingus
Copy link

.0.9.3 fixed the search issues I've been having. Love the work you guys are doing and I really appreciate having Freetube up-and-running again!

@PrestonN
Copy link
Member

With the new v0.10.0 release, search should once again be fully functional. With that, we can finally close this issue.

@PrestonN PrestonN unpinned this issue Dec 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests