fix app crashes intermittently when switching to classic view on ios#91828
Conversation
…itional guard for status bar
|
@codex review |
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
|
Codex Review: Didn't find any major issues. Bravo. ℹ️ 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". |
|
@blimpich can I get builds triggered? 😁 |
|
triggered the adhoc build, feel free to ping me in slack if it doesn't work and needs to be re-run: https://github.com/Expensify/App/actions/runs/26527071468 |
|
🚧 @blimpich has triggered a test Expensify/App build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
|
|
||
| closingPromise | ||
| .then(() => { | ||
| requestAnimationFrame(() => { |
There was a problem hiding this comment.
I think that requestAnimationFrame gives us extra frame/time to process ongoing re-rendering, before closing RN app. Without it, Navigation.clearPreloadedRoutes(); and HybridAppModule.closeReactNativeApp({shouldSetNVP}); is added to microtask queue immediately after the onyx merge, and ran quicker than the time required to process renders in components that subscribe to ONYXKEYS.HYBRID_APP key.
There was a problem hiding this comment.
this approach is similar to Melvin's proposal, but theirs was missing requestAnimationFrame() delay here - but i'm aware that it still doesn't sound like 100% guarantee fix, depends on how random the crash is, if QA won't be able to reprod it, I think it's enough
|
|
|
🚧 @blimpich has triggered a test Expensify/App build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
|
@codex review |
|
Codex Review: Didn't find any major issues. You're on a roll. ℹ️ 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". |
|
🚧 @blimpich has triggered a test Expensify/App build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
|
🚧 @blimpich has triggered a test Expensify/App build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
|
Crap |
…-when-switching-to-classic-view-ios
|
🚧 @dylanexpensify has triggered a test Expensify/App build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
|
Guys, I prepared another PR with similar skia patch, but it has some small differences. Would you like to give it a try? |
Sure! |
|
🚧 @blimpich 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
This PR fixes the sequencing in
closeReactNativeAppNow we merge
closingReactNativeAppfirst, await it, then runclearPreloadedRoutes()- wrapped inrequestAnimationFrameand close react native app. Also added additional guard forupdateStatusBarStylewhere a navigation listener may still fire before re-render.edit: currently trying the skia library patch
Fixed Issues
$ #90135
PROPOSAL:
Tests
Offline tests
N/A
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
ScreenRecording_05-28-2026.12-59-42_1.MP4