TypeError: undefined is not an object (evaluating 'videoDetails.thumbnail.thumbnails')
OmarSaidIbrahim opened this issue · comments
I keep getting the following error every time I relaunch the function of audio extraction
WARN Possible Unhandled Promise Rejection (id: 3):
TypeError: undefined is not an object (evaluating 'videoDetails.thumbnail.thumbnails')
cleanVideoDetails@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:109981:53
_callee$@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:105318:57
tryCatch@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:26922:23
invoke@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:27098:32
tryCatch@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:26922:23
invoke@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:26998:30
http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:27008:21
tryCallOne@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:28860:16
http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:28961:27
_callTimer@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:32400:17
_callImmediatesPass@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:32436:19
callImmediates@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:32654:33
callImmediates@[native code]
__callImmediates@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:2719:35
http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:2505:34
__guard@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:2702:15
flushedQueue@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:2504:21
flushedQueue@[native code]
invokeCallbackAndReturnFlushedQueue@[native code]
The first time I launch the function, it works fine. If I relaunch the function with a different youtube link it gives me the above error. The error below stops at the function:
const downloadableURLs = await ytdl(URL, { quality: 'highestaudio' });
working with React-Native 0.64.1
This problem has been resolved in the latest version v4.8.2
Just need to reinstall the package
yarn upgrade react-native-ytdl@latest
The Youtube consent screen is not a problem.
Thank you so much, now it works !!
I am also getting this error.
It's Youtube that sometimes makes changes and it is necessary to fix some code, so now you only can wait for a new version or try to fix and open a PR.
Edit: This package is based in node-ytdl-core where also this is a problem (Status Code 403).
Im gonna try it now and let you know. Thanks for the help anyway.
EDIT: yup works fine for me. Thanks again