museofficial / muse

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

Invalidtoken Discord #1045

Open Zakhiel2 opened 2 months ago

Zakhiel2 commented 2 months ago

Invalidtoken even though the token is clearly valid (tried it). image

Versions

codetheweb commented 1 month ago

could you please try running with the env var DEBUG=* and see if it prints anything useful?

onedeyepete commented 1 month ago

im actually getting the same error...,. So debug is showing that Spotify token is 400.

Running version 2.9.0 built on unknown date (commit unknown) ☕ Discussion? https://github.com/codetheweb/muse/discussions/new

💰 Help me? https://www.paypal.me/codetheweb https://github.com/sponsors/codetheweb 🐛 Bug? https://github.com/codetheweb/muse/issues/new 🔧 Need help? https://github.com/codetheweb/muse/discussions/new ✨ New feature? https://github.com/codetheweb/muse/issues/new } +0ms "familyDistro": "debian", "targetDistro": "debian", "originalDistro": "debian" { prisma:get-platform Found distro info: prisma:get-platform Trying platform-specific paths for "debian" (and "ubuntu") +1ms prisma:get-platform Found libssl.so file using platform-specific paths: libssl.so.3 +5ms prisma:get-platform The parsed libssl version is: 3.0.x +0ms prisma:client:engines:resolveEnginePath enginePath /home/container/node_modules/.prisma/client/libquery_engine-debian-openssl-3.0.x.so.node +0ms prisma:client:libraryEngine library starting +335ms prisma:client:libraryEngine library started +1ms prisma:client Prisma Client call: +344ms prisma:client prisma.fileCache.findMany({ where: undefined, prisma:client Generated request: +0ms orderBy: { }) +1ms createdAt: 'asc' }, take: 50 prisma:client query { findManyFileCache( orderBy: [ +0ms { } ] take: 50 } hash ) { createdAt: asc bytes accessedAt } createdAt updatedAt prisma:client:libraryEngine sending request, this.libraryStarted: true +10ms muse Evicting oldest files... +0ms prisma:client Prisma Client call: +3ms prisma:client prisma.fileCache.aggregate({ }) +0ms prisma:client Generated request: +0ms } } select: { bytes: true select: { _sum: { } prisma:client query { +0ms } } } bytes prisma:client:libraryEngine sending request, this.libraryStarted: true +2ms _sum { aggregateFileCache {

superagent POST https://accounts.spotify.com/api/token +0ms superagent POST https://accounts.spotify.com/api/token +2ms

⠋ 📡 connecting to Discord... muse Provided token: {{env.discord_token}} +21ms 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. +5ms ⠙ 📡 connecting to Discord... superagent POST https://accounts.spotify.com/api/token -> 400 +159ms superagent POST https://accounts.spotify.com/api/token -> 400 +6ms ⠹ 📡 connecting to Discord... muse [WS => Manager] Manager was destroyed. Called by: muse at async file:///home/container/src/scripts/start.ts:1:104 +212ms muse Error muse at async bot_default.register (file:///home/container/src/bot.ts:1:4440) muse at WebSocketManager.destroy (/home/container/node_modules/discord.js/src/client/websocket/WebSocketManager.js:326:54) muse at process.processTicksAndRejections (node:internal/process/task_queues:95:5) muse at async startBot (file:///home/container/src/index.ts:1:383) muse at Client.login (/home/container/node_modules/discord.js/src/client/Client.js:229:12) muse at Client.destroy (/home/container/node_modules/discord.js/src/client/Client.js:251:13) prisma:client:libraryEngine:exitHooks exit event received: 1 +0ms

/home/container/node_modules/discord.js/src/client/websocket/WebSocketManager.js:136 Node.js v20.15.1 const invalidToken = new DiscordjsError(ErrorCodes.TokenInvalid);

                     ^

}

Error [TokenInvalid]: An invalid token was provided. at startBot (file:///home/container/src/index.ts:1:393) code: 'TokenInvalid' at WebSocketManager.connect (/home/container/node_modules/discord.js/src/client/websocket/WebSocketManager.js:136:26) at async file:///home/container/src/scripts/start.ts:1:104 { at bot_default.register (file:///home/container/src/bot.ts:1:4458) at Client.login (/home/container/node_modules/discord.js/src/client/Client.js:226:21)