TimeForANinja / node-ytsr

Do anonymous YouTube search requests.
MIT License
284 stars 66 forks source link

Error while using the package #219

Open document10 opened 6 months ago

document10 commented 6 months ago

I received an error while using version 3.8.4 the package,and was told to put the contents of the dumps here.Note that subsequent uses didn't give this error,but I think it might break in other places ,so I'm putting it here.
I used the function like this:

const res = await ytsr(query)

where query was an external variable.
This is the full error (with the full path to the project hidden):

TypeError: Cannot read properties of undefined (reading 'browseEndpoint')
    at _parseOwner (PROJECT_FOLDER/node_modules/ytsr/lib/parseItem.js:437:45)
    at parsePlaylist (PROJECT_FOLDER/node_modules/ytsr/lib/parseItem.js:210:50)
    at parseItem (PROJECT_FOLDER/node_modules/ytsr/lib/parseItem.js:18:14)
    at catchAndLogFunc (PROJECT_FOLDER/node_modules/ytsr/lib/parseItem.js:90:12)
    at module.exports (PROJECT_FOLDER/node_modules/ytsr/lib/parseItem.js:119:46)
    at PROJECT_FOLDER/node_modules/ytsr/lib/main.js:95:41
    at Array.map (<anonymous>)
    at parsePage2 (PROJECT_FOLDER/node_modules/ytsr/lib/main.js:95:32)
    at process.processTicksAndRejections (node:internal /process/task_queues:95:5)
    at async parsePage2 (PROJECT_FOLDER/node_modules/ytsr/lib/main.js:114:22)

Links to the dumps:

(don't ask why i was searching for this stuff) System info:

I can provide more info if it's necessary.