ftde0 / yt2009

2009 youtube frontend.
Apache License 2.0
193 stars 119 forks source link

sometimes a simple search term will crash the server #49

Closed JennyBean333 closed 10 months ago

JennyBean333 commented 10 months ago

its not even anything specific from what i can tell, the most recent term i found to crash it consistently is "maitro" no matter what search term it is that i use that crashes it, its at least always the same error

for example heres the console from when i turned it on and reloaded the search page when using "maitro" as the search term

PS C:\yt2009\back> node backend.js
(node:27544) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)

    ==========

    yt2009 - dev

    ==========
    launch time: 18:39

received 25 videos from master
added 50 comments from master
() maitro clean fetch 1705966759090
C:\yt2009\back\yt2009utils.js:933
        let timeType = baseString.split(" ")[1].toLowerCase();
                                               ^

TypeError: Cannot read properties of undefined (reading 'toLowerCase')
    at Object.relativeTimeCreate (C:\yt2009\back\yt2009utils.js:933:48)
    at C:\yt2009\back\yt2009search.js:494:46
    at Array.forEach (<anonymous>)
    at Object.apply_search_html (C:\yt2009\back\yt2009search.js:406:17)
    at C:\yt2009\back\backend.js:637:32
    at C:\yt2009\back\yt2009search.js:205:17
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

EDIT: for some reason now maitro isnt repeatedly crashing it, so im even more confused what the whole deal with that "toLowerCase" issue is, hopefully this is enough info

ftde0 commented 10 months ago

looks like your yt2009 is out of date, this issue was fixed with https://github.com/ftde0/yt2009/commit/8726aa765b84cfbd260f7868d3c84a88cac3150c. try updating and see if the issue persists.

ftde0 commented 10 months ago

no response in a bit. assuming the issue is resolved, closing.