Repository navigation
msgconv/wa-media: reupload media when the direct media URI can't be generated - #1085
Open
indent[bot] wants to merge 2 commits into
Open
indent[bot] wants to merge 2 commits into
indent[bot] wants to merge 2 commits 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
|
…can't be generated
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
Event handling panicked5,898 in 24 h (prev 4,598) andPanic in backfill queue1,175 (prev 65). All of them arefailed to generate content URI: content URI too long (256..270 > 255)fromconvertMediaMessage. Most are channel media, which #1083 covers. Sampling 15-minute windows every 3 h on all clusters also found at least 4 accounts panicking outside channels:@lidDMs during backfill (264-270 > 255) and a group image from an@lidsender (256 > 255). They recur in every window.Cause
convertMediaMessagepanics whenGenerateContentURIfails. Media IDs store LID JIDs as raw strings, and encrypted direct media makes the URI longer, so long usernames go past 255. The live message is dropped, and a backfill batch aborts and retries without making progress.Change
On a content URI error, log a warning and reupload the media the way the non-direct-media path does, instead of panicking. The sticker MIME rewrite now runs only when direct media is actually used. Sticker pack import gets the same fallback. Doesn't conflict with #1083 (different file).
Before / after
Tested on a live account.
@lidDM backfill with media, content URI over 255Event handling panicked(content URI too long); 0 of 30 messagesTag
@indentto continue the conversation here.