museofficial / muse

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

re-emergence of #770 #782

Closed WolfeForge closed 2 years ago

WolfeForge commented 2 years ago

What's happening? Muse is not playing songs when requested, but can connect to discord and send messages. when /play is used with URLs or search terms, it will connect to call and then disconnect after sending the message 🚫ope: Invalid or unexpected token

Logs

foxbard-muse-1  | 2022-08-25T03:34:11.989Z prisma:client  Prisma Client call:
foxbard-muse-1  | 2022-08-25T03:34:11.989Z prisma:client  prisma.setting.findUnique({
foxbard-muse-1  |   where: {
foxbard-muse-1  |     guildId: '(REDACTED)'
foxbard-muse-1  |   }
foxbard-muse-1  | })
foxbard-muse-1  | 2022-08-25T03:34:11.989Z prisma:client  Generated request:
foxbard-muse-1  | 2022-08-25T03:34:11.989Z prisma:client  query {
foxbard-muse-1  |   findUniqueSetting(where: {
foxbard-muse-1  |     guildId: "(REDACTED)"
foxbard-muse-1  |   }) {
foxbard-muse-1  |     guildId
foxbard-muse-1  |     playlistLimit
foxbard-muse-1  |     secondsToWaitAfterQueueEmpties
foxbard-muse-1  |     leaveIfNoListeners
foxbard-muse-1  |     createdAt
foxbard-muse-1  |     updatedAt
foxbard-muse-1  |   }
foxbard-muse-1  | }
foxbard-muse-1  | 
foxbard-muse-1  | 2022-08-25T03:34:11.989Z prisma:client:libraryEngine  sending request, this.libraryStarted: true
foxbard-muse-1  | 2022-08-25T03:34:12.299Z superagent GET https://api.spotify.com/v1/tracks/7v4pPS4A7NgY7bxFA3Etv3
foxbard-muse-1  | 2022-08-25T03:34:12.437Z superagent GET https://api.spotify.com/v1/tracks/7v4pPS4A7NgY7bxFA3Etv3 -> 200
foxbard-muse-1  | 2022-08-25T03:34:12.442Z prisma:client  Prisma Client call:
foxbard-muse-1  | 2022-08-25T03:34:12.442Z prisma:client  prisma.keyValueCache.findUnique({
foxbard-muse-1  |   where: {
foxbard-muse-1  |     key: '["\"HOT DEMON B!TCHES NEAR U ! ! !\" \"CORPSE\"",{"limit":10}]'
foxbard-muse-1  |   }
foxbard-muse-1  | })
foxbard-muse-1  | 2022-08-25T03:34:12.442Z prisma:client  Generated request:
foxbard-muse-1  | 2022-08-25T03:34:12.442Z prisma:client  query {
foxbard-muse-1  |   findUniqueKeyValueCache(where: {
foxbard-muse-1  |     key: "[\"\\\"HOT DEMON B!TCHES NEAR U ! ! !\\\" \\\"CORPSE\\\"\",{\"limit\":10}]"
foxbard-muse-1  |   }) {
foxbard-muse-1  |     key
foxbard-muse-1  |     value
foxbard-muse-1  |     expiresAt
foxbard-muse-1  |     createdAt
foxbard-muse-1  |     updatedAt
foxbard-muse-1  |   }
foxbard-muse-1  | }
foxbard-muse-1  | 
foxbard-muse-1  | 2022-08-25T03:34:12.442Z prisma:client:libraryEngine  sending request, this.libraryStarted: true
foxbard-muse-1  | 2022-08-25T03:34:12.445Z muse Cache hit: ["\"HOT DEMON B!TCHES NEAR U ! ! !\" \"CORPSE\"",{"limit":10}]
foxbard-muse-1  | 2022-08-25T03:34:12.446Z prisma:client  Prisma Client call:
foxbard-muse-1  | 2022-08-25T03:34:12.446Z prisma:client  prisma.keyValueCache.findUnique({
foxbard-muse-1  |   where: {
foxbard-muse-1  |     key: '["wqZnO71PBis"]'
foxbard-muse-1  |   }
foxbard-muse-1  | })
foxbard-muse-1  | 2022-08-25T03:34:12.446Z prisma:client  Generated request:
foxbard-muse-1  | 2022-08-25T03:34:12.446Z prisma:client  query {
foxbard-muse-1  |   findUniqueKeyValueCache(where: {
foxbard-muse-1  |     key: "[\"wqZnO71PBis\"]"
foxbard-muse-1  |   }) {
foxbard-muse-1  |     key
foxbard-muse-1  |     value
foxbard-muse-1  |     expiresAt
foxbard-muse-1  |     createdAt
foxbard-muse-1  |     updatedAt
foxbard-muse-1  |   }
foxbard-muse-1  | }
foxbard-muse-1  | 
foxbard-muse-1  | 2022-08-25T03:34:12.447Z prisma:client:libraryEngine  sending request, this.libraryStarted: true
foxbard-muse-1  | 2022-08-25T03:34:12.448Z muse Cache hit: ["wqZnO71PBis"]
foxbard-muse-1  | 2022-08-25T03:34:12.453Z prisma:client  Prisma Client call:
foxbard-muse-1  | 2022-08-25T03:34:12.453Z prisma:client  prisma.fileCache.findUnique({
foxbard-muse-1  |   where: {
foxbard-muse-1  |     hash: '06c726c818f4b12abb8654a6d463906f1678b3420da548c08c6849d650b1bec700155c01cac104750dbb673a947cf78b3f68e593ef6966ec3faf2293f61eed31'
foxbard-muse-1  |   }
foxbard-muse-1  | })
foxbard-muse-1  | 2022-08-25T03:34:12.453Z prisma:client  Generated request:
foxbard-muse-1  | 2022-08-25T03:34:12.453Z prisma:client  query {
foxbard-muse-1  |   findUniqueFileCache(where: {
foxbard-muse-1  |     hash: "06c726c818f4b12abb8654a6d463906f1678b3420da548c08c6849d650b1bec700155c01cac104750dbb673a947cf78b3f68e593ef6966ec3faf2293f61eed31"
foxbard-muse-1  |   }) {
foxbard-muse-1  |     hash
foxbard-muse-1  |     bytes
foxbard-muse-1  |     accessedAt
foxbard-muse-1  |     createdAt
foxbard-muse-1  |     updatedAt
foxbard-muse-1  |   }
foxbard-muse-1  | }
foxbard-muse-1  | 
foxbard-muse-1  | 2022-08-25T03:34:12.453Z prisma:client:libraryEngine  sending request, this.libraryStarted: true
foxbard-muse-1  | 2022-08-25T03:34:12.604Z muse [VOICE] received voice state update: {"member":{"user":{"username":"Fox Bard","public_flags":0,"id":"1011464424999096320","discriminator":"2201","bot":true,"avatar":"58f9494e90f5c35b3c78f4b46dfc992d"},"roles":["1011475913097101336","821971193426083860"],"premium_since":null,"pending":false,"nick":null,"mute":false,"joined_at":"2022-08-23T03:24:10.096000+00:00","flags":0,"deaf":false,"communication_disabled_until":null,"avatar":null},"user_id":"1011464424999096320","suppress":false,"session_id":"d32e8b7bba61ff82503db6dc6a0b8a97","self_video":false,"self_mute":false,"self_deaf":true,"request_to_speak_timestamp":null,"mute":false,"guild_id":"679166983484211210","deaf":false,"channel_id":"817881563517288501"}
foxbard-muse-1  | 2022-08-25T03:34:12.605Z prisma:client  Prisma Client call:
foxbard-muse-1  | 2022-08-25T03:34:12.605Z prisma:client  prisma.setting.findUnique({
foxbard-muse-1  |   where: {
foxbard-muse-1  |     guildId: '(REDACTED)'
foxbard-muse-1  |   }
foxbard-muse-1  | })
foxbard-muse-1  | 2022-08-25T03:34:12.605Z prisma:client  Generated request:
foxbard-muse-1  | 2022-08-25T03:34:12.605Z prisma:client  query {
foxbard-muse-1  |   findUniqueSetting(where: {
foxbard-muse-1  |     guildId: "(REDACTED)"
foxbard-muse-1  |   }) {
foxbard-muse-1  |     guildId
foxbard-muse-1  |     playlistLimit
foxbard-muse-1  |     secondsToWaitAfterQueueEmpties
foxbard-muse-1  |     leaveIfNoListeners
foxbard-muse-1  |     createdAt
foxbard-muse-1  |     updatedAt
foxbard-muse-1  |   }
foxbard-muse-1  | }
foxbard-muse-1  | 
foxbard-muse-1  | 2022-08-25T03:34:12.605Z prisma:client:libraryEngine  sending request, this.libraryStarted: true
foxbard-muse-1  | 2022-08-25T03:34:12.630Z muse [VOICE] received voice server: {"t":"VOICE_SERVER_UPDATE","s":14,"op":0,"d":{"token":"270ce5500b850960","guild_id":"679166983484211210","endpoint":"us-central9954.discord.media:443"}}
foxbard-muse-1  | 2022-08-25T03:34:13.218Z prisma:client  Prisma Client call:
foxbard-muse-1  | 2022-08-25T03:34:13.218Z prisma:client  prisma.setting.findUnique({
foxbard-muse-1  |   where: {
foxbard-muse-1  |     guildId: '(REDACTED)'
foxbard-muse-1  |   }
foxbard-muse-1  | })
foxbard-muse-1  | 2022-08-25T03:34:13.218Z prisma:client  Generated request:
foxbard-muse-1  | 2022-08-25T03:34:13.218Z prisma:client  query {
foxbard-muse-1  |   findUniqueSetting(where: {
foxbard-muse-1  |     guildId: "(REDACTED)"
foxbard-muse-1  |   }) {
foxbard-muse-1  |     guildId
foxbard-muse-1  |     playlistLimit
foxbard-muse-1  |     secondsToWaitAfterQueueEmpties
foxbard-muse-1  |     leaveIfNoListeners
foxbard-muse-1  |     createdAt
foxbard-muse-1  |     updatedAt
foxbard-muse-1  |   }
foxbard-muse-1  | }
foxbard-muse-1  | 
foxbard-muse-1  | 2022-08-25T03:34:13.218Z prisma:client:libraryEngine  sending request, this.libraryStarted: true
foxbard-muse-1  | 2022-08-25T03:34:13.220Z muse evalmachine.<anonymous>:344
foxbard-muse-1  | qma=function(a,b,c,d){var e=null;switch(b){case "JSON":try{var f=c.responseText}catch(h){throw d=Error("Error reading responseText"),d.params=a,ku(d),h;}a=c.getResponseHeader("Content-Type")||"";f&&0<=a.indexOf("json")&&(")]};Xka(ncode);
foxbard-muse-1  |                                                                                                                                                                                                                              ^^^^^^^^^^^^^^^^
foxbard-muse-1  | 
foxbard-muse-1  | SyntaxError: Invalid or unexpected token
foxbard-muse-1  |     at new Script (node:vm:100:7)
foxbard-muse-1  |     at Object.exports.decipherFormats (/usr/app/node_modules/ytdl-core/lib/sig.js:116:51)
foxbard-muse-1  |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
foxbard-muse-1  |     at async Promise.all (index 0)
foxbard-muse-1  |     at exports.getInfo (/usr/app/node_modules/ytdl-core/lib/info.js:401:17)
foxbard-muse-1  | 2022-08-25T03:34:43.358Z muse [VOICE] received voice state update: {"member":{"user":{"username":"Fox Bard","public_flags":0,"id":"1011464424999096320","discriminator":"2201","bot":true,"avatar":"58f9494e90f5c35b3c78f4b46dfc992d"},"roles":["1011475913097101336","821971193426083860"],"premium_since":null,"pending":false,"nick":null,"mute":false,"joined_at":"2022-08-23T03:24:10.096000+00:00","flags":0,"deaf":false,"communication_disabled_until":null,"avatar":null},"user_id":"1011464424999096320","suppress":false,"session_id":"d32e8b7bba61ff82503db6dc6a0b8a97","self_video":false,"self_mute":false,"self_deaf":true,"request_to_speak_timestamp":null,"mute":false,"guild_id":"679166983484211210","deaf":false,"channel_id":null}

Screenshots image

Additional context it was working the day before, and is doing it still even after a complete container rebuild.

Runtime I'm running Muse:

Versions

Codixer commented 2 years ago

I can confirm this issue!

Muse: 2.1.4 Docker: Ptero Install OS: Ubuntu 22.10 Container made through Ptero https://github.com/parkervcp/eggs/blob/master/bots/discord/discord.js/egg-discord-js-generic.json

Debug Log:

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

Running version 2.1.4 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  prisma.queryRaw(SELECT COUNT(id) FROM _prisma_migrations, []) +105ms
  prisma:client  Prisma Client call: +5ms
⠸ Applying database migrations...  prisma:client:libraryEngine:loader  Searching for Query Engine Library in /home/container/node_modules/.prisma/client +0ms
  prisma:client:libraryEngine:loader  loadEngine using /home/container/node_modules/.prisma/client/libquery_engine-debian-openssl-1.1.x.so.node +1ms
  prisma:client:libraryEngine:loader  Searching for Query Engine Library in /home/container/node_modules/.prisma/client +29ms
  prisma:client:libraryEngine:loader  loadEngine using /home/container/node_modules/.prisma/client/libquery_engine-debian-openssl-1.1.x.so.node +2ms
  prisma:client  Prisma Client call: +914ms
  prisma:client  prisma.$queryRaw({
  query: 'SELECT COUNT(id) FROM _prisma_migrations',
  parameters: {
    values: '[]',
    __prismaRawParamaters__: true
  }
}) +3ms
  prisma:client  Generated request: +3ms
  prisma:client  mutation {
  queryRaw(
    query: "SELECT COUNT(id) FROM _prisma_migrations"
    parameters: "[]"
  )
}
 +0ms
  prisma:client:libraryEngine  sending request, this.libraryStarted: false +1s
  prisma:client:libraryEngine  library starting +1ms
⠼ Applying database migrations...  prisma:client:libraryEngine  library started +5ms
✔ Database migrations applied.
  prisma:client  Prisma Client call: +4s
  prisma:client  prisma.fileCache.findMany({
  where: undefined,
  orderBy: {
    createdAt: 'asc'
  },
  take: 50
}) +8ms
  prisma:client  Generated request: +3ms
  prisma:client  query {
  findManyFileCache(
    orderBy: [
      {
        createdAt: asc
      }
    ]
    take: 50
  ) {
    hash
    bytes
    accessedAt
    createdAt
    updatedAt
  }
}
 +1ms
  prisma:client:libraryEngine  sending request, this.libraryStarted: false +4s
  prisma:client:libraryEngine  library starting +1ms
  prisma:client:libraryEngine  library started +3ms
  muse Evicting oldest files... +0ms
  prisma:client  Prisma Client call: +297ms
  prisma:client  prisma.fileCache.aggregate({
  select: {
    _sum: {
      select: {
        bytes: true
      }
    }
  }
}) +2ms
  prisma:client  Generated request: +4ms
  prisma:client  query {
  aggregateFileCache {
    _sum {
      bytes
    }
  }
}
 +1ms
  prisma:client:libraryEngine  sending request, this.libraryStarted: true +299ms
  superagent POST https://accounts.spotify.com/api/token +0ms
  superagent POST https://accounts.spotify.com/api/token +7ms
  superagent POST https://accounts.spotify.com/api/token +6ms
⠋ 📡 connecting to Discord...  muse Provided token: ODg2NzEzMTA5Nzk5MTI5MDk4.YT5l7w.*************************** +337ms
  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 2000000000 bytes. +17ms
  superagent POST https://accounts.spotify.com/api/token -> 200 +75ms
  superagent POST https://accounts.spotify.com/api/token -> 200 +5ms
⠙ 📡 connecting to Discord...  superagent POST https://accounts.spotify.com/api/token -> 200 +13ms
⠸ 📡 connecting to Discord...  muse [WS => Manager] Fetched Gateway Information
  muse     URL: wss://gateway.discord.gg
  muse     Recommended Shards: 1 +241ms
  muse [WS => Manager] Session Limit Information
  muse     Total: 1000
  muse     Remaining: 989 +0ms
  muse [WS => Manager] Spawning shards: 0 +0ms
  muse [WS => Shard 0] [CONNECT]
  muse     Gateway    : wss://gateway.discord.gg/
  muse     Version    : 10
  muse     Encoding   : json
  muse     Compression: none +2ms
  muse [WS => Shard 0] Setting a HELLO timeout for 20s. +0ms
⠴ 📡 connecting to Discord...  muse [WS => Shard 0] [CONNECTED] Took 197ms +198ms
  muse [WS => Shard 0] Clearing the HELLO timeout. +2ms
  muse [WS => Shard 0] Setting a heartbeat interval for 41250ms. +0ms
  muse [WS => Shard 0] [IDENTIFY] Shard 0/1 with intents: 1153 +0ms
⠸ 📡 connecting to Discord...  muse [WS => Shard 0] [READY] Session f76e9c1b0ae2628a194616d083d83916. +612ms
  muse [WS => Shard 0] [ReadyHeartbeat] Sending a heartbeat. +1ms
⠼ 📡 connecting to Discord...  muse Failed to find guild, or unknown type for channel 1008026343155437638 15 +136ms
⠴ 📡 connecting to Discord...  muse [WS => Shard 0] Shard received all its guilds. Marking as fully ready. +182ms
  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: 4.3.4-0+deb11u1
  muse - libopus: yes
  muse -------------------------------------------------- +4ms
  muse [WS => Shard 0] Heartbeat acknowledged, latency of 334ms. +12ms
✔ Ready! Invite the bot with https://discordapp.com/oauth2/authorize?client_id=886713109799129098&scope=bot%20applications.commands&permissions=36700160
  muse [VOICE] received voice state update: {"member":{"user":{"username":"PBeats","public_flags":0,"id":"886713109799129098","discriminator":"7846","bot":true,"avatar":"b528a20c4fd2ffa4df604ab25c3ddd3e"},"roles":["438141536421806083","1012418670246502515"],"premium_since":null,"pending":false,"nick":null,"mute":false,"joined_at":"2022-08-25T17:50:20.914000+00:00","flags":1,"deaf":false,"communication_disabled_until":null,"avatar":null},"user_id":"886713109799129098","suppress":false,"session_id":"25fd2e72fabc29608fc812c80ad50118","self_video":false,"self_mute":false,"self_deaf":true,"request_to_speak_timestamp":null,"mute":false,"guild_id":"438134543837560832","deaf":false,"channel_id":null} +13s
  prisma:client  Prisma Client call: +41s
  prisma:client  prisma.setting.findUnique({
  where: {
    guildId: '438134543837560832'
  }
}) +29ms
  prisma:client  Generated request: +0ms
  prisma:client  query {
  findUniqueSetting(where: {
    guildId: "438134543837560832"
  }) {
    guildId
    playlistLimit
    secondsToWaitAfterQueueEmpties
    leaveIfNoListeners
    createdAt
    updatedAt
  }
}
 +1ms
  prisma:client:libraryEngine  sending request, this.libraryStarted: true +41s
  prisma:client  Prisma Client call: +484ms
  prisma:client  prisma.keyValueCache.findUnique({
  where: {
    key: '["https://www.youtube.com/watch?v=bFwwG6a7J_g"]'
  }
}) +3ms
  prisma:client  Generated request: +1ms
  prisma:client  query {
  findUniqueKeyValueCache(where: {
    key: "[\"https://www.youtube.com/watch?v=bFwwG6a7J_g\"]"
  }) {
    key
    value
    expiresAt
    createdAt
    updatedAt
  }
}
 +0ms
  prisma:client:libraryEngine  sending request, this.libraryStarted: true +488ms
  muse Cache hit: ["https://www.youtube.com/watch?v=bFwwG6a7J_g"] +27s
  prisma:client  Prisma Client call: +543ms
  prisma:client  prisma.fileCache.findUnique({
  where: {
    hash: 'c944204603ed948f031461744ab83929d0d434754037a22d0db0d26d6a71eb51da9756856f8bac71af796071580e74c0a227daa45ab3b765014e0c4e8c128942'
  }
}) +3ms
  prisma:client  Generated request: +5ms
  prisma:client  query {
  findUniqueFileCache(where: {
    hash: "c944204603ed948f031461744ab83929d0d434754037a22d0db0d26d6a71eb51da9756856f8bac71af796071580e74c0a227daa45ab3b765014e0c4e8c128942"
  }) {
    hash
    bytes
    accessedAt
    createdAt
    updatedAt
  }
}
 +0ms
  prisma:client:libraryEngine  sending request, this.libraryStarted: true +545ms
  muse [WS => Shard 0] [HeartbeatTimer] Sending a heartbeat. +546ms
  muse [VOICE] received voice state update: {"member":{"user":{"username":"PBeats","public_flags":0,"id":"886713109799129098","discriminator":"7846","bot":true,"avatar":"b528a20c4fd2ffa4df604ab25c3ddd3e"},"roles":["438141536421806083","1012418670246502515"],"premium_since":null,"pending":false,"nick":null,"mute":false,"joined_at":"2022-08-25T17:50:20.914000+00:00","flags":1,"deaf":false,"communication_disabled_until":null,"avatar":null},"user_id":"886713109799129098","suppress":false,"session_id":"f76e9c1b0ae2628a194616d083d83916","self_video":false,"self_mute":false,"self_deaf":true,"request_to_speak_timestamp":null,"mute":false,"guild_id":"438134543837560832","deaf":false,"channel_id":"545569203936165888"} +30ms
  prisma:client  Prisma Client call: +260ms
  prisma:client  prisma.setting.findUnique({
  where: {
    guildId: '438134543837560832'
  }
}) +1ms
  prisma:client  Generated request: +1ms
  prisma:client  query {
  findUniqueSetting(where: {
    guildId: "438134543837560832"
  }) {
    guildId
    playlistLimit
    secondsToWaitAfterQueueEmpties
    leaveIfNoListeners
    createdAt
    updatedAt
  }
}
 +0ms
  prisma:client:libraryEngine  sending request, this.libraryStarted: true +261ms
  muse [VOICE] received voice server: {"t":"VOICE_SERVER_UPDATE","s":80,"op":0,"d":{"token":"9fd1063dd4729fcf","guild_id":"438134543837560832","endpoint":"rotterdam3555.discord.media:443"}} +231ms
  muse [WS => Shard 0] Heartbeat acknowledged, latency of 309ms. +48ms
  prisma:client  Prisma Client call: +1s
  prisma:client  prisma.setting.findUnique({
  where: {
    guildId: '438134543837560832'
  }
}) +1ms
  prisma:client  Generated request: +1ms
  prisma:client  query {
  findUniqueSetting(where: {
    guildId: "438134543837560832"
  }) {
    guildId
    playlistLimit
    secondsToWaitAfterQueueEmpties
    leaveIfNoListeners
    createdAt
    updatedAt
  }
}
 +0ms
  prisma:client:libraryEngine  sending request, this.libraryStarted: true +1s
  muse SyntaxError: Invalid or unexpected token
  muse     at new Script (node:vm:100:7)
  muse     at Object.exports.decipherFormats (/home/container/node_modules/ytdl-core/lib/sig.js:116:51)
  muse     at runMicrotasks (<anonymous>)
  muse     at processTicksAndRejections (node:internal/process/task_queues:96:5)
  muse     at async Promise.all (index 0)
  muse     at exports.getInfo (/home/container/node_modules/ytdl-core/lib/info.js:401:17) +984ms
andrescornejo commented 2 years ago

Much like the last time, it can be fixed updating ytdl-core: npm i ytdl-core@https://github.com/GreepTheSheep/node-ytdl-core

This worked for me both times, since the issue seems to rely on ytdl-core. However I am not running Muse inside a docker container. I'm not sure how to fix it if you're running in Docker.

github-actions[bot] commented 2 years ago

🚀 Released in Release v2.1.5.

samrudd commented 2 years ago

I can confirm this issue!

Muse: 2.1.4 Docker: Ptero Install OS: Ubuntu 22.10 Container made through Ptero https://github.com/parkervcp/eggs/blob/master/bots/discord/discord.js/egg-discord-js-generic.json

Debug Log:

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

Running version 2.1.4 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  prisma.queryRaw(SELECT COUNT(id) FROM _prisma_migrations, []) +105ms
  prisma:client  Prisma Client call: +5ms
⠸ Applying database migrations...  prisma:client:libraryEngine:loader  Searching for Query Engine Library in /home/container/node_modules/.prisma/client +0ms
  prisma:client:libraryEngine:loader  loadEngine using /home/container/node_modules/.prisma/client/libquery_engine-debian-openssl-1.1.x.so.node +1ms
  prisma:client:libraryEngine:loader  Searching for Query Engine Library in /home/container/node_modules/.prisma/client +29ms
  prisma:client:libraryEngine:loader  loadEngine using /home/container/node_modules/.prisma/client/libquery_engine-debian-openssl-1.1.x.so.node +2ms
  prisma:client  Prisma Client call: +914ms
  prisma:client  prisma.$queryRaw({
  query: 'SELECT COUNT(id) FROM _prisma_migrations',
  parameters: {
    values: '[]',
    __prismaRawParamaters__: true
  }
}) +3ms
  prisma:client  Generated request: +3ms
  prisma:client  mutation {
  queryRaw(
    query: "SELECT COUNT(id) FROM _prisma_migrations"
    parameters: "[]"
  )
}
 +0ms
  prisma:client:libraryEngine  sending request, this.libraryStarted: false +1s
  prisma:client:libraryEngine  library starting +1ms
⠼ Applying database migrations...  prisma:client:libraryEngine  library started +5ms
✔ Database migrations applied.
  prisma:client  Prisma Client call: +4s
  prisma:client  prisma.fileCache.findMany({
  where: undefined,
  orderBy: {
    createdAt: 'asc'
  },
  take: 50
}) +8ms
  prisma:client  Generated request: +3ms
  prisma:client  query {
  findManyFileCache(
    orderBy: [
      {
        createdAt: asc
      }
    ]
    take: 50
  ) {
    hash
    bytes
    accessedAt
    createdAt
    updatedAt
  }
}
 +1ms
  prisma:client:libraryEngine  sending request, this.libraryStarted: false +4s
  prisma:client:libraryEngine  library starting +1ms
  prisma:client:libraryEngine  library started +3ms
  muse Evicting oldest files... +0ms
  prisma:client  Prisma Client call: +297ms
  prisma:client  prisma.fileCache.aggregate({
  select: {
    _sum: {
      select: {
        bytes: true
      }
    }
  }
}) +2ms
  prisma:client  Generated request: +4ms
  prisma:client  query {
  aggregateFileCache {
    _sum {
      bytes
    }
  }
}
 +1ms
  prisma:client:libraryEngine  sending request, this.libraryStarted: true +299ms
  superagent POST https://accounts.spotify.com/api/token +0ms
  superagent POST https://accounts.spotify.com/api/token +7ms
  superagent POST https://accounts.spotify.com/api/token +6ms
⠋ 📡 connecting to Discord...  muse Provided token: ODg2NzEzMTA5Nzk5MTI5MDk4.YT5l7w.*************************** +337ms
  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 2000000000 bytes. +17ms
  superagent POST https://accounts.spotify.com/api/token -> 200 +75ms
  superagent POST https://accounts.spotify.com/api/token -> 200 +5ms
⠙ 📡 connecting to Discord...  superagent POST https://accounts.spotify.com/api/token -> 200 +13ms
⠸ 📡 connecting to Discord...  muse [WS => Manager] Fetched Gateway Information
  muse     URL: wss://gateway.discord.gg
  muse     Recommended Shards: 1 +241ms
  muse [WS => Manager] Session Limit Information
  muse     Total: 1000
  muse     Remaining: 989 +0ms
  muse [WS => Manager] Spawning shards: 0 +0ms
  muse [WS => Shard 0] [CONNECT]
  muse     Gateway    : wss://gateway.discord.gg/
  muse     Version    : 10
  muse     Encoding   : json
  muse     Compression: none +2ms
  muse [WS => Shard 0] Setting a HELLO timeout for 20s. +0ms
⠴ 📡 connecting to Discord...  muse [WS => Shard 0] [CONNECTED] Took 197ms +198ms
  muse [WS => Shard 0] Clearing the HELLO timeout. +2ms
  muse [WS => Shard 0] Setting a heartbeat interval for 41250ms. +0ms
  muse [WS => Shard 0] [IDENTIFY] Shard 0/1 with intents: 1153 +0ms
⠸ 📡 connecting to Discord...  muse [WS => Shard 0] [READY] Session f76e9c1b0ae2628a194616d083d83916. +612ms
  muse [WS => Shard 0] [ReadyHeartbeat] Sending a heartbeat. +1ms
⠼ 📡 connecting to Discord...  muse Failed to find guild, or unknown type for channel 1008026343155437638 15 +136ms
⠴ 📡 connecting to Discord...  muse [WS => Shard 0] Shard received all its guilds. Marking as fully ready. +182ms
  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: 4.3.4-0+deb11u1
  muse - libopus: yes
  muse -------------------------------------------------- +4ms
  muse [WS => Shard 0] Heartbeat acknowledged, latency of 334ms. +12ms
✔ Ready! Invite the bot with https://discordapp.com/oauth2/authorize?client_id=886713109799129098&scope=bot%20applications.commands&permissions=36700160
  muse [VOICE] received voice state update: {"member":{"user":{"username":"PBeats","public_flags":0,"id":"886713109799129098","discriminator":"7846","bot":true,"avatar":"b528a20c4fd2ffa4df604ab25c3ddd3e"},"roles":["438141536421806083","1012418670246502515"],"premium_since":null,"pending":false,"nick":null,"mute":false,"joined_at":"2022-08-25T17:50:20.914000+00:00","flags":1,"deaf":false,"communication_disabled_until":null,"avatar":null},"user_id":"886713109799129098","suppress":false,"session_id":"25fd2e72fabc29608fc812c80ad50118","self_video":false,"self_mute":false,"self_deaf":true,"request_to_speak_timestamp":null,"mute":false,"guild_id":"438134543837560832","deaf":false,"channel_id":null} +13s
  prisma:client  Prisma Client call: +41s
  prisma:client  prisma.setting.findUnique({
  where: {
    guildId: '438134543837560832'
  }
}) +29ms
  prisma:client  Generated request: +0ms
  prisma:client  query {
  findUniqueSetting(where: {
    guildId: "438134543837560832"
  }) {
    guildId
    playlistLimit
    secondsToWaitAfterQueueEmpties
    leaveIfNoListeners
    createdAt
    updatedAt
  }
}
 +1ms
  prisma:client:libraryEngine  sending request, this.libraryStarted: true +41s
  prisma:client  Prisma Client call: +484ms
  prisma:client  prisma.keyValueCache.findUnique({
  where: {
    key: '["https://www.youtube.com/watch?v=bFwwG6a7J_g"]'
  }
}) +3ms
  prisma:client  Generated request: +1ms
  prisma:client  query {
  findUniqueKeyValueCache(where: {
    key: "[\"https://www.youtube.com/watch?v=bFwwG6a7J_g\"]"
  }) {
    key
    value
    expiresAt
    createdAt
    updatedAt
  }
}
 +0ms
  prisma:client:libraryEngine  sending request, this.libraryStarted: true +488ms
  muse Cache hit: ["https://www.youtube.com/watch?v=bFwwG6a7J_g"] +27s
  prisma:client  Prisma Client call: +543ms
  prisma:client  prisma.fileCache.findUnique({
  where: {
    hash: 'c944204603ed948f031461744ab83929d0d434754037a22d0db0d26d6a71eb51da9756856f8bac71af796071580e74c0a227daa45ab3b765014e0c4e8c128942'
  }
}) +3ms
  prisma:client  Generated request: +5ms
  prisma:client  query {
  findUniqueFileCache(where: {
    hash: "c944204603ed948f031461744ab83929d0d434754037a22d0db0d26d6a71eb51da9756856f8bac71af796071580e74c0a227daa45ab3b765014e0c4e8c128942"
  }) {
    hash
    bytes
    accessedAt
    createdAt
    updatedAt
  }
}
 +0ms
  prisma:client:libraryEngine  sending request, this.libraryStarted: true +545ms
  muse [WS => Shard 0] [HeartbeatTimer] Sending a heartbeat. +546ms
  muse [VOICE] received voice state update: {"member":{"user":{"username":"PBeats","public_flags":0,"id":"886713109799129098","discriminator":"7846","bot":true,"avatar":"b528a20c4fd2ffa4df604ab25c3ddd3e"},"roles":["438141536421806083","1012418670246502515"],"premium_since":null,"pending":false,"nick":null,"mute":false,"joined_at":"2022-08-25T17:50:20.914000+00:00","flags":1,"deaf":false,"communication_disabled_until":null,"avatar":null},"user_id":"886713109799129098","suppress":false,"session_id":"f76e9c1b0ae2628a194616d083d83916","self_video":false,"self_mute":false,"self_deaf":true,"request_to_speak_timestamp":null,"mute":false,"guild_id":"438134543837560832","deaf":false,"channel_id":"545569203936165888"} +30ms
  prisma:client  Prisma Client call: +260ms
  prisma:client  prisma.setting.findUnique({
  where: {
    guildId: '438134543837560832'
  }
}) +1ms
  prisma:client  Generated request: +1ms
  prisma:client  query {
  findUniqueSetting(where: {
    guildId: "438134543837560832"
  }) {
    guildId
    playlistLimit
    secondsToWaitAfterQueueEmpties
    leaveIfNoListeners
    createdAt
    updatedAt
  }
}
 +0ms
  prisma:client:libraryEngine  sending request, this.libraryStarted: true +261ms
  muse [VOICE] received voice server: {"t":"VOICE_SERVER_UPDATE","s":80,"op":0,"d":{"token":"9fd1063dd4729fcf","guild_id":"438134543837560832","endpoint":"rotterdam3555.discord.media:443"}} +231ms
  muse [WS => Shard 0] Heartbeat acknowledged, latency of 309ms. +48ms
  prisma:client  Prisma Client call: +1s
  prisma:client  prisma.setting.findUnique({
  where: {
    guildId: '438134543837560832'
  }
}) +1ms
  prisma:client  Generated request: +1ms
  prisma:client  query {
  findUniqueSetting(where: {
    guildId: "438134543837560832"
  }) {
    guildId
    playlistLimit
    secondsToWaitAfterQueueEmpties
    leaveIfNoListeners
    createdAt
    updatedAt
  }
}
 +0ms
  prisma:client:libraryEngine  sending request, this.libraryStarted: true +1s
  muse SyntaxError: Invalid or unexpected token
  muse     at new Script (node:vm:100:7)
  muse     at Object.exports.decipherFormats (/home/container/node_modules/ytdl-core/lib/sig.js:116:51)
  muse     at runMicrotasks (<anonymous>)
  muse     at processTicksAndRejections (node:internal/process/task_queues:96:5)
  muse     at async Promise.all (index 0)
  muse     at exports.getInfo (/home/container/node_modules/ytdl-core/lib/info.js:401:17) +984ms

i get as far as this with trying to deploy with that method

TypeError [ERR_IMPORT_ASSERTION_TYPE_MISSING]: Module "file:///home/container/package.json" needs an import assertion of type "json" at new NodeError (node:internal/errors:387:5) at validateAssertions (node:internal/modules/esm/assert:82:15) at defaultLoad (node:internal/modules/esm/load:84:3) at nextLoad (node:internal/modules/esm/loader:165:28) at ESMLoader.load (node:internal/modules/esm/loader:608:26) at ESMLoader.moduleProvider (node:internal/modules/esm/loader:464:22) at new ModuleJob (node:internal/modules/esm/module_job:63:26) at ESMLoader.#createModuleJob (node:internal/modules/esm/loader:483:17) at ESMLoader.getModuleJob (node:internal/modules/esm/loader:441:34) at async Promise.all (index 0) { code: 'ERR_IMPORT_ASSERTION_TYPE_MISSING' }

Regards

codetheweb commented 2 years ago

@samrudd I think your error is unrelated, you seem to be using a strange deploy method. Are you able to use the Docker image instead?

Please open a new issue if you need further help.