fix crash attachment#34030
Conversation
|
@0xmiroslav 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] |
0xmiroslav
left a comment
There was a problem hiding this comment.
Code looks good. Testing
| } | ||
|
|
||
| const isLocalFile = typeof path === 'number' || path.startsWith('blob:') || path.startsWith('file:'); | ||
| const isLocalFile = typeof path === 'number' || path.startsWith('blob:') || path.startsWith('file:') || path === ReceiptGeneric; |
There was a problem hiding this comment.
what is type of ReceiptGeneric?
There was a problem hiding this comment.
ok confirmed string on web, number on native.
So Case 1 bug is supposed to happen only on web
There was a problem hiding this comment.
Hmm doesn't this apply to all paths that have a local file then?
There was a problem hiding this comment.
Yes, I think if we check isLocalFile we should use this, currently I see we build the isLocalFile only in this function getThumbnailAndImageURIs
There was a problem hiding this comment.
Can we apply a more hollistic approach to isLocalFile though? I imagine in the future we'll have more web assets we pass into getThumbnailAndImageURIs and ideally we don't just add an if check for each path. Maybe we can check if it starts with '/'? What do you think
There was a problem hiding this comment.
Hmm, I think it is good, we can modify it like that to cover all we assets' path:
const isLocalFile = ... path.startsWith('/');
@namhihi237 this doesn't work correctly Screen.Recording.2024-01-05.at.5.17.10.pm.mov |
|
Seem it does not relative this PR |
|
I test on production and this issue still happen |
ok then out of scope |
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid.movAndroid: mWeb Chromemchrome.moviOS: Nativeios.moviOS: mWeb Safarimsafari.movMacOS: Chrome / Safariweb.movMacOS: Desktopdesktop.mov |
0xmiroslav
left a comment
There was a problem hiding this comment.
@thienlnam this needs CP'ed
|
@namhihi237 Is this issue also a regression? Will it be handled by the PR? |
|
I will test this |
|
I can not reproduce on the main, anyone can reproduce? I test it to work on main and this PR. |
same |
|
Maybe PR will fix this issue #34049 |
|
@namhihi237 Let's make sure #34049 issue is also handled by this PR. |
|
Testing on it |
|
Tested and was cover |
|
Thank you @namhihi237 for quick response. Let's keep an eye open for probable deploy blockers. |
|
@thienlnam PR updated |
Screen.Recording.2024-01-08.at.10.51.41.movScreen.Recording.2024-01-08.at.10.53.16.movScreen.Recording.2024-01-08.at.10.55.37.mov |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
fix crash attachment (cherry picked from commit cfdd159)
|
🚀 Cherry-picked to staging by https://github.com/thienlnam in version: 1.4.22-3 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
|
🚀 Deployed to production by https://github.com/thienlnam in version: 1.4.22-6 🚀
|
| } | ||
|
|
||
| const isLocalFile = typeof path === 'number' || path.startsWith('blob:') || path.startsWith('file:'); | ||
| const isLocalFile = typeof path === 'number' || path.startsWith('blob:') || path.startsWith('file:') || path.startsWith('/'); |
There was a problem hiding this comment.
This PR created a problem with eReceipts that have pending waypoints. Issue #34287
Details
This PR is to try to fix regression from PR
Fixed Issues
$ #34016
$ #33985
PROPOSAL:
Tests
Case 1:
Case 2:
Offline tests
The same test
QA Steps
The same test
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel so 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
Android: Native
Screen.Recording.2024-01-05.at.22.38.47.mov
Android: mWeb Chrome
Screen.Recording.2024-01-05.at.22.42.37.mov
iOS: Native
Screen.Recording.2024-01-05.at.22.35.53.mov
iOS: mWeb Safari
Screen.Recording.2024-01-05.at.22.37.29.mov
MacOS: Chrome / Safari
webb.mp4
MacOS: Desktop
desk.mp4