museofficial / muse

🎧 a self-hosted midwestern Discord music bot that doesn't suck
MIT License
880 stars 229 forks source link

Missing catch or finally after try (ytdl-core bug) #932

Closed Kinkyboo closed 1 year ago

Kinkyboo commented 1 year ago

What's happening? Error on /play

Logs

Unable to find image 'codetheweb/muse:2.2.3' locally
2.2.3: Pulling from codetheweb/muse
7a6db449b51b: Already exists
065fda631bff: Already exists
b588f0d753f3: Already exists
3d842af32ff7: Already exists
caed8fd3d9eb: Already exists
2f8b6a5849d5: Pull complete
dac97c48aa97: Pull complete
63509805cb92: Pull complete
7905ca4a9146: Pull complete
5d4a77028dff: Pull complete
Digest: sha256:12563fcd61b2fb12602b2fa47c90e67a48c2b64b0ca7dc5e973475a3054792eb
Status: Downloaded newer image for codetheweb/muse:2.2.3
yarn run v1.22.19
$ npm run env:set-database-url -- tsx src/scripts/migrate-and-start.ts

> muse@2.2.3 env:set-database-url
> tsx src/scripts/run-with-database-url.ts

========================================
========================================
================= muse =================
========================================
=========== Made with 🎶 by ============
==== https://github.com/codetheweb =====
========================================
========================================

Running version 2.2.3 built on 4/5/2023 (commit 640ec2b13f3d19e64800b102a8295effc485c709)

🔧 Need help? https://github.com/codetheweb/muse/discussions/new
🐛 Bug? https://github.com/codetheweb/muse/issues/new
✨ New feature? https://github.com/codetheweb/muse/issues/new
☕ Discussion? https://github.com/codetheweb/muse/discussions/new
💰 Help me? https://www.paypal.me/codetheweb https://github.com/sponsors/codetheweb

✔ Database migrations applied.
✔ Ready! Invite the bot with https://discordapp.com/oauth2/authorize?client_id=891408757001687051&scope=bot%20applications.commands&permissions=36700160
/usr/app/node_modules/ytsr/lib/parseItem.js:357
    .reelPlayerOverlayRenderer.reelPlayerHeaderSupportedRenderers.reelPlayerHeaderRenderer;
                                                                  ^

TypeError: Cannot read properties of undefined (reading 'reelPlayerHeaderRenderer')
    at parseShort (/usr/app/node_modules/ytsr/lib/parseItem.js:357:67)
    at parseItem (/usr/app/node_modules/ytsr/lib/parseItem.js:28:14)
    at <anonymous> (/usr/app/node_modules/ytsr/lib/parseItem.js:411:30)
    at Array.map (<anonymous>)
    at parseShelf (/usr/app/node_modules/ytsr/lib/parseItem.js:411:21)
    at parseItem (/usr/app/node_modules/ytsr/lib/parseItem.js:32:14)
    at catchAndLogFunc (/usr/app/node_modules/ytsr/lib/parseItem.js:90:12)
    at module.exports (/usr/app/node_modules/ytsr/lib/parseItem.js:113:46)
    at <anonymous> (/usr/app/node_modules/ytsr/lib/main.js:95:41)
    at Array.map (<anonymous>)

