-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[$250] iOS - Expense - App crashes when opening Description and saving it a few times #44437
Comments
Triggered auto assignment to @lschurr ( |
Triggered auto assignment to @MonilBhavsar ( |
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
|
@lschurr I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors. |
We think this issue might be related to the #collect project. |
able to reproduce |
I'm able to reproduce on physical device and not on simulator. Client side logs didn't give much hints. Going to make it external |
Job added to Upwork: https://www.upwork.com/jobs/~0183701f9c89311311 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @brunovjk ( |
Some more insights from crashalytics This is indeed a deploy blocker as it started happening yesterday, and only happens on iOS Stack trace of the crash The error seems to be coming from this line in react native animated library https://github.com/software-mansion/react-native-reanimated/blame/main/packages/react-native-reanimated/Common/cpp/Fabric/ReanimatedCommitMarker.cpp#L12 |
I commented on the PR that seemed little sus to me #43749 |
Hi, I’m Michael (Mykhailo) from Callstack and I would like to work on this issue. |
How are we doing on this one @tomekzaw - are we holding on something? |
@bartlomiejbloniarz is actively investigating this in Reanimated. |
@MonilBhavsar @lschurr @brunovjk this issue is now 4 weeks old, please consider:
Thanks! |
@bartlomiejbloniarz is still working on this. |
I was able to reproduce the issue in the 9.0.2 version of the App. The reason for this issue is that when a I spent some time trying to figure out if nested Shadow Tree commits should be allowed, but according to this commit, it seems that they are fine. Hopefully we will have a fix for this issue merged soon, I have prepared a PR to reanimated that should resolve it. From my tests it seems that newer versions of the Expensify App don't have this issue. I tried to reproduce it many times on main, but to no avail. If someone has reproduced the issue on newer version it would be good to know. |
📣 @bartlomiejbloniarz! 📣
|
Looks like there is a draft PR up - any other update for now @bartlomiejbloniarz? |
## Summary This PR changes the way `performOperations` and `ReanimatedCommitHook` are synchronized. The current implementations faces 2 problems: 1. Updates that come through `performOperations` after `pleaseSkipReanimatedCommit` is called in the commit hook will be deferred until the next commit. Usually it's fine since the next commit will be triggered by the next animation frame. But if there was a singular update scheduled through Reanimated, we might not see the change for a long time. This issue is more thoroughly explained in [this issue](#6245). 2. In `ReanimatedCommitMarker` there is an assumption that there can be at most one commit happening on a given thread (i.e. there can't be nested commits). This isn't true, since there can be an event listener that commits some changes in a reaction to a native mount/unmount (which is a part of the commit function). [This exact scenario was observed in the New Expensify App with `react-native-keyboard-controller`](Expensify/App#44437 (comment)). At first I thought this is a mistake, but [this PR in RN](facebook/react-native@5f0435f) seems to allow for scenarios like that. Applied fixes: ad 1. Now instead of resetting the skip flag in reanimated after a transaction is mounted (via MountHook), we reset the flag whenever a non-empty batch is read in `performOperations`. This ensures that we don't make an unnecessary commit, but never skip any updates. ad 2. Now we mark reanimated commits through `ReanimatedCommitShadowNode`. This is a class derived from ShadowNode that allows us to modify the root nodes traits_ (and add our custom trait). This ensures that even if the root node gets cloned it will retain the information. We couldn't derive from `RootShadowNode` since it is a final class. ## Test plan
I think that's all. The PR was merged. I tested the New Expensify App with these changes and everything worked fine. |
Thank you for the help! 🙇 |
This issue has not been updated in over 15 days. @MonilBhavsar, @lschurr, @brunovjk eroding to Monthly issue. P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do! |
@bartlomiejbloniarz's PR software-mansion/react-native-reanimated#6330 was merged and released in 3.15.0. E/App now runs on Reanimated 3.15.1: https://github.com/Expensify/App/blob/main/package.json#L172 We can safely close this issue now. Thanks everyone for your help! |
Thank you very much @tomekzaw. |
Sounds good. Let's close this. Thanks all for the help! 🚀 |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 9.0.2-0
Reproducible in staging?: Y
Reproducible in production?: N
Logs: https://stackoverflow.com/c/expensify/questions/4856
Issue reported by: Applause-Internal team
Action Performed:
Expected Result:
App will not crash.
Actual Result:
App crashes when opening Description and saving it a few times.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Bug6524815_1719379123236.RPReplay_Final1719378986.mp4
Bug6524815_1719395555645!New_Expensify-2024-06-26-082221.txt
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: