-
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
[$500] Android - Settings - App crashes when changing device font size and then tapping on Profile icon #32515
Comments
Triggered auto assignment to @bfitzexpensify ( |
Job added to Upwork: https://www.upwork.com/jobs/~01977dd9f154104e64 |
Bug0 Triage Checklist (Main S/O)
|
Triggered auto assignment to Contributor-plus team member for initial proposal review - @allroundexperts ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.After changing the device font size, coming back to the app and open the Setting page, the app crashes. What is the root cause of that problem?The crash stack trace shows that the error comes from an App/src/libs/Navigation/linkTo.ts Lines 92 to 94 in ea6aac1
After we change the font device, it's normal that the app is restarted, but somehow this makes the root state becomes undefined What changes do you think we should make in order to solve the problem?Safely access the root state. -rootState.routes.at(-1)?.name
+rootState?.routes.at(-1)?.name Just like we did with App/src/libs/Navigation/getTopmostReportId.ts Lines 14 to 17 in f80fbe3
|
@bernhardoj's proposal looks good! 🎀 👀 🎀 C+ reviewed |
Triggered auto assignment to @iwiznia, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
Seems like this was fixed already |
It was? Where? |
ProposalPlease re-state the problem that we are trying to solve in this issue.Android - Settings - App crashes when changing device font size and then tapping on Profile icon What is the root cause of that problem?App crashed at this line by rootState is The root cause is after changing the font-size config app will be re-render at What changes do you think we should make in order to solve the problem?The func ....
const {isSmallScreenWidth} = useWindowDimensions();
+ const [isReady, setIsReady] = useState(false);
....
useEffect(() => {
if (!navigationRef.isReady() || !authenticated) {
return;
}
// We need to force state rehydration so the CustomRouter can add the CentralPaneNavigator route if necessary.
navigationRef.resetRoot(navigationRef.getRootState());
+ }, [isSmallScreenWidth, authenticated, isReady]);
....
<NavigationContainer
onStateChange={handleStateChange}
+ onReady={() => {
+ setIsReady(true);
+ onReady()
+ }} Then when Navigation call linkTo we can get rootState of navigation instead of What alternative solutions did you explore? (Optional) |
Ah, so the crash really happened on production app? |
My fix was not fixing the root cause, but just to avoid crash. As seen in typing, rootState is not optional so should not be undefined |
It's redundant. cc: @blazejkustra Are you still able to reproduce crash on latest main? |
Seems to be fixed on the latest main. I can also no longer reproduce this today. @suneox I see you had posted a proposal recently. Can you reproduce it? |
Currently it not happens on latest main but the root cause doesn't resolve.
My proposal can be resolve the root cause |
@iwiznia, @allroundexperts, @bfitzexpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
@allroundexperts do you agree we should make the fix @suneox proposes? |
Bump @allroundexperts - do you think the fix suggested by @suneox is worthwhile, even though this particular bug is no longer happening? |
I think we can close this as no longer crash happening. If any critical issue happens in the future with the same root cause, we can always reopen. |
Let me check another places same with this issue I'll feedback on tomorrow |
@iwiznia @allroundexperts @bfitzexpensify this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks! |
Any updated thoughts @suneox? |
I have tested and could not found any issue related with the root cause for this issue |
Thanks @suneox. OK, let's close this one out then. |
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: 1.4.8-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
Action Performed:
Expected Result:
App does not crash
Actual Result:
App crashes
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6302273_1701804101481.Screen_Recording_20231206_002437_New_Expensify.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: