museofficial / muse

šŸŽ§ a self-hosted midwestern Discord music bot that doesn't suck
MIT License
865 stars 224 forks source link

Bot crashes on latest version #942

Open SnowJuli opened 1 year ago

SnowJuli commented 1 year ago

What's happening? The container of muse is throwing a Timeout error after trying to start the bot.

Logs

$ npm run env:set-database-url -- tsx src/scripts/migrate-and-start.ts

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

========================================
========================================
================= muse =================
========================================
=========== Made with šŸŽ¶ by ============
==== https://github.com/codetheweb =====
========================================
========================================

Running version 2.3.0 built on 5/14/2023 (commit 47a2adb1dd2b9a409b31fdda536574aeac6901d7)

šŸ”§ 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...
āœ” Database migrations applied.
- šŸ“” connecting to Discord...
node:internal/process/promises:288
            triggerUncaughtException(err, true /* fromPromise */);
            ^

/usr/app/node_modules/undici/lib/core/connect.js:131
  util.destroy(socket, new ConnectTimeoutError())
                       ^

ConnectTimeoutError: Connect Timeout Error
    at onConnectTimeout (/usr/app/node_modules/undici/lib/core/connect.js:131:24)
    at onConnectTimeout (/usr/app/node_modules/undici/lib/core/connect.js:78:46)
    at Immediate._onImmediate (/usr/app/node_modules/undici/lib/core/connect.js:119:9)
    at process.processImmediate (node:internal/timers:471:21) {
  code: 'UND_ERR_CONNECT_TIMEOUT'
}

Node.js v18.7.0
Error: Command failed with exit code 1: tsx src/scripts/migrate-and-start.ts
    at makeError (/usr/app/node_modules/execa/lib/null:59:11)
    at handlePromise (/usr/app/node_modules/execa/null:119:26)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at <anonymous> (/usr/app/src/scripts/run-with-database-url.ts:6:3) {
  shortMessage: 'Command failed with exit code 1: tsx src/scripts/migrate-and-start.ts',
  command: 'tsx src/scripts/migrate-and-start.ts',
  escapedCommand: 'tsx "src/scripts/migrate-and-start.ts"',
  exitCode: 1,
  signal: undefined,
  signalDescription: undefined,
  stdout: undefined,
  stderr: undefined,
  failed: true,
  timedOut: false,
  isCanceled: false,
  killed: false
}

Screenshots N/A

Additional context It also crashed on the version before and even an update didn't fix it. I also deleted the muse directory where the database and cache is stored.

Runtime I'm running Muse:

Versions

peterdanludwig commented 1 year ago

Identical issue here but I'm running on UNRAID 6.11.5

JuenTingShie commented 1 year ago

Same here, using docker-compose to run latest version of muse(2.3.0 built on 5/14/2023 (commit 47a2adb1dd2b9a409b31fdda536574aeac6901d7))

but only when I play live stream music like: https://www.youtube.com/watch?v=MVPTGNGiI-4

not seeing any exception in docker logs

SnowJuli commented 1 year ago

@codetheweb just a ping to make you aware of the issue.

codetheweb commented 1 year ago

This is unrelated to Muse, it's some sort of network issue. Try running a different Discord bot under the same conditions, I would expect that wouldn't work either.

@JuenTingShie livestreams are working for me but that sounds like a different problem, please open a new issue if you'd like to discuss further.