Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update distube dependencies for improved YouTube support #1180

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Codixer
Copy link
Contributor

@Codixer Codixer commented Dec 29, 2024

Closes #1173
Closes #1171
Closes #1166
Closes #1165
Closes #1163

  • Updated Distube

@codetheweb
Copy link
Collaborator

📦 🤖 A new release has been made for this pull request.

To play around with this PR, pull ghcr.io/museofficial/muse:pr-1180.

Images are available for x86_64 and ARM64.

Latest commit: 98fdd3f

@Codixer
Copy link
Contributor Author

Codixer commented Dec 29, 2024

@timurko-uwu @SparksSkywere @QuintenQVD0 @ascensionfm @AptGetGnome @kirankunigiri @cwerdna19 @Wancerz @WojenHere @DaanSelen @ThomasHineXYZ @aaddyy227 @arty01238 @Zereah

Hello there! All of you should be having the same issue currently with Muse being unable to play music at this moment, currently... this seems like an issue with several things. Either ffmpeg being annoying, ytdl being annoying or some other issues that I currently can't find. However, in this case. It seems like YTDL seems to be the most damning issue at this moment. As it seems like we are not the only one with the issue, and timelines more or less match up with distubejs/ytdl-core#157 distubejs/ytdl-core#156 and distubejs/ytdl-core#153

If you are able to, please do the following. Add DEBUG=* to your env file, and then make a comment on this PR with your FULL log. Make sure to backtick your code

Caution

MAKE SURE YOUR TOKEN/API KEY IS NOT VISIBLE IN THE LOG

Additionally, if you want to take a gander, try upgrading/downgrading muse, ytdl-core and/or ffmpeg to see if this resolves your issue. As several issues are going on at a time, and I can't test all of them.

@QuintenQVD0
Copy link

QuintenQVD0 commented Dec 29, 2024

@timurko-uwu @SparksSkywere @QuintenQVD0 @ascensionfm @AptGetGnome @kirankunigiri @cwerdna19 @Wancerz @WojenHere @DaanSelen @ThomasHineXYZ @aaddyy227 @arty01238 @Zereah

Hello there! All of you should be having the same issue currently with Muse being unable to play music at this moment, currently... this seems like an issue with several things. Either ffmpeg being annoying, ytdl being annoying or some other issues that I currently can't find. However, in this case. It seems like YTDL seems to be the most damning issue at this moment. As it seems like we are not the only one with the issue, and timelines more or less match up with distubejs/ytdl-core#157 distubejs/ytdl-core#156 and distubejs/ytdl-core#153

If you are able to, please do the following. Add DEBUG=* to your env file, and then make a comment on this PR with your FULL log. Make sure to backtick your code

[!CAUTION]
MAKE SURE YOUR TOKEN/API KEY IS NOT VISIBLE IN THE LOG

Additionally, if you want to take a gander, try upgrading/downgrading muse, ytdl-core and/or ffmpeg to see if this resolves your issue. As several issues are going on at a time, and I can't test all of them.

I have tried to update every npm module as far as I can without code errors. It does not resolve it.

@DaanSelen
Copy link

I weirdly do not have the issue... what should be happening?

@Codixer
Copy link
Contributor Author

Codixer commented Dec 29, 2024

I weirdly do not have the issue... what should be happening?

What is your current env? Muse version, FFMPEG, distube, etc. Where are you hosting (and so on and so forth).

@DaanSelen
Copy link

Running inside Kubernetes 1.31.3

    Image:          ghcr.io/museofficial/muse:latest
    Image ID:       ghcr.io/museofficial/muse@sha256:1d4d3c0a30b1bc22fbeedbbdee94ee350d9547c886f7b581bcdf20d00b774213

https://github.com/museofficial/muse/pkgs/container/muse

I don't think anything else is installed by me other than the information for running.
If you need anything specific let me know!

@cwerdna19
Copy link

cwerdna19 commented Dec 29, 2024

