node-ytdl-core: ERR_INVALID_ARG_TYPE(name, 'string', value)
I switched from ytdl(…) to ytdl.downloadFromInfo and suddenly i got an error like this:
How can i catch this?
internal/validators.js:112
throw new ERR_INVALID_ARG_TYPE(name, 'string', value);
^
TypeError [ERR_INVALID_ARG_TYPE]: The "url" argument must be of type string. Received type undefined
at validateString (internal/validators.js:112:11)
at Url.parse (url.js:155:3)
at Object.urlParse [as parse] (url.js:150:13)
at doDownload (/var/www/.../node_modules/miniget/dist/index.js:90:28)
at processTicksAndRejections (internal/process/task_queues.js:75:11) {
code: 'ERR_INVALID_ARG_TYPE'
}
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 4
- Comments: 20 (10 by maintainers)
Commits related to this issue
- Updated ytdl-core to 2.1.2 to fix playback error https://github.com/fent/node-ytdl-core/issues/614 — committed to Brainicism/KMQ_Discord by taahamahdi 4 years ago
- fix: fix issue when not finding format url from formats containing `signatureCipher` fixes #614 — committed to keeptpa/node-ytdl-core by fent 4 years ago
Sure, it is from getInfo().
I forgot to mention that this happen only 1:100 and not with the same video so i don’t know if we really need to fix this. But i need to catch it. 😃