fix: concurrent unmount when app is offline#48474
fix: concurrent unmount when app is offline#48474chiragsalian merged 2 commits intoExpensify:mainfrom
Conversation
|
@suneox Do you want to do the review here? |
I’ve unassigned myself from the issue, so you can review this PR. Thank you! |
This comment was marked as resolved.
This comment was marked as resolved.
|
@kirillzyusko Any thoughts on this? |
|
@jjcoffee checking it now 👀 |
d0c1bb9 to
be6acac
Compare
|
I can not reproduce the problem locally that @jjcoffee discovered We will try to co-operate tomorrow to fix it! |
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid-app-2024-09-10_13.33.42.mp4Android: mWeb Chromeandroid-chrome-2024-09-10_13.37.04.mp4iOS: Nativeios-app-2024-09-10_13.54.18.mp4iOS: mWeb Safariios-safari-2024-09-10_13.57.59.mp4MacOS: Chrome / Safaridesktop-chrome-2024-09-10_13.09.33.mp4MacOS: Desktopdesktop-app-2024-09-10_13.29.23.mp4 |
This comment was marked as resolved.
This comment was marked as resolved.
jjcoffee
left a comment
There was a problem hiding this comment.
Applying the fix to iOS-only works as a temp workaround for me!
chiragsalian
left a comment
There was a problem hiding this comment.
LGTM. Proceeding to merge because i think design review is not really required here as it's fixing a crash.
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to production by https://github.com/luacmartins in version: 9.0.33-4 🚀
|
Details
Fixes concurrent unmount (when deleting an expense report from self dm in offline mode).
Initially I thought that we are trying to update and unmount a view simultaneously, and the first idea was to postpone updates of some props and I added hook like:
But I just discovered that I'm postponing a crash for 5 seconds 😅
The second thing that I wanted to try is to cancel unmount operation if view is already unmounted - I added necessary code and discovered, that it breaks the app in some cases (for example when you open a "track expense" screen, then the spinner never disappears).
So I started to look closer and I discovered, that as soon as we adding
{ opacity: 0.5 }style - the app crashes immediately. So I tried to add{ opacity: 0.99 }as initial value and the crash disappears (when I add{ opacity: 1 }then crash appear again).So I think as a temporary workaround it can be added to the codebase. And in a meantime I'll discover what's exactly causing the problem and provide a proper solution later.
Fixed Issues
$ #48197
PROPOSAL: N/A
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodSTYLE.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 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
Android: Native
telegram-cloud-document-2-5384529808128497894.mp4
Android: mWeb Chrome
telegram-cloud-document-2-5384529808128497850.mp4
iOS: Native
RPReplay_Final1725370433.MP4
iOS: mWeb Safari
RPReplay_Final1725373845.MP4
MacOS: Chrome / Safari
Screen.Recording.2024-09-03.at.16.03.06.mov
MacOS: Desktop
Screen.Recording.2024-09-03.at.16.10.18.mov