I ended up writing my own music bot because of this not working. While doing that I discovered that the latest release of @distube/ytdl-core, 4.15.8, is not working apparently universally. I downgraded to 4.15.4, and my bot worked.

I kind of gave up on muse, and started to find justifications for my own (scuffed) bot, like there being muse dependencies that have not been updated for over 2 years, and have severe vulnerabilities. Like a VM2 dependency. Not really sure if there is a real concern for these dependency vulnerabilities.

Coming back to muse, it works fine now with @distube/[email protected]. Basically, if I had probably just investigated a little bit I would have found that I needed to update ytdl (and downgrade? because the current muse package.json version is 4.14.4), but there were no errors or logs, just a silent failure.

I had also apparently had issues with using different versions of node. ope: Error: Cannot find module '/home/cratos/muse/node_modules/@discordjs/opus/prebuild/node-v131-napi-v3-linux-x64-glibc-2.35/opus.node' I believe I changed versions because I was having issues, and probably ended up creating more problems.

Anyway, to verify, I stashed my changes and checked out muse v2.10.0 again to avoid any stupid package version changes I did. rm -rf node_modules/, then did npm i. This just grabbed @distube/[email protected] anyway now

Just soapboxing sorry. From my experience, it appears to be working now. I didn't record which version of @distube/ytdl-core was being grabbed before. It was probably a ytdl-core issue, but I had convoluted the issue by changing dependency versions, and changing node versions.
Edit: I'm running muse on bare metal, without docker.

Edit2:
Env:

Packages:

[email protected] /home/cwerdna19/muse
├── @discordjs/[email protected]
├── @discordjs/[email protected]
├── @discordjs/[email protected]
├── @discordjs/[email protected]
├── @distube/[email protected]
├── @distube/[email protected]
├── @prisma/[email protected]
├── @release-it/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @typescript-eslint/[email protected]
├── @typescript-eslint/[email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]

ffmpeg:

ffmpeg -v
ffmpeg version 4.4.2

npm

npm -v
10.9.0

node

node -v
v22.12.0

OS: Ubuntu 22.04.5 LTS

Sorry, should've included my env earlier. Hope this helps.

Edit3:

Just tested 4.15.8 for fun. It works.

npm view @distube/ytdl-core version
4.15.8

I learned a lot about using node from all this, but I suppose it's possible I'm doing something wrong and using a version of ytdl installed somewhere else.
I'm using NVM to get the latest stable release of node. To kill my installed packages, I'm doing rm -rf node_modules/. I updated package.json to have "@distube/ytdl-core": "^4.15.8",, then I ran npm i in the same dir as my muse stuff (same dir as package.json).

I also confirmed that 4.15.8 does not work with the other music bot I made. The same behavior occurs; the bot joins then immediately leaves.
I don't understand why 4.15.8 would work with muse now, but not with my bot, which makes me think that I must be doing something wrong.
Development of my other bot is occurring on the same Ubuntu machine that I'm running muse on. In different folders, of course. Muse is in ~/muse, my bot is in ~/otherbotname.

I'll stop adding edits I think I confused things enough. Again, hope this helps.

@Codixer
Copy link
Contributor Author

Codixer commented Dec 29, 2024

@cwerdna19 thanks for your (VERY) detailed explaination. I'll see if I can downgrade to the version you are using. And lock it there for the time being.

I looked at the code. And yes, there is a TON of outdated code and packages in there. So I'm not sure how stable it's gonna be...

@SparksSkywere
Copy link

I have read what is here, I also run a Teamspeak server with my own music bot there, recently I had to update the YouTube-DL.exe file I had there and it worked fine, so it sounds to me like a YouTube situation (adblockers maybe).

I am running this bare metal on Windows Sever along with my Teamspeak bot in windows services. Following cwerden's comments I have tried running "4.15.4" of ytdl-core but sadly no audio, this debug however shows the video did somewhat parse but I did not hear anything in the VC with the bot.

