museofficial / muse

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

freezes at "πŸ“‘ updating commands in all guilds..." #743

Closed filip2cz closed 2 years ago

filip2cz commented 2 years ago

What's happening? It freeze in β Ό πŸ“‘ updating commands in all guilds.... Bot commands do not working, but he is online.

Logs

yarn run v1.22.15
$ npm run env:set-database-url -- esmo src/scripts/migrate-and-start.ts
  agentkeepalive sock[0#registry.yarnpkg.com:443::::::::true:::::::::::::] create, timeout 300001ms +0ms

> muse@2.1.1 env:set-database-url
> esmo src/scripts/run-with-database-url.ts "esmo" "src/scripts/migrate-and-start.ts"

  agentkeepalive sock[0#registry.yarnpkg.com:443::::::::true:::::::::::::](requests: 1, finished: 1) free +140ms
(node:53) ExperimentalWarning: --experimental-loader is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
(node:53) DeprecationWarning: Obsolete loader hook(s) supplied and will be ignored: getFormat, transformSource
(node:89) ExperimentalWarning: --experimental-loader is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
(node:89) DeprecationWarning: Obsolete loader hook(s) supplied and will be ignored: getFormat, transformSource
  prisma:tryLoadEnv Environment variables not found at null +0ms
  prisma:tryLoadEnv Environment variables not found at undefined +1ms
  prisma:tryLoadEnv No Environment variables loaded +0ms
  prisma:tryLoadEnv Environment variables not found at null +291ms
  prisma:tryLoadEnv Environment variables not found at undefined +1ms
  prisma:tryLoadEnv No Environment variables loaded +0ms
  prisma:client dirname /usr/app/node_modules/.prisma/client +0ms
  prisma:client relativePath ../../.. +0ms
  prisma:client cwd /usr/app +0ms
  prisma:client clientVersion: 3.14.0 +5ms
  prisma:client clientEngineType: library +0ms
  prisma:client:libraryEngine internalSetup +0ms
  prisma:tryLoadEnv Environment variables not found at null +641ms
  prisma:tryLoadEnv Environment variables not found at undefined +1ms
  prisma:tryLoadEnv No Environment variables loaded +0ms
  prisma:client dirname /usr/app/node_modules/.prisma/client +637ms
  prisma:client relativePath ../../.. +0ms
  prisma:client cwd /usr/app +1ms
  prisma:client clientVersion: 3.14.0 +2ms
  prisma:client clientEngineType: library +0ms
  prisma:client:libraryEngine internalSetup +640ms
========================================
========================================
================= muse =================
========================================
=========== Made with 🎢 by ============
==== https://github.com/codetheweb =====
========================================
========================================

Running version 2.1.1 built on 7/16/2022 (commit 60264a3950a6b6a76aa5856b5934074640c43a5f)

πŸ”§ 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, []) +120ms
  prisma:client Prisma Client call: +1ms
  prisma:client Prisma Client call: +10ms
  prisma:client prisma.$queryRaw({
  prisma:client   query: 'SELECT COUNT(id) FROM _prisma_migrations',
  prisma:client   parameters: {
  prisma:client     values: '[]',
  prisma:client     __prismaRawParamaters__: true
  prisma:client   }
  prisma:client }) +6ms
  prisma:client Generated request: +0ms
  prisma:client mutation {
  prisma:client   queryRaw(
  prisma:client     query: "SELECT COUNT(id) FROM _prisma_migrations"
  prisma:client     parameters: "[]"
  prisma:client   )
  prisma:client }
  prisma:client  +1ms
  prisma:client:libraryEngine sending request, this.libraryStarted: false +139ms
β Ή Applying database migrations...  prisma:client:libraryEngine Searching for Query Engine Library in /usr/app/node_modules/.prisma/client +209ms
  prisma:client:libraryEngine loadEngine using /usr/app/node_modules/.prisma/client/libquery_engine-linux-arm64-openssl-1.1.x.so.node +0ms
  prisma:client:libraryEngine library starting +54ms
β Έ Applying database migrations...  prisma:client:libraryEngine Searching for Query Engine Library in /usr/app/node_modules/.prisma/client +2ms
  prisma:client:libraryEngine loadEngine using /usr/app/node_modules/.prisma/client/libquery_engine-linux-arm64-openssl-1.1.x.so.node +0ms
  prisma:client:libraryEngine library started +28ms
βœ” Database migrations applied.
  prisma:client Prisma Client call: +2s
  prisma:client prisma.fileCache.findMany({
  prisma:client   where: undefined,
  prisma:client   orderBy: {
  prisma:client     createdAt: 'asc'
  prisma:client   },
  prisma:client   take: 50
  prisma:client }) +1ms
  prisma:client Generated request: +0ms
  prisma:client query {
  prisma:client   findManyFileCache(
  prisma:client     orderBy: [
  prisma:client       {
  prisma:client         createdAt: asc
  prisma:client       }
  prisma:client     ]
  prisma:client     take: 50
  prisma:client   ) {
  prisma:client     hash
  prisma:client     bytes
  prisma:client     accessedAt
  prisma:client     createdAt
  prisma:client     updatedAt
  prisma:client   }
  prisma:client }
  prisma:client  +0ms
  prisma:client:libraryEngine sending request, this.libraryStarted: false +1s
  prisma:client:libraryEngine library starting +0ms
  prisma:client:libraryEngine library started +3ms
  muse Evicting oldest files... +0ms
  prisma:client Prisma Client call: +15ms
  prisma:client prisma.fileCache.aggregate({
  prisma:client   select: {
  prisma:client     _sum: {
  prisma:client       select: {
  prisma:client         bytes: true
  prisma:client       }
  prisma:client     }
  prisma:client   }
  prisma:client }) +1ms
  prisma:client Generated request: +1ms
  prisma:client query {
  prisma:client   aggregateFileCache {
  prisma:client     _sum {
  prisma:client       bytes
  prisma:client     }
  prisma:client   }
  prisma:client }
  prisma:client  +0ms
  prisma:client:libraryEngine sending request, this.libraryStarted: true +14ms
  superagent POST https://accounts.spotify.com/api/token +0ms
  superagent POST https://accounts.spotify.com/api/token +9ms
  superagent POST https://accounts.spotify.com/api/token +6ms
β ‹ πŸ“‘ connecting to Discord...  muse Provided token: ODk0NjcyNjU0MDcyNjc2MzUz.G1zKYh.************************************** +56ms
  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. +7ms
  superagent POST https://accounts.spotify.com/api/token -> 200 +65ms
  superagent POST https://accounts.spotify.com/api/token -> 200 +6ms
  superagent POST https://accounts.spotify.com/api/token -> 200 +2ms
β Ή πŸ“‘ connecting to Discord...  muse [WS => Manager] Fetched Gateway Information
  muse     URL: wss://gateway.discord.gg
  muse     Recommended Shards: 1 +155ms
  muse [WS => Manager] Session Limit Information
  muse     Total: 1000
  muse     Remaining: 997 +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 +1ms
  muse [WS => Shard 0] Setting a HELLO timeout for 20s. +0ms
β Έ πŸ“‘ connecting to Discord...  muse [WS => Shard 0] [CONNECTED] Took 123ms +123ms
  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 06d37cf94aca233cdb8cf1b484c8387d. +253ms
  muse [WS => Shard 0] [ReadyHeartbeat] Sending a heartbeat. +1ms
β ‡ πŸ“‘ connecting to Discord...  muse [WS => Shard 0] Shard received all its guilds. Marking as fully ready. +113ms
  muse --------------------------------------------------
  muse Core Dependencies
  muse - @discordjs/voice: 0.10.0-dev
  muse - prism-media: 1.3.2
  muse
  muse Opus Libraries
  muse - @discordjs/opus: 0.7.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.1.9-0+deb10u1
  muse - libopus: yes
  muse -------------------------------------------------- +3ms
  muse [WS => Shard 0] Heartbeat acknowledged, latency of 127ms. +11ms
β ‹ πŸ“‘ updating commands in all guilds...DiscordAPIError[50001]: Missing Access
    at SequentialHandler.runRequest (file:///usr/app/node_modules/@discordjs/rest/dist/index.mjs:670:15)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async SequentialHandler.queueRequest (file:///usr/app/node_modules/@discordjs/rest/dist/index.mjs:473:14)
    at async registerCommandsOnGuild (file:///usr/app/src/utils/register-commands-on-guild.ts:3:3)
    at async file:///usr/app/src/bot.ts:111:13
    at async Promise.all (index 0)
    at async Client.<anonymous> (file:///usr/app/src/bot.ts:109:9) {
  rawError: { message: 'Missing Access', code: 50001 },
  code: 50001,
  status: 403,
  method: 'put',
  url: 'https://discord.com/api/v10/applications/894672654072676353/guilds/566706499276242964/commands',
  requestBody: {
    files: undefined,
    json: [
      [Object], [Object], [Object],
      [Object], [Object], [Object],
      [Object], [Object], [Object],
      [Object], [Object], [Object],
      [Object], [Object], [Object],
      [Object], [Object], [Object],
      [Object]
    ]
  }
}
β ™ πŸ“‘ updating commands in all guilds...  agentkeepalive sock[0#registry.yarnpkg.com:443::::::::true:::::::::::::](requests: 1, finished: 1) timeout after 15000ms, listeners 2, defaultTimeoutListenerCount 3, hasHttpRequest false, HttpRequest timeoutListenerCount 0 +15s
  agentkeepalive timeout listeners: onTimeout, onTimeout +1ms
  agentkeepalive sock[0#registry.yarnpkg.com:443::::::::true:::::::::::::] is free, destroy quietly +1ms
  agentkeepalive sock[0#registry.yarnpkg.com:443::::::::true:::::::::::::](requests: 1, finished: 1) close, isError: false +0ms
β § πŸ“‘ updating commands in all guilds...  muse [WS => Shard 0] [HeartbeatTimer] Sending a heartbeat. +41s
⠏ πŸ“‘ updating commands in all guilds...  muse [WS => Shard 0] Heartbeat acknowledged, latency of 106ms. +107ms
β Ή πŸ“‘ updating commands in all guilds...  muse [WS => Shard 0] [HeartbeatTimer] Sending a heartbeat. +41s
β Έ πŸ“‘ updating commands in all guilds...  muse [WS => Shard 0] Heartbeat acknowledged, latency of 107ms. +108ms
β § πŸ“‘ updating commands in all guilds...  muse [WS => Shard 0] [HeartbeatTimer] Sending a heartbeat. +41s
β ‡ πŸ“‘ updating commands in all guilds...  muse [WS => Shard 0] Heartbeat acknowledged, latency of 108ms. +110ms
β ™ πŸ“‘ updating commands in all guilds...  muse [WS => Shard 0] [HeartbeatTimer] Sending a heartbeat. +41s
β Έ πŸ“‘ updating commands in all guilds...

Runtime I'm running Muse inside a Docker container.

Versions

codetheweb commented 2 years ago

I see

DiscordAPIError[50001]: Missing Access

Can you try kicking Muse and re-inviting with the link that Muse logs?

filip2cz commented 2 years ago

I see

DiscordAPIError[50001]: Missing Access

Can you try kicking Muse and re-inviting with the link that Muse logs?

Which link?

codetheweb commented 2 years ago

For example:

Screen Shot 2022-07-27 at 5 54 17 PM

filip2cz commented 2 years ago

sorry, i closed it :D

filip2cz commented 2 years ago

For example:

Screen Shot 2022-07-27 at 5 54 17 PM

it froze on "πŸ“‘ updating commands in all guilds...", it didn't print this link as seen in the log

codetheweb commented 2 years ago

Try deleting db.sqlite (assuming there's nothing important stored for your guilds).

filip2cz commented 2 years ago

Try deleting db.sqlite (assuming there's nothing important stored for your guilds).

I tried, nothing changed.

codetheweb commented 2 years ago

If you

  1. Shutdown Muse
  2. Delete db.sqlite
  3. Restart Muse

All existing data should be cleared and an invite link will be printed.

filip2cz commented 2 years ago

If you

1. Shutdown Muse

2. Delete db.sqlite

3. Restart Muse

All existing data should be cleared and an invite link will be printed.

As I wrote, I've already done it, but I can try it a second or third time if it makes you happy.

codetheweb commented 2 years ago

Sorry, I didn't mean to be rude.

Try kicking Muse as well from all the servers it's currently in.

filip2cz commented 2 years ago

Sorry, I didn't mean to be rude.

Try kicking Muse as well from all the servers it's currently in.

It worked, thanks