Freetube: Search Isn't working for either API

Created on 13 Oct 2020  路  30Comments  路  Source: FreeTubeApp/FreeTube

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.

bug

Most helpful comment

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

All 30 comments

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

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

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

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.

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

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,

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.

@stemy2 you meant with the new changes or currently?

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

@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.

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.

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.

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.

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

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

@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.

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

Please refer to the solution of #733

Please refer to the solution of #733

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

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

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 :)

New error:

TypeError: Cannot read property 'reverse' of undefined

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 :/

GTK+ Straw Viewer is broken as well

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

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

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

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.

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.

.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!

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

baraa272 picture baraa272  路  4Comments

stemy2 picture stemy2  路  4Comments

Bira-oliverio picture Bira-oliverio  路  5Comments

vuurvogelblog picture vuurvogelblog  路  5Comments

jibe-b picture jibe-b  路  3Comments