WARNING: @distube/ytdl-core is out of date! Update with "npm install @distube/ytdl-core@latest".
  muse Using format {
  mimeType: 'audio/webm; codecs="opus"',
  qualityLabel: null,
  bitrate: 132495,
  audioBitrate: 160,
  itag: 251,
  url: 'https://rr5---sn-8pgbpohxqp5-aigy.googlevideo.com/videoplayback?expire=1735538407&ei=h-JxZ8jxG6XCmLAPo63lmQM&ip=86.10.160.86&id=o-ABwEWv0Yjd1pbJgcEqNrlkONhGJie50_k4_RJ-9eQf3H&itag=251&source=youtube&requiressl=yes&xpc=EgVo2aDSNQ%3D%3D&met=1735516807%2C&mh=lf&mm=31%2C26&mn=sn-8pgbpohxqp5-aigy%2Csn-5hneknee&ms=au%2Conr&mv=m&mvi=5&pcm2cms=yes&pl=24&rms=au%2Cau&gcr=gb&initcwndbps=4337500&bui=AfMhrI-bqvubaTcnOdvy9Mi1TptJKc3EK4O51_UXZtoYZtD3XHtUOtlCRS2zNv1cYlskGFoKaUNq8WqE&spc=x-caUGtgd5Uw1fHZrbQEkRs4kJCgoHeFmDNzW9yKpZ0MATmfmkiBXS1hdEU5&vprv=1&svpuc=1&mime=audio%2Fwebm&rqh=1&gir=yes&clen=9367497&dur=587.181&lmt=1714750594128606&mt=1735516391&fvip=1&keepalive=yes&fexp=51326932%2C51335594%2C51371294&c=IOS&txp=2318224&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cxpc%2Cgcr%2Cbui%2Cspc%2Cvprv%2Csvpuc%2Cmime%2Crqh%2Cgir%2Cclen%2Cdur%2Clmt&sig=AJfQdSswRQIhAJEyY7ThJK7AOSqoVw_fkmi1ucZtmV5UDnIPU9tfRo6rAiBMB7hHpcyWejpx-VrNZBiUdNZPitWo0POSrkVbfPtL-Q%3D%3D&lsparams=met%2Cmh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpcm2cms%2Cpl%2Crms%2Cinitcwndbps&lsig=AGluJ3MwRQIgf3Ag8pLXiranj1KjLW5UZTjjqQ8stCdbyr4SJA1DY2ICIQC1cFBRLW267GfXFwO1EmXwg2z7I04iVneusSnwSaCS5Q%3D%3D',
  initRange: { start: '0', end: '258' },
  indexRange: { start: '259', end: '1258' },
  lastModified: '1714750594128606',
  contentLength: '9367497',
  quality: 'tiny',
  projectionType: 'RECTANGULAR',
  averageBitrate: 127626,
  audioQuality: 'AUDIO_QUALITY_MEDIUM',
  approxDurationMs: '587181',
  audioSampleRate: '48000',
  audioChannels: 2,
  loudnessDb: 5.37,
  hasVideo: false,
  hasAudio: true,
  container: 'webm',
  codecs: 'opus',
  videoCodec: null,
  audioCodec: 'opus',
  isLive: false,
  isHLS: false,
  isDashMPD: false
} +1s
+1s
  muse Caching video +5ms
  muse [WS => Shard 0] First heartbeat sent, starting to beat every 41250ms +9s
  muse [WS => Shard 0] Heartbeat acknowledged, latency of 114ms. +114ms
  muse [WS => Shard 0] Heartbeat acknowledged, latency of 129ms. +41s
  muse [WS => Shard 0] Heartbeat acknowledged, latency of 123ms. +41s
  prisma:client  Prisma Client call: +2m
  prisma:client  prisma.setting.findUnique({
  where: {
    guildId: '504084859757658123'
  }
}) +1ms
  prisma:client  Generated request: +1ms
  prisma:client  query {
  findUniqueSetting(where: {
    guildId: "504084859757658123"
  }) {
    guildId
    playlistLimit
    secondsToWaitAfterQueueEmpties
    leaveIfNoListeners
    queueAddResponseEphemeral
    autoAnnounceNextSong
    defaultVolume
    defaultQueuePageSize
    turnDownVolumeWhenPeopleSpeak
    turnDownVolumeWhenPeopleSpeakTarget
    createdAt
    updatedAt
  }
}
 +1ms

