[Odometer] Unexpected error when submit expense with image#85574
Conversation
|
@DylanDylann Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep it up! ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
Reviewer Checklist
Screenshots/VideosAndroid: HybridApp |
|
@jakubkalinski0 I still can reproduce the bug (when removing the end image, only submit the start image) Screen.Recording.2026-03-18.at.13.36.24.mov |
|
@DylanDylann It's fixed now, I've also added those test cases to the Tests section and updated the videos Confirmation videosandroidnative2.webmandroidnative3.webm |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
Julesssss
left a comment
There was a problem hiding this comment.
LGTM, just held on final C+ review
|
🚧 @Julesssss has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|




Explanation of Change
Fixed an unexpected error when submitting a distance expense with odometer images.
encodeToBase64()called without an explicit format defaults to PNG in Skia, but the file extension derived from the source image name (e.g..jpg) didn't match the actual PNG content, causing a MIME type mismatch when the receipt was uploaded. Fixed by explicitly encoding as JPEG and propagating the image type tosetMoneyRequestReceipt.Fixed Issues
$ #85405
PROPOSAL: N/A
Tests
FAB-> go to"Track distance"-> choose"Odometer"tab"Next"-> verify no error is shown and navigation proceeds normallyFAB-> go to"Track distance"-> choose"Odometer"tab"Next"-> verify no error is shown and navigation proceeds normallyFAB-> go to"Track distance"-> choose"Odometer"tab"Next"-> verify no error is shown and navigation proceeds normally"Distance"-> delete one of the images -> press"Save"Offline tests
Same as Tests
QA Steps
Same as Tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
iOS native has to be tested on a physical device
Android: Native
android.webm
androidnative2.webm
androidnative3.webm