Repository navigation
connector/directmedia: return not found when media ciphertext hash doesn't match - #1084
Open
indent[bot] wants to merge 1 commit into
Open
indent[bot] wants to merge 1 commit into
indent[bot] wants to merge 1 commit into
Conversation
Contributor
Author
|
No issues found.
All required CI checks passed on
Select any unchecked box below to run or rerun that agent. Full resultsIndent Review Agent
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Logs
Failed to do media proxy with temp file39,374 in 24 h (prev 0) since direct media was enabled. Loki sample (four 15-minute peak windows on 4 clusters): 3,988 linesfailed to download media from last host: hash of media ciphertext doesn't match, across at least 5 accounts. In one 15-minute window, one account requested 1,287 distinct media, and 1,197 requests got HTTP 500. Android re-requested each failing media 7-23 times over about 220 s, and every attempt downloaded from all CDN hosts again.Cause
makeDirectMediaResponsereturns whatsmeow'sErrInvalidMediaEncSHA256as a plain error, and the media proxy answers plain errors with500 M_UNKNOWN, which clients treat as retryable. The reupload path already treats this error as a permanent failure.Change
Return
M_NOT_FOUNDfor a ciphertext hash mismatch so clients stop re-requesting media that won't download.Before / after
Tested on a live account.
500 M_UNKNOWN(clients retry)404 M_NOT_FOUNDTag
@indentto continue the conversation here.