-
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
[HOLD for payment 2024-11-20] [$250] Scan - Infinite loading for scan option if it is selected after manual. #51821
Comments
Triggered auto assignment to @joekaufmanexpensify ( |
@joekaufmanexpensify FYI 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 that this bug might be related to #wave-collect - Release 1 |
Reproduced. 2024-10-31_17-16-09.mp4 |
Job added to Upwork: https://www.upwork.com/jobs/~021852097315271105119 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ntdiary ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.When switching from the "manual" option to the "scan" option in the app, the user encounters an infinite loading screen rather than seeing the camera interface or receiving a camera permissions prompt. What is the root cause of that problem?The problem arises because the App/src/hooks/useTabNavigatorFocus/index.ts Lines 53 to 82 in bfce277
What changes do you think we should make in order to solve the problem?To fix this, we need a robust synchronization between
This approach maintains state accuracy across tab changes, ensuring the scan tab loads the camera or permissions prompt as intended.
What alternative solutions did you explore? (Optional)One alternative solution considered was to use a custom animation trigger to monitor tab focus directly. However, this approach would have added complexity without fully addressing the root cause related to synchronization between Attached screen record of local version with above fix in iphone-scan-test.mp4 |
Edited by proposal-police: This proposal was edited at 2024-11-05 10:40:31 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.When open IOU with the Manual tab and switching to the Scan tab, the camera loads infinitely. What is the root cause of that problem?After PR #51020 was merged, which removed the use of animation state from
So
The camera cannot get the permission state if App/src/pages/iou/request/step/IOURequestStepScan/index.tsx Lines 172 to 174 in bfce277
So it shows a spinner. App/src/pages/iou/request/step/IOURequestStepScan/index.tsx Lines 616 to 617 in bfce277
What changes do you think we should make in order to solve the problem?Use the navigation state instead of the animation state as the source of truth to detect the active tab by replacing import {useIsFocused} from '@react-navigation/native';
const isTabActive = useIsFocused(); App/src/pages/iou/request/step/IOURequestStepScan/NavigationAwareCamera/WebCamera.tsx Line 11 in 6778419
const shouldShowCamera = useIsFocused(); What alternative solutions did you explore? (Optional)The mentioned PR addressed a very minor issue #50265, so maybe it could simply be reverted. |
Under review. I think the RCA in @QichenZhu's proposal is correct, but I don't think it's necessary to revert that PR for this issue. As for those alternative solutions, I've noticed several issues related to camera scan before, so need more time to verify to ensure there are no regressions. :) |
@QichenZhu, regarding your alternative solutions, I think removing |
On web platforms, since tabPositionAnimation is actually an AnimatedDivision instance, so the listener won't be called.
I agree with @QichenZhu’s proposal and think replacing test.mp4🎀 👀 🎀 C+ reviewed |
Triggered auto assignment to @yuwenmemon, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
📣 @QichenZhu 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
PR merged, awaiting deploy to staging |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.60-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2024-11-20. 🎊 For reference, here are some details about the assignees on this issue:
|
@ntdiary @joekaufmanexpensify @ntdiary The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button] |
@ntdiary could you handle checklist so we can prep for payment? |
BugZero Checklist:
Bug classificationSource of bug:
Where bug was reported:
Who reported the bug:
Regression Test ProposalPrecondition:Test:
Do we agree 👍 or 👎 |
Regression test is here: https://github.com/Expensify/Expensify/issues/446317 |
All set to pay. We need to pay:
|
@QichenZhu $250 sent and contract ended! |
Upwork job closed. |
@ntdiary Please feel free to request at your earliest convenience. Closing for now as that is the only thing left! |
$250 approved for @ntdiary |
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.56-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/5168073&group_by=cases:section_id&group_order=asc&group_id=309127
Issue reported by: Applause - Internal Team
Action Performed:
Expected Result:
"Take a photo, Camera access is required to take pictures of receipts" or a camera interface are displayed
Actual Result:
Infinite loading for scan option if it is selected after manual
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6651242_1730388131736.Infinite_loading_for_scan_option_if_it_is_selected_after_manual.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @joekaufmanexpensifyThe text was updated successfully, but these errors were encountered: