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
i'm using getBasicInfo function with ANDROID client. no idea which videos in particular cause this error to occur, it seems to happen once in a while without ties to any specific video.
code snippet:
import{Innertube}from'youtubei.js';constyt=awaitInnertube.create();try{info=awaityt.getBasicInfo('video id here','ANDROID');}catch(e){console.log(e);}
Failure Logs
InnertubeError: Something went wrong at PlayerCaptionsTracklist!
This is a bug, please report it at https://github.com/LuanRT/YouTube.js/issues
at Parser._Parser_printError (node_modules/youtubei.js/dist/src/parser/parser.js:405:18)
at Parser.parseItem (node_modules/youtubei.js/dist/src/parser/parser.js:242:77)
at Parser.parseResponse (node_modules/youtubei.js/dist/src/parser/parser.js:185:31)
at new MediaInfo (node_modules/youtubei.js/dist/src/core/MediaInfo.js:34:29)
at new VideoInfo (node_modules/youtubei.js/dist/src/parser/youtube/VideoInfo.js:53:9)
at Innertube.<anonymous> (node_modules/youtubei.js/dist/src/Innertube.js:111:20)
at Generator.next (<anonymous>)
at fulfilled (node_modules/youtubei.js/dist/src/Innertube.js:4:58)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
info: {
stack: "TypeError: Cannot read properties of undefined (reading 'map')\n" +
' at new PlayerCaptionsTracklist (node_modules/youtubei.js/dist/src/parser/classes/PlayerCaptionsTracklist.js:23:64)\n' +
' at Parser.parseItem (node_modules/youtubei.js/dist/src/parser/parser.js:237:32)\n' +
' at Parser.parseResponse (node_modules/youtubei.js/dist/src/parser/parser.js:185:31)\n' +
' at new MediaInfo (node_modules/youtubei.js/dist/src/core/MediaInfo.js:34:29)\n' +
' at new VideoInfo (node_modules/youtubei.js/dist/src/parser/youtube/VideoInfo.js:53:9)\n' +
' at Innertube.<anonymous> (node_modules/youtubei.js/dist/src/Innertube.js:111:20)\n' +
' at Generator.next (<anonymous>)\n' +
' at fulfilled (node_modules/youtubei.js/dist/src/Innertube.js:4:58)\n' +
' at process.processTicksAndRejections (node:internal/process/task_queues:95:5)'
},
date: 2023-03-26T01:24:42.567Z,
version: '4.1.0'
}
Expected behavior
i expect getBasicInfo to either handle such errors by itself, or emit an error event for me to handle it
Current behavior
getBasicInfo crashes the entire project by throwing an uncatchable error :(
Version
Default
Anything else?
No response
Checklist
I am running the latest version.
I checked the documentation and found no answer.
I have searched the existing issues and made sure this is not a duplicate.
I have provided sufficient information.
The text was updated successfully, but these errors were encountered:
getBasicInfo crashes the entire project by throwing an uncatchable error :(
Are you sure this throws an error? These parser warnings are not supposed to crash your program. The only thing that should be affected is the PlayerCaptionsTracklist node, unless you rely on data this node holds somewhere else in your code.
You should still get most of the data (try logging the info object and remove the try-catch to verify this), but the captions prop will be null.
Steps to reproduce
i'm using
getBasicInfo
function withANDROID
client. no idea which videos in particular cause this error to occur, it seems to happen once in a while without ties to any specific video.code snippet:
Failure Logs
Expected behavior
i expect
getBasicInfo
to either handle such errors by itself, or emit an error event for me to handle itCurrent behavior
getBasicInfo
crashes the entire project by throwing an uncatchable error :(Version
Default
Anything else?
No response
Checklist
The text was updated successfully, but these errors were encountered: