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

Webhook Followup / Unknown Webhook (404) #7220

Open
AlexFlipnote opened this issue Oct 17, 2024 · 2 comments
Open

Webhook Followup / Unknown Webhook (404) #7220

AlexFlipnote opened this issue Oct 17, 2024 · 2 comments
Labels

Comments

@AlexFlipnote
Copy link

AlexFlipnote commented Oct 17, 2024

Description

Whenever I respond to an interaction URL request with a defer, it goes through as normal, and Discord says that the "Application is thinking". However at random occurrence, whenever I wish to reply with /webhooks/:app_id/:followup_token, it would tell me that the webhook is not there (404). After making my script retry for 2-3 times in a span of ~10 seconds, it finally registers that it can reply and gets a HTTP 200 request.

Steps to Reproduce

  • Use Interaction URL and not traditional websocket
  • Reply to Discord's webhook request with following JSON
{
  "type": 5,
  "data": { "flags": 0 }
}
  • Attempt to send a followup to /webhooks/:app_id/:followup_token with something as simple as {"content": "Hello world"}
  • Wait to see if that one moment you attempt, has the random occurance of not allowing you to reply (While testing before submitting this issue, I get it every 10'ish minutes)

Expected Behavior

Being able to reply to a defer instantly as shown here
image

Current Behavior

Random chance to return HTTP 404 until a few seconds has passed and Discord API finally lets you reply to the followup token.
WindowsTerminal_2024-10-18_01-23-58

Screenshots/Videos

They are provided above

Client and System Information

Library: discord.http (Python, Quart, aiohttp)
OS: Windows 11 Pro

@jhgg
Copy link
Contributor

jhgg commented Oct 18, 2024

When replying to an HTTP response, there is no guarantee that Discord has received the response that you sent before it received your request for a follow up.

Discord probably needs to handle a follow up for an interaction where a result has not yet been replied to as resolving the interaction, and then dropping the http response asking it to be deferred when it receives the response.

@AlexFlipnote
Copy link
Author

When replying to an HTTP response, there is no guarantee that Discord has received the response that you sent before it received your request for a follow up.

Even if the client is saying that "Application is thinking", intentionally waiting 2 seconds before sending a followup, yet still getting a HTTP 404? Just asking since it feels a bit strange where the client shows that the API has accepted my defer response, yet followup token is unavailable at some random points, for a duration of 2-10 seconds (it's a bit random at times), which is after I can see that a defer has been handled by Discord.

asaaaa.mp4

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

2 participants