Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalidtoken Discord #1045

Open
Zakhiel2 opened this issue Jul 12, 2024 · 3 comments
Open

Invalidtoken Discord #1045

Zakhiel2 opened this issue Jul 12, 2024 · 3 comments
Labels

Comments

@Zakhiel2
Copy link

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

Versions

  • Muse: 2.8.1
  • Docker (if applicable): 4.31.1 (153621)
@codetheweb
Copy link
Collaborator

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

@onedeyepete
Copy link

onedeyepete commented Jul 20, 2024

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)

@theMycron
Copy link

Make sure to remove any single-quotes around the keys, I had this problem and I solved it by removing them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants