codetheweb / muse

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

Bot joins but does not play audio #1033

Closed HTF8 closed 1 month ago

HTF8 commented 1 month ago

What's happening? When using /play, the bot will join but not play any audio on YouTube or Spotify.

Logs

PS D:\Discord Bot\muse> npm run start

> muse@2.8.1 start
> npm run env:set-database-url -- tsx src/scripts/migrate-and-start.ts

> muse@2.8.1 env:set-database-url
> tsx src/scripts/run-with-database-url.ts tsx src/scripts/migrate-and-start.ts

(node:18252) ExperimentalWarning: Custom ESM Loaders is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
(node:14512) ExperimentalWarning: Custom ESM Loaders is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
  prisma:tryLoadEnv  Environment variables loaded from D:\Discord Bot\muse\.env +0ms
  prisma:client  checkPlatformCaching:postinstall true +0ms
  prisma:client  checkPlatformCaching:ciName undefined +1ms
  prisma:tryLoadEnv  Environment variables loaded from D:\Discord Bot\muse\.env +767ms
  prisma:client  dirname D:\Discord Bot\muse\node_modules\.prisma\client +0ms
  prisma:client  relativePath ../../.. +0ms
  prisma:client  cwd D:\Discord Bot\muse +0ms
  prisma:client  protocol graphql +1ms
  prisma:client  clientVersion 4.16.0 +0ms
  prisma:client  clientEngineType library +0ms
  prisma:client:libraryEngine  internalSetup +0ms
  prisma:client  checkPlatformCaching:postinstall true +652ms
  prisma:client  checkPlatformCaching:ciName undefined +0ms
  prisma:tryLoadEnv  Environment variables loaded from D:\Discord Bot\muse\.env +653ms
  prisma:client  dirname D:\Discord Bot\muse\node_modules\.prisma\client +651ms
  prisma:client  relativePath ../../.. +0ms
  prisma:client  cwd D:\Discord Bot\muse +0ms
  prisma:client  protocol graphql +1ms
  prisma:client  clientVersion 4.16.0 +0ms
  prisma:client  clientEngineType library +0ms
  prisma:client:libraryEngine  internalSetup +651ms
========================================
========================================
================= muse =================
========================================
=========== Made with 🎶 by ============
==== https://github.com/codetheweb =====
========================================
========================================

Running version 2.8.1 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 D:\Discord Bot\muse\node_modules\.prisma\client\query_engine-windows.dll.node +0ms
  prisma:client:engines:resolveEnginePath  enginePath D:\Discord Bot\muse\node_modules\.prisma\client\query_engine-windows.dll.node +0ms
  prisma:client:libraryEngine  library starting +29ms
  prisma:client:libraryEngine  library started +7ms
  prisma:client  prisma.$queryRaw(SELECT COUNT(id) FROM _prisma_migrations, []) +0ms
  prisma:client  Prisma Client call: +49ms
  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 +17ms
✔ Database migrations applied.
  prisma:client:libraryEngine  library starting +850ms
  prisma:client:libraryEngine  library started +1ms
  prisma:client  Prisma Client call: +857ms
  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: +5ms
  prisma:client  prisma.fileCache.aggregate({
  select: {
    _sum: {
      select: {
        bytes: true
      }
    }
  }
}) +1ms
  prisma:client  Generated request: +0ms
  prisma:client  query {
  aggregateFileCache {
    _sum {
      bytes
    }
  }
}
 +1ms
  prisma:client:libraryEngine  sending request, this.libraryStarted: true +5ms
  superagent POST https://accounts.spotify.com/api/token +0ms
  superagent POST https://accounts.spotify.com/api/token +5ms
⠋ 📡 connecting to Discord...  muse Provided token: MTAyODQ3MzQ2MjgwNjgxNDczMQ.G37Y7e.************************************** +27ms
  muse Preparing to connect to the gateway... +0ms
  muse No files needed to be evicted. Total size of the cache is currently 0 bytes, and the cache limit is 2000000000 bytes. +8ms
⠙ 📡 connecting to Discord...  superagent POST https://accounts.spotify.com/api/token -> 200 +93ms
  superagent POST https://accounts.spotify.com/api/token -> 200 +3ms
  muse [WS => Manager] Fetched Gateway Information
  muse     URL: wss://gateway.discord.gg
  muse     Recommended Shards: 1 +131ms
  muse [WS => Manager] Session Limit Information
  muse     Total: 1000
  muse     Remaining: 981 +1ms
  muse [WS => Shard 0] Connecting to wss://gateway.discord.gg?v=10&encoding=json +2ms
  muse [WS => Shard 0] Waiting for event hello for 60000ms +2ms
⠹ 📡 connecting to Discord...  muse [WS => Shard 0] Preparing first heartbeat of the connection with a jitter of 0.8860568847111348; waiting 36549ms +97ms
  muse [WS => Shard 0] Waiting for identify throttle +1ms
  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 +1ms
⠦ 📡 connecting to Discord...  muse [WS => Shard 0] Shard received all its guilds. Marking as fully ready. +296ms
  muse --------------------------------------------------
  muse Core Dependencies
  muse - @discordjs/voice: 0.11.0
  muse - prism-media: 1.3.4
  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: 6.0-essentials_build-www.gyan.dev
  muse - libopus: yes
  muse -------------------------------------------------- +6ms
✔ Ready! Invite the bot with https://discordapp.com/oauth2/authorize?client_id=1028473462806814731&scope=bot%20applications.commands&permissions=36700160
  prisma:client  Prisma Client call: +24s
  prisma:client  prisma.setting.findUnique({
  where: {
    guildId: '438060163732209666'
  }
}) +1ms
  prisma:client  Generated request: +1ms
  prisma:client  query {
  findUniqueSetting(where: {
    guildId: "438060163732209666"
  }) {
    guildId
    playlistLimit
    secondsToWaitAfterQueueEmpties
    leaveIfNoListeners
    queueAddResponseEphemeral
    autoAnnounceNextSong
    defaultVolume
    createdAt
    updatedAt
  }
}
 +0ms
  prisma:client:libraryEngine  sending request, this.libraryStarted: true +24s
  prisma:client  Prisma Client call: +594ms
  prisma:client  prisma.keyValueCache.findUnique({
  where: {
    key: '[{"searchParams":{"part":"id, snippet, contentDetails","id":"AcoRc2ieFzE"}}]'
  }
}) +1ms
  prisma:client  Generated request: +1ms
  prisma:client  query {
  findUniqueKeyValueCache(where: {
    key: "[{\"searchParams\":{\"part\":\"id, snippet, contentDetails\",\"id\":\"AcoRc2ieFzE\"}}]"
  }) {
    key
    value
    expiresAt
    createdAt
    updatedAt
  }
}
 +0ms
  prisma:client:libraryEngine  sending request, this.libraryStarted: true +596ms
  muse Cache hit: [{"searchParams":{"part":"id, snippet, contentDetails","id":"AcoRc2ieFzE"}}] +24s
  prisma:client  Prisma Client call: +5ms
  prisma:client  prisma.setting.findUnique({
  where: {
    guildId: '438060163732209666'
  }
}) +0ms
  prisma:client  Generated request: +0ms
  prisma:client  query {
  findUniqueSetting(where: {
    guildId: "438060163732209666"
  }) {
    guildId
    playlistLimit
    secondsToWaitAfterQueueEmpties
    leaveIfNoListeners
    queueAddResponseEphemeral
    autoAnnounceNextSong
    defaultVolume
    createdAt
    updatedAt
  }
}
 +1ms
  prisma:client:libraryEngine  sending request, this.libraryStarted: true +6ms
  prisma:client  Prisma Client call: +5ms
  prisma:client  prisma.fileCache.findUnique({
  where: {
    hash: '66f1dfe62c09202594fe199660218eadc4e29f7c4c5bdf45a26cb8d18f6fb86ed723b713fc38afee87b27d856bc721d676fe35ac63661fd8372d027b0614efce'
  }
}) +0ms
  prisma:client  Generated request: +0ms
  prisma:client  query {
  findUniqueFileCache(where: {
    hash: "66f1dfe62c09202594fe199660218eadc4e29f7c4c5bdf45a26cb8d18f6fb86ed723b713fc38afee87b27d856bc721d676fe35ac63661fd8372d027b0614efce"
  }) {
    hash
    bytes
    accessedAt
    createdAt
    updatedAt
  }
}
 +1ms
  prisma:client:libraryEngine  sending request, this.libraryStarted: true +6ms
  muse [VOICE] received voice state update: {"member":{"user":{"username":"Filthy Galka BeatzZ 🎵","public_flags":0,"id":"1028473462806814731","global_name":null,"display_name":null,"discriminator":"9416","clan":null,"bot":true,"avatar_decoration_data":null,"avatar":"97e503cb041d3f094d3f07b4ec5b1d81"},"roles":["1241235194229293086"],"premium_since":null,"pending":false,"nick":null,"mute":false,"joined_at":"2024-05-18T03:45:31.364259+00:00","flags":1,"deaf":false,"communication_disabled_until":null,"avatar":null},"user_id":"1028473462806814731","suppress":false,"session_id":"114a2eb13ea97afd2ad1f6a363e2e015","self_video":false,"self_mute":false,"self_deaf":true,"request_to_speak_timestamp":null,"mute":false,"guild_id":"438060163732209666","deaf":false,"channel_id":"438060163732209670"} +70ms
  prisma:client  Prisma Client call: +62ms
  prisma:client  prisma.setting.findUnique({
  where: {
    guildId: '438060163732209666'
  }
}) +0ms
  prisma:client  Generated request: +1ms
  prisma:client  query {
  findUniqueSetting(where: {
    guildId: "438060163732209666"
  }) {
    guildId
    playlistLimit
    secondsToWaitAfterQueueEmpties
    leaveIfNoListeners
    queueAddResponseEphemeral
    autoAnnounceNextSong
    defaultVolume
    createdAt
    updatedAt
  }
}
 +0ms
  prisma:client:libraryEngine  sending request, this.libraryStarted: true +63ms
  muse [VOICE] received voice server: {"t":"VOICE_SERVER_UPDATE","s":9,"op":0,"d":{"token":"5643e133879056aa","guild_id":"438060163732209666","endpoint":"newark5790.discord.media:443"}} 
+12ms
  muse Using format {
  mimeType: 'audio/webm; codecs="opus"',
  qualityLabel: null,
  bitrate: 143050,
  audioBitrate: 160,
  itag: 251,
  initRange: { start: '0', end: '258' },
  indexRange: { start: '259', end: '595' },
  lastModified: '1715926654524896',
  contentLength: '3256526',
  quality: 'tiny',
  projectionType: 'RECTANGULAR',
  averageBitrate: 133136,
  audioQuality: 'AUDIO_QUALITY_MEDIUM',
  approxDurationMs: '195681',
  audioSampleRate: '48000',
  audioChannels: 2,
  loudnessDb: 3.1199999,
  url: 'https://rr8---sn-8xgp1vo-ab5l.googlevideo.com/videoplayback?expire=1716026073&ei=eSZIZoyROvaHkucPgb6E8AE&ip=100.40.186.13&id=o-ADRThbg4i7Hc9c8ZsE5XRSQfOPHrpL5qx4zLIBT7q0py&itag=251&source=youtube&requiressl=yes&xpc=EgVo2aDSNQ%3D%3D&mh=ep&mm=31%2C26&mn=sn-8xgp1vo-ab5l%2Csn-p5qlsn7l&ms=au%2Conr&mv=m&mvi=8&pcm2cms=yes&pl=20&gcr=us&initcwndbps=1535000&bui=AWRWj2QLYJRUoe5567R7o8OOogZnWN6s4XoyP-7Y7R9dAxXvxykUDXFzWuAJYL3KCQNgcuWnih9UGHCy&spc=UWF9f1SL9BOnscebAlDQbJ8IGS_cm487dDXm44--eqyGxgO_8gM5QA0&vprv=1&svpuc=1&mime=audio%2Fwebm&ns=2Dt9Vf53mGjLxmL9T2ucU2QQ&rqh=1&gir=yes&clen=3256526&dur=195.681&lmt=1715926654524896&mt=1716004135&fvip=2&keepalive=yes&c=WEB&sefc=1&txp=5532434&n=B2Fnz-RdE4iw2A&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cxpc%2Cgcr%2Cbui%2Cspc%2Cvprv%2Csvpuc%2Cmime%2Cns%2Crqh%2Cgir%2Cclen%2Cdur%2Clmt&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpcm2cms%2Cpl%2Cinitcwndbps&lsig=AHWaYeowRQIgXjTKofnp3O_cSfIiYOt3UFyugvga4_9SAnO-U-7ydhkCIQDRs0r0SAilcRDjTpTfyaFw-wtf3uj_BNKQWkwuiOv6dQ%3D%3D&sig=AJfQdSswRgIhAPY11evfOFAcNmzyHy7oe08ptiP09-7jL_Quj2a-GF1LAiEAvbCUm26dWd6XyQ5sXFsYuVX6A9Cz9eH0CPV_ZwWZ3IA%3D',
  hasVideo: false,
  hasAudio: true,
  container: 'webm',
  codecs: 'opus',
  videoCodec: null,
  audioCodec: 'opus',
  isLive: false,
  isHLS: false,
  isDashMPD: false
} +1s
  muse Caching video +5ms 

Screenshots

Additional context Works fine running in Docker

Runtime I'm running Muse:

Versions

HTF8 commented 1 month ago

Moved to Docker, works properly, closing