Skip to content

Moderation commands failing with '10062: Unknown interaction' #712

Closed

Description

@marko-radosavljevic

Sometimes moderation commands crash with RestAction queue returned failure: [ErrorResponseException] 10062: Unknown interaction. Which results in the application did not respond from the bot.

This error happens when we don't reply or ack the interaction in time (3 seconds), usually due to rate limits. The solution is to defer the interaction. Further investigation needed to determine conclusively.

Stack trace logs:

tjbot-develop_1  | 2022-12-07T16:05:59.767314000Z 16:05:59.761 [ForkJoinPool.commonPool-worker-12] ERROR net.dv8tion.jda.api.requests.RestAction - RestAction queue returned failure: [ErrorResponseException] 10062: Unknown interaction
tjbot-develop_1  | 2022-12-07T16:05:59.767594000Z net.dv8tion.jda.api.exceptions.ContextException: null
tjbot-develop_1  | 2022-12-07T16:05:59.767695000Z 	at net.dv8tion.jda.api.exceptions.ContextException.here(ContextException.java:54) ~[JDA-5.0.0-alpha.20.jar:5.0.0-alpha.20]
tjbot-develop_1  | 2022-12-07T16:05:59.767783000Z 	at net.dv8tion.jda.internal.requests.restaction.operator.RestActionOperator.contextWrap(RestActionOperator.java:123) ~[JDA-5.0.0-alpha.20.jar:5.0.0-alpha.20]
tjbot-develop_1  | 2022-12-07T16:05:59.767861000Z 	at net.dv8tion.jda.internal.requests.restaction.operator.FlatMapRestAction.queue(FlatMapRestAction.java:50) ~[JDA-5.0.0-alpha.20.jar:5.0.0-alpha.20]
tjbot-develop_1  | 2022-12-07T16:05:59.767922000Z 	at net.dv8tion.jda.api.requests.RestAction.queue(RestAction.java:572) ~[JDA-5.0.0-alpha.20.jar:5.0.0-alpha.20]
tjbot-develop_1  | 2022-12-07T16:05:59.768001000Z 	at net.dv8tion.jda.api.requests.RestAction.queue(RestAction.java:538) ~[JDA-5.0.0-alpha.20.jar:5.0.0-alpha.20]
tjbot-develop_1  | 2022-12-07T16:05:59.768067000Z 	at org.togetherjava.tjbot.commands.moderation.QuarantineCommand.quarantineUserFlow(QuarantineCommand.java:108) ~[classes/:?]
tjbot-develop_1  | 2022-12-07T16:05:59.768147000Z 	at org.togetherjava.tjbot.commands.moderation.QuarantineCommand.onSlashCommand(QuarantineCommand.java:144) ~[classes/:?]
tjbot-develop_1  | 2022-12-07T16:05:59.768200000Z 	at org.togetherjava.tjbot.commands.system.BotCore.lambda$onSlashCommandInteraction$13(BotCore.java:243) ~[classes/:?]
tjbot-develop_1  | 2022-12-07T16:05:59.768293000Z 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
tjbot-develop_1  | 2022-12-07T16:05:59.768379000Z 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
tjbot-develop_1  | 2022-12-07T16:05:59.768444000Z 	at java.lang.Thread.run(Thread.java:833) ~[?:?]

Note that this happened a few times already, on quarantine, warn and ban.

Activity

  1. github-actions commented on Jan 7, 2023

    @github-actions

    This issue is stale because it has been open 30 days with no activity. Remove stale label, comment or add the valid label or this will be closed in 5 days.

  2. added
    valid
    and removed on Jan 7, 2023
  3. Taz03 commented on Jan 7, 2023

    @Taz03
    Contributor

    the code seems fine, the only thing i can think of is time, so maybe we should try using defer reply

  4. self-assigned this
    on Jan 7, 2023
  5. Anvith433 commented on Aug 20, 2026

    @Anvith433

    i will try to fix issue , please assign it to me

  6. Zabuzard commented on Aug 21, 2026

    @Zabuzard
    Member

    @Anvith433 Hey there, the issue was closed 3 years ago already 😃

  7. Anvith433 commented on Aug 21, 2026

    @Anvith433
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugpriority: normalvalid

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions