You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
getInfo calls are failing. Is passing an agent with cookies required now? Requiring this by default seems to be a pretty major breaking change, given that most people probably use this library unauthenticated.
TypeError: Cannot destructure property 'jar' of 'options.agent' as it is undefined.
at fetchIosJsonPlayer (/workspace/node_modules/@distube/ytdl-core/lib/info.js:320:11)
at exports.getInfo (/workspace/node_modules/@distube/ytdl-core/lib/info.js:245:35)
at processTicksAndRejections (node:internal/process/task_queues:95:5)}
Getting the same error but in a strange way. If I call getBasicInfo() or getInfo() independently, they will succeed. But if I call either of them one after the other, I still receive the same error as above.
My use-case was, calling getBasicInfo() to check if a video was playable, followed by a ytdl() call to begin downloading, which internally calls getInfo(), which is failing.
I'm assuming this is because getBasicInfo() is supposed to fill the default options (including agent), but the call is being skipped because of the info cache.
node ➜ /workspace (update-ytdl) $ npx ts-node src/ytdl-test.ts
/workspace/node_modules/@distube/ytdl-core/lib/info.js:322
const { jar, dispatcher } = options.agent;
^
TypeError: Cannot destructure property 'jar' of 'options.agent' as it is undefined.
at fetchIosJsonPlayer (/workspace/node_modules/@distube/ytdl-core/lib/info.js:322:11)
at exports.getInfo (/workspace/node_modules/@distube/ytdl-core/lib/info.js:247:35)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
Describe the bug
getInfo
calls are failing. Is passing anagent
with cookies required now? Requiring this by default seems to be a pretty major breaking change, given that most people probably use this library unauthenticated.Seems introduced by 6ddf70d
Debug File
Environment
The text was updated successfully, but these errors were encountered: