Unknown Interaction
LOGGING DiscordAPIError[10062]: Unknown interaction
30 Replies
- What's your exact discord.js
npm list discord.js and node node -v version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!Common causes of
DiscordAPIError[10062]: Unknown interaction:
- Initial response took more than 3 seconds ➞ defer the response *.
- Wrong interaction object inside a collector.
- Two processes handling the same command (the first consumes the interaction, so it won't be valid for the other instance)
* Note: you cannot defer modal or autocomplete value responsesAfter about 15 minutes (most of the time less) of running some of my bots get the error LOGGING DiscordAPIError[10062]: Unknown interaction
For no reason at all, they have always ran fine, they just started doing that all of a sudden. Been debugging it for 12 hours now and I just can't find anything.
Firewall / NAT / rate limit on that server IP - Discord may silently block outbound requests if it detects rate abuse, or if your IP is flagged.
This is what I got sent
it just fails on every interaction, modals, buttons, menus, commands idk
Is defered, not dual hosted so only on my host and the object is fine
it is not deferred though
it is unknown by the time it reaches the defer
so its probably a network issue
Uh, I deffer it like right when it gets ran, that is confusing me
this is not a deferred reply
if your code reached the defer you would see '... is thinking'
Right
Okay, ill try some stuff
Yeah on the button ones, but on commands it does the exact same
This is a command
Ill see if I can find the command in the logs
Ill have to restart the bot so it may take up to 15 minutes again. Ill add timestamping
Alright will restart them
ignore that
Also happend right after restart
1751060079803
1388271312514060340 Can that be right Alright thnx now I have something to actually contact my provider with. How did you convert this? Seems like the issue still isn't fixed 1751065381051 LOGGING DiscordAPIError[10062]: Unknown interaction at handleErrors (/app/node_modules/@discordjs/rest/dist/index.js:727:13) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async BurstHandler.runRequest (/app/node_modules/@discordjs/rest/dist/index.js:831:23) at async _REST.request (/app/node_modules/@discordjs/rest/dist/index.js:1272:22) at async ChatInputCommandInteraction.reply (/app/node_modules/discord.js/src/structures/interfaces/InteractionResponses.js:194:22) at async handleReply (file:///app/bot/util/helpers.js:536:21) at async Module.execute (file:///app/bot/src/block/action/send-message.js:30:19) at async runTree (file:///app/bot/src/blockHandler.js:140:11) at async commandHandler (file:///app/bot/util/clientEvents.js:148:5) at async interactionEvent (file:///app/bot/util/clientEvents.js:102:16) { requestBody: { files: [], json: { type: 4, data: [Object] } }, rawError: { message: 'Unknown interaction', code: 10062 }, code: 10062, status: 404, method: 'POST', url: 'https://discord.com/api/v10/interactions/1388293567302336775/callback?with_response=false' } Even ones with 1 second delay are invalid
1388271312514060340 Can that be right Alright thnx now I have something to actually contact my provider with. How did you convert this? Seems like the issue still isn't fixed 1751065381051 LOGGING DiscordAPIError[10062]: Unknown interaction at handleErrors (/app/node_modules/@discordjs/rest/dist/index.js:727:13) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async BurstHandler.runRequest (/app/node_modules/@discordjs/rest/dist/index.js:831:23) at async _REST.request (/app/node_modules/@discordjs/rest/dist/index.js:1272:22) at async ChatInputCommandInteraction.reply (/app/node_modules/discord.js/src/structures/interfaces/InteractionResponses.js:194:22) at async handleReply (file:///app/bot/util/helpers.js:536:21) at async Module.execute (file:///app/bot/src/block/action/send-message.js:30:19) at async runTree (file:///app/bot/src/blockHandler.js:140:11) at async commandHandler (file:///app/bot/util/clientEvents.js:148:5) at async interactionEvent (file:///app/bot/util/clientEvents.js:102:16) { requestBody: { files: [], json: { type: 4, data: [Object] } }, rawError: { message: 'Unknown interaction', code: 10062 }, code: 10062, status: 404, method: 'POST', url: 'https://discord.com/api/v10/interactions/1388293567302336775/callback?with_response=false' } Even ones with 1 second delay are invalid
Its network or ratelimit
-# ahm, or probably Duplicated interactions
idk if you deferred or not, but this thing will definitely be cool
also you cannot defer modals, instead you use
you should check your provider status
Already done all that, status is fine. I'm doing the defering just like you right after a command is ran.
can you reheck?
Jep we just did, it's making good contact
We even switch out the NAS that handles the traffic to a new one
Is the error only shows to 1 command or entire command?
All commands buttons modals etc.
did u defer modal
And randomly it only happens after a couple minutes
Nope, I have a handler for that. It only defers after 2.5 seconds so modals run before that
But even when I rermove that 2.5 seconds it still does the same
Well modals don't work then ofc but neither do commands or buttons
It randomly happens?
Jep after like 10 ish minutes or so
Like it all works fine, then just stops
try adding rest debugging
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
Ill add the client.on debug thing should be the same right
Ye
Going to add that tmmr, bots have been up for 24 minutes without issue now so hoping it's stable enough for me to go to bed after 14 hours 😂. If it still happens tmmr then ill push the debugging update and see if I can get something out of that
Ah nvm it just broke again
:crySparkle:
These are the outputs of the interaction failed + their MS before and after which is 100ms and 200ms so idk
I'm on mobile right now
Alright that file has a button and command example ill be on again in like 7 hours
Other bots also seem to have it, not hosted by me. Is there a Discord outage or smth?
thats probably just a network issue then. If it were a discors issue we'd be getting loads of those in support
(And those are usually indicated by 5xx errors)
what host are you using
Well I just switched host
And still getting it
Then something is slowing down your code