I also did a debug with the current environment which is below with the latest youtube core "4.15.8" and all other modules up to date:

`starting` discord music bot "Sir Groovington Sixth"

> [email protected] start
> npm run env:set-database-url -- tsx src/scripts/migrate-and-start.ts


> [email protected] env:set-database-url
> tsx src/scripts/run-with-database-url.ts tsx src/scripts/migrate-and-start.ts

(node:19096) ExperimentalWarning: `--experimental-loader` may be removed in the future; instead use `register()`:
--import 'data:text/javascript,import { register } from "node:module"; import { pathToFileURL } from "node:url"; register("file%3A///C%3A/Users/Administrator/Documents/Servers/Discord/Bots/muse/node_modules/tsx/dist/loader.js", pathToFileURL("./"));'
(Use `node --trace-warnings ...` to show where the warning was created)
(node:29280) ExperimentalWarning: `--experimental-loader` may be removed in the future; instead use `register()`:
--import 'data:text/javascript,import { register } from "node:module"; import { pathToFileURL } from "node:url"; register("file%3A///C%3A/Users/Administrator/Documents/Servers/Discord/Bots/muse/node_modules/tsx/dist/loader.js", pathToFileURL("./"));'
(Use `node --trace-warnings ...` to show where the warning was created)
  prisma:tryLoadEnv  Environment variables loaded from C:\Users\Administrator\Documents\Servers\Discord\Bots\muse\.env +0ms
  prisma:client  checkPlatformCaching:postinstall true +0ms
  prisma:client  checkPlatformCaching:ciName undefined +1ms
  prisma:tryLoadEnv  Environment variables loaded from C:\Users\Administrator\Documents\Servers\Discord\Bots\muse\.env +590ms
  prisma:client  dirname C:\Users\Administrator\Documents\Servers\Discord\Bots\muse\node_modules\.prisma\client +0ms
  prisma:client  relativePath ../../.. +1ms
  prisma:client  cwd C:\Users\Administrator\Documents\Servers\Discord\Bots\muse +0ms
  prisma:client  protocol graphql +0ms
  prisma:client  clientVersion 4.16.0 +1ms
  prisma:client  clientEngineType library +0ms
  prisma:client:libraryEngine  internalSetup +0ms
  prisma:client  checkPlatformCaching:postinstall true +651ms
  prisma:client  checkPlatformCaching:ciName undefined +1ms
  prisma:tryLoadEnv  Environment variables loaded from C:\Users\Administrator\Documents\Servers\Discord\Bots\muse\.env +654ms
  prisma:client  dirname C:\Users\Administrator\Documents\Servers\Discord\Bots\muse\node_modules\.prisma\client +652ms
  prisma:client  relativePath ../../.. +0ms
  prisma:client  cwd C:\Users\Administrator\Documents\Servers\Discord\Bots\muse +0ms
  prisma:client  protocol graphql +1ms
  prisma:client  clientVersion 4.16.0 +1ms
  prisma:client  clientEngineType library +0ms
  prisma:client:libraryEngine  internalSetup +654ms
========================================
========================================
================= muse =================
========================================
=========== Made with 🎶 by ============
==== https://github.com/codetheweb =====
========================================
========================================

Running version 2.10.0 built on unknown date (commit unknown)

🔧 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


- Applying database migrations...  prisma:client:engines:resolveEnginePath  enginePath C:\Users\Administrator\Documents\Servers\Discord\Bots\muse\node_modules\.prisma\client\query_engine-windows.dll.node +0ms
  prisma:client:engines:resolveEnginePath  enginePath C:\Users\Administrator\Documents\Servers\Discord\Bots\muse\node_modules\.prisma\client\query_engine-windows.dll.node +1ms
  prisma:client:libraryEngine  library starting +33ms
  prisma:client:libraryEngine  library started +7ms
  prisma:client  prisma.$queryRaw(SELECT COUNT(id) FROM _prisma_migrations, []) +0ms
  prisma:client  Prisma Client call: +56ms
  prisma:client  prisma.$queryRaw({
  query: 'SELECT COUNT(id) FROM _prisma_migrations',
  parameters: {
    values: '[]',
    __prismaRawParameters__: true
  }
}) +1ms
  prisma:client  Generated request: +1ms
  prisma:client  mutation {
  queryRaw(
    query: "SELECT COUNT(id) FROM _prisma_migrations"
    parameters: "[]"
  )
}
 +1ms
  prisma:client:libraryEngine  sending request, this.libraryStarted: true +19ms
√ Database migrations applied.
  prisma:client:libraryEngine  library starting +828ms
  prisma:client:libraryEngine  library started +1ms
  prisma:client  Prisma Client call: +836ms
  prisma:client  prisma.fileCache.findMany({
  where: undefined,
  orderBy: {
    createdAt: 'asc'
  },
  take: 50
}) +0ms
  prisma:client  Generated request: +1ms
  prisma:client  query {
  findManyFileCache(
    orderBy: [
      {
        createdAt: asc
      }
    ]
    take: 50
  ) {
    hash
    bytes
    accessedAt
    createdAt
    updatedAt
  }
}
 +0ms
  prisma:client:libraryEngine  sending request, this.libraryStarted: true +8ms
  muse Evicting oldest files... +0ms
  prisma:client  Prisma Client call: +4ms
  prisma:client  prisma.fileCache.aggregate({
  select: {
    _sum: {
      select: {
        bytes: true
      }
    }
  }
}) +1ms
  prisma:client  Generated request: +1ms
  prisma:client  query {
  aggregateFileCache {
    _sum {
      bytes
    }
  }
}
 +5ms
  prisma:client:libraryEngine  sending request, this.libraryStarted: true +11ms
  superagent POST https://accounts.spotify.com/api/token +0ms
  superagent POST https://accounts.spotify.com/api/token +5ms
- 📡 connecting to Discord...  muse Provided token: *.************************************** +37ms
  muse Preparing to connect to the gateway... +1ms
  muse No files needed to be evicted. Total size of the cache is currently 0 bytes, and the cache limit is 4000000000 bytes. +10ms
  superagent POST https://accounts.spotify.com/api/token -> 200 +105ms
  superagent POST https://accounts.spotify.com/api/token -> 200 +4ms
| 📡 connecting to Discord...  muse [WS => Manager] Fetched Gateway Information
  muse     URL: wss://gateway.discord.gg
  muse     Recommended Shards: 1 +263ms
  muse [WS => Manager] Session Limit Information
  muse     Total: 1000
  muse     Remaining: 999 +0ms
  muse [WS => Shard 0] Connecting to wss://gateway.discord.gg?v=10&encoding=json +3ms
  muse [WS => Shard 0] Waiting for event hello for 60000ms +3ms
/ 📡 connecting to Discord...  muse [WS => Shard 0] Preparing first heartbeat of the connection with a jitter of 0.1678403847209302; waiting 6923ms +163ms  muse [WS => Shard 0] Waiting for identify throttle +2ms
  muse [WS => Shard 0] Identifying
  muse  shard id: 0
  muse  shard count: 1
  muse  intents: 1153
  muse  compression: none +1ms
  muse [WS => Shard 0] Waiting for event ready for 15000ms +2ms
