Luuk-Dev/YT-Stream

Crash when getting age restricted videos

Closed this issue · 2 comments

node:internal/process/promises:246
          triggerUncaughtException(err, true /* fromPromise */);
          ^

[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "Error while getting video url
Sign in to confirm your age".] {
  code: 'ERR_UNHANDLED_REJECTION'
}

is there any way to catch this error/prevent it without setting a cookie?


edit: i found out how to fix
lines 91 - 93 in src/stream/createstream.js need to be caught

I have sent pr a fix in #8

I've just merged your pull request on Github, I'll release a new version within a few minutes. Have a nice day!