What are possible causes for "DiscordAPIError[10062]: Unknown interaction"

Hello ๐Ÿ‘‹ A user of my bot reported that they are getting the following error:
DiscordAPIError[10062]: Unknown interaction
at SequentialHandler.runRequest (/root/jellyfin-discord-music-bot/node_modules/@discordjs/rest/dist/index.js:667:15)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async SequentialHandler.queueRequest (/root/jellyfin-discord-music-bot/node_modules/@discordjs/rest/dist/index.js:464:14)
at async REST.request (/root/jellyfin-discord-music-bot/node_modules/@discordjs/rest/dist/index.js:910:22)
at async ChatInputCommandInteraction.reply (/root/jellyfin-discord-music-bot/node_modules/discord.js/src/structures/interfaces/InteractionResponses.js:111:5)
at async SummonCommand.handler (/root/jellyfin-discord-music-bot/dist/commands/summon.command.js:41:9)
Emitted 'error' event on Client instance at:
at emitUnhandledRejectionOrErr (node:events:251:10)
at processTicksAndRejections (node:internal/process/task_queues:85:21) {
requestBody: {
files: [],
json: {
type: 4,
data: {
content: undefined,
tts: false,
nonce: undefined,
embeds: [ { color: 7828684, author: [Object], footer: [Object] } ],
components: undefined,
username: undefined,
avatar_url: undefined,
allowed_mentions: undefined,
flags: undefined,
message_reference: undefined,
attachments: undefined,
sticker_ids: undefined,
thread_name: undefined
}
}
},
rawError: { message: 'Unknown interaction', code: 10062 },
code: 10062,
status: 404,
method: 'POST',
url: 'https://discord.com/api/v10/interactions/callback'
}
DiscordAPIError[10062]: Unknown interaction
at SequentialHandler.runRequest (/root/jellyfin-discord-music-bot/node_modules/@discordjs/rest/dist/index.js:667:15)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async SequentialHandler.queueRequest (/root/jellyfin-discord-music-bot/node_modules/@discordjs/rest/dist/index.js:464:14)
at async REST.request (/root/jellyfin-discord-music-bot/node_modules/@discordjs/rest/dist/index.js:910:22)
at async ChatInputCommandInteraction.reply (/root/jellyfin-discord-music-bot/node_modules/discord.js/src/structures/interfaces/InteractionResponses.js:111:5)
at async SummonCommand.handler (/root/jellyfin-discord-music-bot/dist/commands/summon.command.js:41:9)
Emitted 'error' event on Client instance at:
at emitUnhandledRejectionOrErr (node:events:251:10)
at processTicksAndRejections (node:internal/process/task_queues:85:21) {
requestBody: {
files: [],
json: {
type: 4,
data: {
content: undefined,
tts: false,
nonce: undefined,
embeds: [ { color: 7828684, author: [Object], footer: [Object] } ],
components: undefined,
username: undefined,
avatar_url: undefined,
allowed_mentions: undefined,
flags: undefined,
message_reference: undefined,
attachments: undefined,
sticker_ids: undefined,
thread_name: undefined
}
}
},
rawError: { message: 'Unknown interaction', code: 10062 },
code: 10062,
status: 404,
method: 'POST',
url: 'https://discord.com/api/v10/interactions/callback'
}
I instantly expected that Discord was probably not happy with the response time, since the action may take some while. So I refactored to use await deferReply(). This works for me, but the users still has the same error. We already debugged everything around and concluded, that await deferReply() just under a second. deferReply does not seem to be the issue. I call it correctly. This issue has already been reported once, but the thread was locked: https://github.com/discordjs/discord.js/issues/7005 Thus, I decided to ask here, what other possible issues besides the timeout, could cause this issue. I'm happy to provide the source code, but I sadly can't reproduce the error on my machine. I can provide the code, but as the issue already says, the code does not seem to be the problem here.
PS D:\jellyfin-discord-music-bot> npm list discord.js
jellyfin-discord-music-[email protected] D:\jellyfin-discord-music-bot
โ”œโ”€โ”ฌ @discord-nestjs/[email protected]
โ”‚ โ””โ”€โ”€ [email protected] deduped
โ”œโ”€โ”ฌ @discord-nestjs/[email protected]
โ”‚ โ””โ”€โ”€ [email protected] deduped
โ””โ”€โ”€ [email protected]

PS D:\jellyfin-discord-music-bot> node -v
v16.17.1
PS D:\jellyfin-discord-music-bot> npm list discord.js
jellyfin-discord-music-[email protected] D:\jellyfin-discord-music-bot
โ”œโ”€โ”ฌ @discord-nestjs/[email protected]
โ”‚ โ””โ”€โ”€ [email protected] deduped
โ”œโ”€โ”ฌ @discord-nestjs/[email protected]
โ”‚ โ””โ”€โ”€ [email protected] deduped
โ””โ”€โ”€ [email protected]

PS D:\jellyfin-discord-music-bot> node -v
v16.17.1
GitHub
Random "Unknown interaction" errors sometimes ยท Issue #7005 ยท disco...
Issue description I have a bot with clicks on buttons every second and people executing commands. This generally goes very well, but sometimes I get an "Unknown Interaction" when ...
3 Replies
Unknown User
Unknown Userโ€ข2y ago
Message Not Public
Sign In & Join Server To View
Syjalo
Syjaloโ€ข2y ago
GitHub
Random misleading Unknown Interaction errors ยท Issue #5558 ยท discor...
Description I've seen this issue reported by many people but so far no one has been able to gather enough information to reliably explain what's going on. An example can be seen at ...
Manicraft1001
Manicraft1001โ€ข2y ago
I mentioned the issue from my repo, thanks. I'll see if I can gather data with the user so we can finally resolve this
Want results from more Discord servers?
Add your server