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

Crutch fix for https://github.com/ViewTube/viewtube/issues/2648 #2786

Open
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

frozenduck
Copy link
Contributor

This is unfortunately not a full-fledged fix because instead of the error
"Error: query is missing" now there is "An error has occurred when inserting "key: /api/search", "value: null""

But at least the search started working normally and the very annoying problem of having to go back and forth to get the search results disappeared.

Also additional check for lastIndexOf, sometimes there was an error in this place too.

I tried returning other values instead of null, but they all resulted in more serious problems, either the search didn't work, a hang occurred, or other errors.

To be honest, it is not quite clear why the current error occurs, the search query is passed in normal form, but when it appears in the controller, it turns out to be empty.

@moisout
Copy link
Member

moisout commented Apr 23, 2024

Thaks for this PR! I'll test it ASAP

@frozenduck
Copy link
Contributor Author

I found a new issue with the search from this fix, it's not worth merging for now, edits will be required. I'll let you know when I've fixed it.

@frozenduck
Copy link
Contributor Author

frozenduck commented Apr 28, 2024

I noticed that the problem is not related to my edits, it is the following.

I make a query and get a result, then let's say a day later I refresh the page with the same query, but for some reason I still see results from the previous date.

I have a channel where every day a new video is published, I noticed this problem because new videos stopped appearing, it seems that the problem started about a few days ago.

Maybe it has something to do with caching. If you change at least 1 character in the request, new data comes up.

The problem is reproduced both locally and on viewtube.io

@moisout
Copy link
Member

moisout commented Apr 28, 2024

Probably caching, I'll look at it

@moisout
Copy link
Member

moisout commented May 3, 2024

I will look at the search API to fix the issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants