SuspiciousLookingOwl / youtubei

Get Youtube data such as videos, playlists, channels, video information & comments, related videos, up next video, and more!
https://suspiciouslookingowl.github.io/youtubei
MIT License
240 stars 50 forks source link

Cannot read properties of undefined (reading 'map') #59

Closed MikeDev96 closed 2 years ago

MikeDev96 commented 2 years ago

Node version: 16.16.0

Searching for

official audio lyrics Eliza Rose, Interplanetary Criminal B.O.T.A. (Baddest Of Them All) - Edit

or

official audio lyrics Solardo, Vintage Culture, LOWES Adidas & Pearls

results in the following error:

C:\Users\Trike\Documents\Projects\lucille-bot-dev\node_modules\youtubei\dist\cjs\classes\VideoCompact\VideoCompactParser.js:16
            (detailedMetadataSnippets === null || detailedMetadataSnippets === void 0 ? void 0 : detailedMetadataSnippets[0].snippetText.runs.map((r) => r.text).join("")) || "";
                                                                                                                                              ^

TypeError: Cannot read properties of undefined (reading 'map')
    at Function.loadVideoCompact (C:\Users\Trike\Documents\Projects\lucille-bot-dev\node_modules\youtubei\dist\cjs\classes\VideoCompact\VideoCompactParser.js:16:143)
    at VideoCompact.load (C:\Users\Trike\Documents\Projects\lucille-bot-dev\node_modules\youtubei\dist\cjs\classes\VideoCompact\VideoCompact.js:32:49)
    at Function.parseSearchResult (C:\Users\Trike\Documents\Projects\lucille-bot-dev\node_modules\youtubei\dist\cjs\classes\SearchResult\SearchResultParser.js:33:75)
    at Function.parseInitialSearchResult (C:\Users\Trike\Documents\Projects\lucille-bot-dev\node_modules\youtubei\dist\cjs\classes\SearchResult\SearchResultParser.js:13:38)
    at SearchResult.<anonymous> (C:\Users\Trike\Documents\Projects\lucille-bot-dev\node_modules\youtubei\dist\cjs\classes\SearchResult\SearchResult.js:65:88)
    at Generator.next (<anonymous>)
    at fulfilled (C:\Users\Trike\Documents\Projects\lucille-bot-dev\node_modules\youtubei\dist\cjs\classes\SearchResult\SearchResult.js:5:58)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
SuspiciousLookingOwl commented 2 years ago

Should be fixed on next version, thanks for reporting.