-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: concurrent unmount when app is offline #48474
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Applying the fix to iOS-only works as a temp workaround for me!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.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