question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: could not find settings for guild

See original GitHub issue

What’s happening? Deploying a new installation using docker results in the following errors on launch. Bot has been invited with the required permissions and tokens, ids, keys, and secrets have been set in docker-compose file. Previously running on v1.4.0 without any issues until after upgrade was performed. Going back a version results in the same problems.

Logs

musicbot | yarn run v1.22.15
musicbot | $ npm run env:set-database-url -- esmo src/scripts/migrate-and-start.ts
musicbot |
musicbot | > muse@1.9.0 env:set-database-url
musicbot | > esmo src/scripts/run-with-database-url.ts "esmo" "src/scripts/migrate-and-start.ts"
musicbot |
musicbot | (node:53) ExperimentalWarning: --experimental-loader is an experimental feature. This feature could change at any time
musicbot | (Use `node --trace-warnings ...` to show where the warning was created)
musicbot | (node:53) DeprecationWarning: Obsolete loader hook(s) supplied and will be ignored: getFormat, transformSource
musicbot | (node:87) ExperimentalWarning: --experimental-loader is an experimental feature. This feature could change at any time
musicbot | (Use `node --trace-warnings ...` to show where the warning was created)
musicbot | (node:87) DeprecationWarning: Obsolete loader hook(s) supplied and will be ignored: getFormat, transformSource
musicbot | 2022-04-28T02:39:05.232Z prisma:tryLoadEnv Environment variables not found at null
musicbot | 2022-04-28T02:39:05.233Z prisma:tryLoadEnv Environment variables not found at undefined
musicbot | 2022-04-28T02:39:05.233Z prisma:tryLoadEnv No Environment variables loaded
musicbot | 2022-04-28T02:39:05.611Z prisma:tryLoadEnv Environment variables not found at null
musicbot | 2022-04-28T02:39:05.612Z prisma:tryLoadEnv Environment variables not found at undefined
musicbot | 2022-04-28T02:39:05.612Z prisma:tryLoadEnv No Environment variables loaded
musicbot | 2022-04-28T02:39:05.619Z prisma:client clientVersion: 3.11.0
musicbot | 2022-04-28T02:39:05.619Z prisma:client clientEngineType: library
musicbot | 2022-04-28T02:39:05.621Z prisma:client:libraryEngine internalSetup
musicbot | 2022-04-28T02:39:06.212Z prisma:tryLoadEnv Environment variables not found at null
musicbot | 2022-04-28T02:39:06.212Z prisma:tryLoadEnv Environment variables not found at undefined
musicbot | 2022-04-28T02:39:06.212Z prisma:tryLoadEnv No Environment variables loaded
musicbot | 2022-04-28T02:39:06.214Z prisma:client clientVersion: 3.11.0
musicbot | 2022-04-28T02:39:06.214Z prisma:client clientEngineType: library
musicbot | 2022-04-28T02:39:06.214Z prisma:client:libraryEngine internalSetup
musicbot | ========================================
musicbot | ========================================
musicbot | ================= muse =================
musicbot | ========================================
musicbot | =========== Made with 🎶 by ============
musicbot | ==== https://github.com/codetheweb =====
musicbot | ========================================
musicbot | ========================================
musicbot |
musicbot | Running version 1.9.0 built on 4/23/2022 (commit 1ef05aba9d2e692ef365721f725be2d2a4e464d9)
musicbot |
musicbot | 🔧 Need help? https://github.com/codetheweb/muse/discussions/new
musicbot | 🐛 Bug? https://github.com/codetheweb/muse/issues/new
musicbot | ✨ New feature? https://github.com/codetheweb/muse/issues/new
musicbot | ☕ Discussion? https://github.com/codetheweb/muse/discussions/new
musicbot | 💰 Help me? https://www.paypal.me/codetheweb https://github.com/sponsors/codetheweb
musicbot |
musicbot |
musicbot | - Applying database migrations...
musicbot | 2022-04-28T02:39:06.308Z prisma:client prisma.queryRaw(SELECT COUNT(id) FROM _prisma_migrations, [])
musicbot | 2022-04-28T02:39:06.309Z prisma:client Prisma Client call:
musicbot | 2022-04-28T02:39:06.314Z prisma:client Prisma Client call:
musicbot | 2022-04-28T02:39:06.317Z prisma:client prisma.queryRaw({
musicbot |   query: 'SELECT COUNT(id) FROM _prisma_migrations',
musicbot |   parameters: {
musicbot |     values: '[]',
musicbot |     __prismaRawParamaters__: true
musicbot |   }
musicbot | })
musicbot | 2022-04-28T02:39:06.317Z prisma:client Generated request:
musicbot | 2022-04-28T02:39:06.317Z prisma:client mutation {
musicbot |   queryRaw(
musicbot |     query: "SELECT COUNT(id) FROM _prisma_migrations"
musicbot |     parameters: "[]"
musicbot |   )
musicbot | }
musicbot |
musicbot | 2022-04-28T02:39:06.318Z prisma:client:libraryEngine sending request, this.libraryStarted: false
musicbot | 2022-04-28T02:39:06.467Z prisma:client:libraryEngine Searching for Query Engine Library in /usr/app/node_modules/.prisma/client
musicbot | 2022-04-28T02:39:06.467Z prisma:client:libraryEngine loadEngine using /usr/app/node_modules/.prisma/client/libquery_engine-debian-openssl-1.1.x.so.node
musicbot | 2022-04-28T02:39:06.478Z prisma:client:libraryEngine library starting
musicbot | 2022-04-28T02:39:06.480Z prisma:client:libraryEngine Searching for Query Engine Library in /usr/app/node_modules/.prisma/client
musicbot | 2022-04-28T02:39:06.480Z prisma:client:libraryEngine loadEngine using /usr/app/node_modules/.prisma/client/libquery_engine-debian-openssl-1.1.x.so.node
musicbot | 2022-04-28T02:39:06.489Z prisma:client:libraryEngine library started
musicbot | ✔ Database migrations applied.
musicbot | 2022-04-28T02:39:08.328Z prisma:client Prisma Client call:
musicbot | 2022-04-28T02:39:08.328Z prisma:client prisma.fileCache.findMany({
musicbot |   where: undefined,
musicbot |   orderBy: {
musicbot |     createdAt: 'asc'
musicbot |   },
musicbot |   take: 50
musicbot | })
musicbot | 2022-04-28T02:39:08.329Z prisma:client Generated request:
musicbot | 2022-04-28T02:39:08.329Z prisma:client query {
musicbot |   findManyFileCache(
musicbot |     orderBy: [
musicbot |       {
musicbot |         createdAt: asc
musicbot |       }
musicbot |     ]
musicbot |     take: 50
musicbot |   ) {
musicbot |     hash
musicbot |     bytes
musicbot |     accessedAt
musicbot |     createdAt
musicbot |     updatedAt
musicbot |   }
musicbot | }
musicbot |
musicbot | 2022-04-28T02:39:08.329Z prisma:client:libraryEngine sending request, this.libraryStarted: false
musicbot | 2022-04-28T02:39:08.329Z prisma:client:libraryEngine library starting
musicbot | 2022-04-28T02:39:08.332Z prisma:client:libraryEngine library started
musicbot | 2022-04-28T02:39:08.336Z muse Evicting oldest files...
musicbot | 2022-04-28T02:39:08.338Z prisma:client Prisma Client call:
musicbot | 2022-04-28T02:39:08.338Z prisma:client prisma.fileCache.aggregate({
musicbot |   select: {
musicbot |     _sum: {
musicbot |       select: {
musicbot |         bytes: true
musicbot |       }
musicbot |     }
musicbot |   }
musicbot | })
musicbot | 2022-04-28T02:39:08.338Z prisma:client Generated request:
musicbot | 2022-04-28T02:39:08.338Z prisma:client query {
musicbot |   aggregateFileCache {
musicbot |     _sum {
musicbot |       bytes
musicbot |     }
musicbot |   }
musicbot | }
musicbot |
musicbot | 2022-04-28T02:39:08.338Z prisma:client:libraryEngine sending request, this.libraryStarted: true
musicbot | 2022-04-28T02:39:08.366Z superagent POST https://accounts.spotify.com/api/token
musicbot | 2022-04-28T02:39:08.373Z superagent POST https://accounts.spotify.com/api/token
musicbot | 2022-04-28T02:39:08.379Z superagent POST https://accounts.spotify.com/api/token
musicbot | - 📡 connecting to Discord...
musicbot | 2022-04-28T02:39:08.388Z muse Provided token: STUwMTcyODc1NjY1NTk2NDQ2.YiVDcg.***************************
musicbot | 2022-04-28T02:39:08.388Z muse Preparing to connect to the gateway...
musicbot | 2022-04-28T02:39:08.398Z muse No files needed to be evicted. Total size of the cache is currently 0 bytes, and the cache limit is 2000000000 bytes.
musicbot | 2022-04-28T02:39:08.547Z superagent POST https://accounts.spotify.com/api/token -> 200
musicbot | 2022-04-28T02:39:08.551Z superagent POST https://accounts.spotify.com/api/token -> 200
musicbot | 2022-04-28T02:39:08.609Z superagent POST https://accounts.spotify.com/api/token -> 200
musicbot | 2022-04-28T02:39:08.704Z muse [WS => Manager] Fetched Gateway Information
musicbot |     URL: wss://gateway.discord.gg
musicbot |     Recommended Shards: 1
musicbot | 2022-04-28T02:39:08.705Z muse [WS => Manager] Session Limit Information
musicbot |     Total: 1000
musicbot |     Remaining: 728
musicbot | 2022-04-28T02:39:08.705Z muse [WS => Manager] Spawning shards: 0
musicbot | 2022-04-28T02:39:08.705Z muse [WS => Shard 0] [CONNECT]
musicbot |     Gateway    : wss://gateway.discord.gg/
musicbot |     Version    : 9
musicbot |     Encoding   : json
musicbot |     Compression: none
musicbot | 2022-04-28T02:39:08.706Z muse [WS => Shard 0] Setting a HELLO timeout for 20s.
musicbot | 2022-04-28T02:39:08.956Z muse [WS => Shard 0] [CONNECTED] Took 250ms
musicbot | 2022-04-28T02:39:08.958Z muse [WS => Shard 0] Clearing the HELLO timeout.
musicbot | 2022-04-28T02:39:08.959Z muse [WS => Shard 0] Setting a heartbeat interval for 41250ms.
musicbot | 2022-04-28T02:39:08.959Z muse [WS => Shard 0] [IDENTIFY] Shard 0/1 with intents: 12929
musicbot | 2022-04-28T02:39:09.116Z muse [WS => Shard 0] [READY] Session c29d08c6affbde7ca29638754ea1c800.
musicbot | 2022-04-28T02:39:09.117Z muse [WS => Shard 0] [ReadyHeartbeat] Sending a heartbeat.
musicbot | 2022-04-28T02:39:09.152Z muse [WS => Shard 0] Shard received all its guilds. Marking as fully ready.
musicbot | 2022-04-28T02:39:09.156Z muse --------------------------------------------------
musicbot | Core Dependencies
musicbot | - @discordjs/voice: 0.8.0
musicbot | - prism-media: 1.3.2
musicbot |
musicbot | Opus Libraries
musicbot | - @discordjs/opus: 0.7.0
musicbot | - opusscript: not found
musicbot |
musicbot | Encryption Libraries
musicbot | - sodium: not found
musicbot | - libsodium-wrappers: 0.7.9
musicbot | - tweetnacl: not found
musicbot |
musicbot | FFmpeg
musicbot | - version: 4.1.8-0+deb10u1
musicbot | - libopus: yes
musicbot | --------------------------------------------------
musicbot | 2022-04-28T02:39:09.218Z muse [WS => Shard 0] Heartbeat acknowledged, latency of 101ms.
musicbot | 2022-04-28T02:39:50.211Z muse [WS => Shard 0] [HeartbeatTimer] Sending a heartbeat.
musicbot | 2022-04-28T02:39:50.290Z muse [WS => Shard 0] Heartbeat acknowledged, latency of 79ms.
musicbot | 2022-04-28T02:40:00.943Z prisma:client Prisma Client call:
musicbot | 2022-04-28T02:40:00.944Z prisma:client prisma.setting.findUnique({
musicbot |   where: {
musicbot |     guildId: '67475467019497470'
musicbot |   }
musicbot | })
musicbot | 2022-04-28T02:40:00.944Z prisma:client Generated request:
musicbot | 2022-04-28T02:40:00.944Z prisma:client query {
musicbot |   findUniqueSetting(where: {
musicbot |     guildId: "67475467019497470"
musicbot |   }) {
musicbot |     guildId
musicbot |     invitedByUserId
musicbot |     playlistLimit
musicbot |     secondsToWaitAfterQueueEmpties
musicbot |     leaveIfNoListeners
musicbot |     roleId
musicbot |     createdAt
musicbot |     updatedAt
musicbot |   }
musicbot | }
musicbot |
musicbot | 2022-04-28T02:40:00.945Z prisma:client:libraryEngine sending request, this.libraryStarted: true
musicbot | 2022-04-28T02:40:00.949Z prisma:client:libraryEngine hookProcess received: exit
musicbot | 2022-04-28T02:40:00.949Z prisma:client:libraryEngine runBeforeExit
musicbot | file:///usr/app/src/utils/update-permissions-for-guild.ts:10
musicbot |     throw new Error("could not find settings for guild");
musicbot |           ^
musicbot |
musicbot | Error: could not find settings for guild
musicbot |     at updatePermissionsForGuild (file:///usr/app/src/utils/update-permissions-for-guild.ts:10:11)
musicbot |     at async Promise.all (index 0)
musicbot |     at async Client.<anonymous> (file:///usr/app/src/bot.ts:129:7)
musicbot | file:///usr/app/node_modules/execa/lib/error.js:59
musicbot |              error = new Error(message);
musicbot |                      ^
musicbot |
musicbot | Error: Command failed with exit code 1: esmo src/scripts/migrate-and-start.ts
musicbot |     at makeError (file:///usr/app/node_modules/execa/lib/error.js:59:11)
musicbot |     at handlePromise (file:///usr/app/node_modules/execa/index.js:119:26)
musicbot |     at processTicksAndRejections (node:internal/process/task_queues:96:5)
musicbot |     at async file:///usr/app/src/scripts/run-with-database-url.ts:5:3 {
musicbot |   shortMessage: 'Command failed with exit code 1: esmo src/scripts/migrate-and-start.ts',
musicbot |   command: 'esmo src/scripts/migrate-and-start.ts',
musicbot |   escapedCommand: 'esmo "src/scripts/migrate-and-start.ts"',
musicbot |   exitCode: 1,
musicbot |   signal: undefined,
musicbot |   signalDescription: undefined,
musicbot |   stdout: undefined,
musicbot |   stderr: undefined,
musicbot |   failed: true,
musicbot |   timedOut: false,
musicbot |   isCanceled: false,
musicbot |   killed: false
musicbot | }
musicbot | error Command failed with exit code 1.
musicbot | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Screenshots N/A

Additional context If a previous installation with data (db.sqlite) is used, the issue is then #637

Runtime I’m running Muse:

  • Directly from the cloned repository
  • Inside a Docker container
  • Something else (please elaborate)

Versions

  • Muse: v1.9.0
  • Docker (if applicable): 20.10.14, build a224086
  • OS: Debian GNU/Linux 11 (bullseye)

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:2
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
unixbirdcommented, Apr 28, 2022

I am also receiving this error as well. Bot will actually play music until it crashes with this error.

0reactions
codethewebcommented, May 14, 2022

This is fixed in https://github.com/codetheweb/muse/releases/tag/v2.0.0. Please reopen if you’re still having issues.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Database errors if specific guild doesn't exist - Stack Overflow
I have per guild settings on my discord bot. However, for some reason if the guild doesn't exist it errors. I have over...
Read more >
Common Error Codes - Guild Wars 2 Support
Error 21 is a fairly rare error code that pops up when the game is unable to find a game ... This is...
Read more >
API Reference - Discord.py
This module uses the Python logging module to log diagnostic and errors ... If the logging module is not configured, these logs will...
Read more >
How Roles cause Missing Permission Errors in Discord.js
This is great for deploying your bot to your own server, but if you want to allow others to deploy an instance of...
Read more >
Guild Wars Error Codes
Below is a list of the most common error codes that can appear in Guild Wars, as well as solutions that will help...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found