- 📡 connecting to Discord...  muse [WS => Shard 0] Shard received all its guilds. Marking as fully ready. +196ms
  muse --------------------------------------------------
  muse Core Dependencies
  muse - @discordjs/voice: 0.17.0
  muse - prism-media: 1.3.5
  muse
  muse Opus Libraries
  muse - @discordjs/opus: 0.8.0
  muse - opusscript: not found
  muse
  muse Encryption Libraries
  muse - sodium-native: not found
  muse - sodium: not found
  muse - libsodium-wrappers: 0.7.10
  muse - tweetnacl: not found
  muse
  muse FFmpeg
  muse - version: 2024-12-26-git-fe04b93afa-essentials_build-www.gyan.dev
  muse - libopus: yes
  muse -------------------------------------------------- +53ms
√ Ready! Invite the bot with *
  muse [WS => Shard 0] First heartbeat sent, starting to beat every 41250ms +7s
  muse [WS => Shard 0] Heartbeat acknowledged, latency of 104ms. +105ms
  muse DiscordAPIError[10062]: Unknown interaction
  muse     at handleErrors (C:\Users\Administrator\Documents\Servers\Discord\Bots\muse\node_modules\discord.js\node_modules\@discordjs\rest\dist\index.js:640:13)
  muse     at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
  muse     at async BurstHandler.runRequest (C:\Users\Administrator\Documents\Servers\Discord\Bots\muse\node_modules\discord.js\node_modules\@discordjs\rest\dist\index.js:736:23)
  muse     at async REST.request (C:\Users\Administrator\Documents\Servers\Discord\Bots\muse\node_modules\discord.js\node_modules\@discordjs\rest\dist\index.js:1387:22)
  muse     at async AutocompleteInteraction.respond (C:\Users\Administrator\Documents\Servers\Discord\Bots\muse\node_modules\discord.js\src\structures\AutocompleteInteraction.js:86:5)
  muse     at async play_default.handleAutocompleteInteraction (file:///C:/Users/Administrator/Documents/Servers/Discord/Bots/muse/src/commands/play.ts:1:2266)
  muse     at async Client.<anonymous> (file:///C:/Users/Administrator/Documents/Servers/Discord/Bots/muse/src/bot.ts:1:2747) +24s
  prisma:client  Prisma Client call: +31s
  prisma:client  prisma.setting.findUnique({
  where: {
    guildId: '504084859757658123'
  }
}) +1ms
  prisma:client  Generated request: +2ms
  prisma:client  query {
  findUniqueSetting(where: {
    guildId: "504084859757658123"
  }) {
    guildId
    playlistLimit
    secondsToWaitAfterQueueEmpties
    leaveIfNoListeners
    queueAddResponseEphemeral
    autoAnnounceNextSong
    defaultVolume
    defaultQueuePageSize
    turnDownVolumeWhenPeopleSpeak
    turnDownVolumeWhenPeopleSpeakTarget
    createdAt
    updatedAt
  }
}
 +1ms
  prisma:client:libraryEngine  sending request, this.libraryStarted: true +31s
  muse DiscordAPIError[10062]: Unknown interaction
  muse     at handleErrors (C:\Users\Administrator\Documents\Servers\Discord\Bots\muse\node_modules\discord.js\node_modules\@discordjs\rest\dist\index.js:640:13)
  muse     at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
  muse     at async BurstHandler.runRequest (C:\Users\Administrator\Documents\Servers\Discord\Bots\muse\node_modules\discord.js\node_modules\@discordjs\rest\dist\index.js:736:23)
  muse     at async REST.request (C:\Users\Administrator\Documents\Servers\Discord\Bots\muse\node_modules\discord.js\node_modules\@discordjs\rest\dist\index.js:1387:22)
  muse     at async ChatInputCommandInteraction.deferReply (C:\Users\Administrator\Documents\Servers\Discord\Bots\muse\node_modules\discord.js\src\structures\interfaces\InteractionResponses.js:69:5)
  muse     at async AddQueryToQueue.addToQueue (file:///C:/Users/Administrator/Documents/Servers/Discord/Bots/muse/src/services/add-query-to-queue.ts:1:1685)
  muse     at async play_default.execute (file:///C:/Users/Administrator/Documents/Servers/Discord/Bots/muse/src/commands/play.ts:1:1804)
  muse     at async Client.<anonymous> (file:///C:/Users/Administrator/Documents/Servers/Discord/Bots/muse/src/bot.ts:1:2354) +353ms
  muse [VOICE] received voice state update: {"member":{"user":{"username":"Sir Groovington Sixth","public_flags":0,"primary_guild":null,"id":"1120687496070696991","global_name":null,"display_name":null,"discriminator":"1867","clan":null,"bot":true,"avatar_decoration_data":null,"avatar":"f3915147436d7d16345e9c71ab715c02"},"roles":["796866399003607050","764496539405647952","851125948026716180","1120697640011706459","797603501022773310"],"premium_since":null,"pending":false,"nick":null,"mute":false,"joined_at":"2023-06-20T12:17:45.584000+00:00","flags":0,"deaf":false,"communication_disabled_until":null,"banner":null,"avatar":null},"user_id":"1120687496070696991","suppress":false,"session_id":"60b6c81608f3d380b643f3306ad57b95","self_video":false,"self_mute":false,"self_deaf":false,"request_to_speak_timestamp":null,"mute":false,"guild_id":"504084859757658123","deaf":false,"channel_id":"718552122173685760"} +612ms
  muse [WS => Shard 0] Heartbeat acknowledged, latency of 112ms. +17s
  muse [VOICE] received voice state update: {"member":{"user":{"username":"Sir Groovington Sixth","public_flags":0,"primary_guild":null,"id":"1120687496070696991","global_name":null,"display_name":null,"discriminator":"1867","clan":null,"bot":true,"avatar_decoration_data":null,"avatar":"f3915147436d7d16345e9c71ab715c02"},"roles":["796866399003607050","764496539405647952","851125948026716180","1120697640011706459","797603501022773310"],"premium_since":null,"pending":false,"nick":null,"mute":false,"joined_at":"2023-06-20T12:17:45.584000+00:00","flags":0,"deaf":false,"communication_disabled_until":null,"banner":null,"avatar":null},"user_id":"1120687496070696991","suppress":false,"session_id":"60b6c81608f3d380b643f3306ad57b95","self_video":false,"self_mute":false,"self_deaf":false,"request_to_speak_timestamp":null,"mute":false,"guild_id":"504084859757658123","deaf":false,"channel_id":null} +14s

@WojenHere
Copy link

WojenHere commented Dec 30, 2024

If you are able to, please do the following. Add DEBUG=* to your env file, and then make a comment on this PR with your FULL log. Make sure to backtick your code

Just pulled pr-1180 to a new directory and run via docker compose up -d. Here is my docker-compose.yml:

services:
muse:
container_name: muse
image: ghcr.io/museofficial/muse:pr-1180
environment:
- SPOTIFY_CLIENT_ID=🤫
- SPOTIFY_CLIENT_SECRET=🤫
- YOUTUBE_API_KEY=🤫
- DISCORD_TOKEN=🤫
- BOT_ACTIVITY=🤫
- BOT_ACTIVITY_TYPE=PLAYING
- DEBUG=*
volumes:
- /home/user/muse/data:/data:rw
restart: unless-stopped

Tried 3 commands:

/play never gonna give you up

🚫 ope: no songs found

/play https://www.youtube.com/watch?v=dQw4w9WgXcQ

u betcha, Rick Astley - Never Gonna Give You Up (Official Music Video) added to the queue

Bot joined voice channel, waited few seconds and disconnected.

/play https://open.spotify.com/track/4PTG3Z6ehGkBFwjybzWkR8
Got message: App is not responding

Distro: Debian 12.8
Kernel: 6.1.0-28-amd64
Docker version: 20.10.24+dfsg1, build 297e128
Docker compose version: v2.29.7

Debug log in attachment
muse_debug.log

@Codixer
Copy link
Contributor Author

Codixer commented Jan 1, 2025

Hmmm, this is becoming an issue. It seems like the website used for playback is blocked. Did YT add a new auth system to their video's or something? Or at least their endpoints.
image

@Zereah
Copy link

Zereah commented Jan 2, 2025

I have a completely working installation of Muse at the moment. It plays music perfectly fine from Youtube and everything I've tried doing with it so far has worked without a hitch. But I'm going to apologize for my ignorance before I go any further.

I am extremely inexperienced to this level of CLI Application complexity (and this is pretty simple stuff I'm sure). Most of what's going on in this thread is way over my head. I found this bot on a whim while looking for a replacement to JMusicBot. , and it took me hours to even get the basic installation done through Docker. I couldn't even get the install command:

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

to work no matter what I tried. I ended up cloning the latest Muse repository and building the image locally somehow, inputting the env variables in during runtime, and it just magically worked.

I'd love to help you guys troubleshoot...whatever it is that's going on... especially since I have a fully functional Muse installation as of this very moment. But I was genuinely unable to figure out how to even create an ENV file for the Docker container in the first place, much less get it to debug mode...

So that's the level of novice we're working with. I glanced at the package.json of the Muse repo I built the image off of, but I can't make heads or tails of what's the actual version number of anything since stuff appears multiple times with a slightly different version in each section of the .json.

Node is either:

"engines": {
     "node": ">=18.17.0"

or:

  "devDependencies": {
    "@types/node": "^17.0.0",
    "@types/node-emoji": "^1.8.1",

ffmpeg is either:

  "devDependencies": {   
    "@types/fluent-ffmpeg": "^2.1.17",`

or:

  "dependencies": {
    "fluent-ffmpeg": "^2.1.2",

ytdl-core only appears once. Not sure if ytsr is of any significance but there it is.

  "dependencies": {
    "@distube/ytdl-core": "^4.14.4",
    "@distube/ytsr": "^2.0.0",
    

If I can help further let me know, but don't waste more effort on me than it's worth. Sorry folks >.<.

@Codixer
Copy link
Contributor Author

Codixer commented Jan 3, 2025

@WojenHere think you could try by going to the latest branch and doing the same above, or by using a different api key.

@WojenHere
Copy link

@Codixer just tried again latest with the same above and pr-1182. Both with different new api keys. Still the same
pr-1182.log

@Zereah
Copy link

Zereah commented Jan 6, 2025

@Codixer
DEBUG new 2.txt
Working installation of Muse using a locally built image, based on the github codebase as of 12/24/24. Haven't swapped to using latest branch for fear of it breaking. I also still have the unaltered codebase used to build the image if that would be of any use.

@WojenHere
Copy link

WojenHere commented Jan 6, 2025

I also still have the unaltered codebase used to build the image if that would be of any use.

@Zereah Can you upload this somewhere and send a link to download?

@Zereah
Copy link

Zereah commented Jan 7, 2025

I also still have the unaltered codebase used to build the image if that would be of any use.

Can you upload this somewhere and send a link to download?

@WojenHere Sure thing. Haven't used a file share site in some time, hope MEGA is ok. https://mega.nz/file/U0dmzYYA#L0VLVvoHpKmMstNNDYsZCLn6AITs2zXpAXzgJhwR-sA

Hope it helps out in some way.

@WojenHere
Copy link

I also still have the unaltered codebase used to build the image if that would be of any use.

Can you upload this somewhere and send a link to download?

@WojenHere Sure thing. Haven't used a file share site in some time, hope MEGA is ok. https://mega.nz/file/U0dmzYYA#L0VLVvoHpKmMstNNDYsZCLn6AITs2zXpAXzgJhwR-sA

Hope it helps out in some way.

@Zereah
Thanks, but it still does not work. But if it works for you, can you push your working docker image on docker hub or somewhere else?

build.log
container.log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
8 participants