/********************************************************************************************************************************************************************************************************
failed at func parseItem: Cannot read properties of undefined (reading 'reelPlayerHeaderRenderer')
pls post the the files in /usr/app/node_modules/ytsr/dumps to https://github.com/TimeForANinja/node-ytsr/issues
os: linux-x64, node.js: v18.7.0, ytsr: 3.8.1
********************************************************************************************************************************************************************************************************\
WARNING: ytdl-core is out of date! Update with "npm install ytdl-core@latest".

Screenshots image

Additional context

Runtime I'm running Muse:

Versions

phob commented 1 year ago

Yeah I get this too

chitinlink commented 1 year ago

Running off PM2, same thing.

MatthewSH commented 1 year ago

I'm also starting to get this issue on all videos, bot is completely broken for us. I have no logs though. It's only the standard bootup.

Kinkyboo commented 1 year ago

I get the same error no matter which version I try, tested 2.2.3, 2.2.2. 2.2.0, 2.1.9 So probably some old code that is breaking or related to a package

Scraft08YT commented 1 year ago

Same issue, running npm on a bisect server

paindespik commented 1 year ago

same

Stanisgrox commented 1 year ago

Same issue even after running "npm install ytdl-core@latest" and rebuilding Docker image

TheGlitch76 commented 1 year ago

I'm observing the same error message, here's the relevant portion of the logs when I use /play:

2023-04-05T22:11:16.651Z prisma:client:libraryEngine  sending request, this.libraryStarted: true
2023-04-05T22:11:16.652Z muse evalmachine.<anonymous>:25
[])||(0,c[2])((0,c[45])((0,c[25])(c[21],c[55],(0,c[11])()),c[2],(0,c[86])(c[55],c[53]),c[13],c[77],c[27]),c[52],c[62],c[74]),1==c[43]&&((0,c[45])((0,c[2])((0,c[13])(c[65+Math.pow(3,2)%391],c[85]),c[78],c[35],c[68]),c[2],((0,c[76])(c[3],c[77]),c[40])(c[77]),c[40],c[87]),1)||(((((0,c[13])(c[87],c[65]),c[52])(c[46],c[Math.pow(5,3)%149+-51]),c[47])(c[63],c[1]),c[62])(c[50],c[18]),c[28])(c[56],c[50])};lma(ncode);
                                                                                                                                                                                                                                                                                                                                                                                                              ^

SyntaxError: Missing catch or finally after try
    at new Script (node:vm:100:7)
    at Object.exports.decipherFormats (/usr/app/node_modules/ytdl-core/lib/sig.js:116:51)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Promise.all (index 0)
    at exports.getInfo (/usr/app/node_modules/ytdl-core/lib/info.js:401:17)

The output of the bot is the same as what OP observes.

WarrtedBubble commented 1 year ago

Same Issue here

WARNING: ytdl-core is out of date! Update with "npm install ytdl-core@latest".

codetheweb commented 1 year ago

Issue in ytdl-core being tracked here: https://github.com/fent/node-ytdl-core/issues/1197

I tried downgrading ytdl-core to the version specified in the above thread, but still wasn't able to get it to work. I think we just have to sit tight and wait for a fix.

RedrootDEV commented 1 year ago

temporary workaround: https://hub.docker.com/r/redr00t/muse

Works very well with downgraded ytdl-core

gamer228 commented 1 year ago

temporary workaround: https://hub.docker.com/r/redr00t/muse

Works very well with downgraded ytdl-core

Thanks! This one works for the time being. My fellow gamers on my discord and me are a happy bunch! :)

This bot is the best ever made! (you got my gratitude for the hard work you put into it @codetheweb)

brocksexton commented 1 year ago

temporary workaround: https://hub.docker.com/r/redr00t/muse

Works very well with downgraded ytdl-core

+1 - Spun up a Docker machine on Vultr and pulled and worked immediately.

docker run -it -v "$(pwd)/data":/data -e DISCORD_TOKEN='APIKEY' -e SPOTIFY_CLIENT_ID='APIKEY' -e SPOTIFY_CLIENT_SECRET='APIKEY' -e YOUTUBE_API_KEY='APIKEY' docker.io/redr00t/muse:latest

RedrootDEV commented 1 year ago

temporary workaround: https://hub.docker.com/r/redr00t/muse Works very well with downgraded ytdl-core

+1 - Spun up a Docker machine on Vultr and pulled and worked immediately.

docker run -it -v "$(pwd)/data":/data -e DISCORD_TOKEN='APIKEY' -e SPOTIFY_CLIENT_ID='APIKEY' -e SPOTIFY_CLIENT_SECRET='APIKEY' -e YOUTUBE_API_KEY='APIKEY' docker.io/redr00t/muse:latest

temporary workaround: https://hub.docker.com/r/redr00t/muse Works very well with downgraded ytdl-core

Thanks! This one works for the time being. My fellow gamers on my discord and me are a happy bunch! :)

This bot is the best ever made! (you got my gratitude for the hard work you put into it @codetheweb)

I'm glad it worked for you guys!! I just uploaded an updated and stable image to fix some annoying bugs on the console. Fork: https://github.com/redr00t/muse-experimental Docker: https://hub.docker.com/r/redr00t/muse

dkeraudren commented 1 year ago

temporary workaround: https://hub.docker.com/r/redr00t/muse Works very well with downgraded ytdl-core

+1 - Spun up a Docker machine on Vultr and pulled and worked immediately.

docker run -it -v "$(pwd)/data":/data -e DISCORD_TOKEN='APIKEY' -e SPOTIFY_CLIENT_ID='APIKEY' -e SPOTIFY_CLIENT_SECRET='APIKEY' -e YOUTUBE_API_KEY='APIKEY' docker.io/redr00t/muse:latest

I got WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested exec /usr/local/bin/docker-entrypoint.sh: exec format error but can run perfectly from the original one

CameronMunroe commented 1 year ago

Please be careful with all these forks / docker images.

RedrootDEV commented 1 year ago

temporary workaround: https://hub.docker.com/r/redr00t/muse Works very well with downgraded ytdl-core

+1 - Spun up a Docker machine on Vultr and pulled and worked immediately. docker run -it -v "$(pwd)/data":/data -e DISCORD_TOKEN='APIKEY' -e SPOTIFY_CLIENT_ID='APIKEY' -e SPOTIFY_CLIENT_SECRET='APIKEY' -e YOUTUBE_API_KEY='APIKEY' docker.io/redr00t/muse:latest

I got WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested exec /usr/local/bin/docker-entrypoint.sh: exec format error but can run perfectly from the original one

the error is clear, my image is compiled for AMD64 and your server is ARM64, you have the link of my github to compile it yourself, btw I will try to compile it for arm64 now ^^

EDIT: ready for amd64 and arm64

RedrootDEV commented 1 year ago

Please be careful with all these forks / docker images.

the source is public

chitinlink commented 1 year ago

https://github.com/fent/node-ytdl-core/issues/1197#issuecomment-1507693036

root ytdl bug has been fixed ^

codetheweb commented 1 year ago

Fixed in v2.2.4.

Xseba360 commented 1 year ago

I'm still facing this issue on 2.2.4 - anyone else or is it just me?

CameronMunroe commented 1 year ago

Issue re-appeared today. Hard install back to ytdl-core 4.9.1 seems to work.

Likely needs to be fixed with an upstream patch.