-
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-02-20] [HOLD for payment 2024-02-19] [HOLD for payment 2024-02-15] [$500] Camera doesn't load when trying to smartscan a receipt #36098
Comments
Job added to Upwork: https://www.upwork.com/jobs/~0176ddbc1361cf082e |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @s77rt ( |
Triggered auto assignment to @garrettmknight ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Camera fails to load after navigating away and then returning to it What is the root cause of that problem?When user captures the photo first time and navigate to next screen, camera is set inactive here. App/src/pages/iou/request/step/IOURequestStepScan/NavigationAwareCamera/index.native.js Lines 13 to 23 in 9f37d3e
This causes the camera library to disable camera when users navigates away from TabNavigator. On refocus the video capture is re-enabled. However it throws below error. DEBUG [warn] Error taking photo - {"name":"unknown/unknown","_code":"unknown/unknown","_message":"[unknown/unknown] Not bound to a valid Camera [ImageCapture:androidx.camera.core.ImageCapture-eab74056-9b89-4653-8288-e44bc9b65a66]"} Though camera is enabled on refocus, photo capture fails. This looks like a bug in react-native-vision camera. What changes do you think we should make in order to solve the problem?Looks like a fix is available upstream mrousavy/react-native-vision-camera#2339. But it is available only in release v3.70. We've pinned Line 164 in 9f37d3e
So one option is to upgrade to Instead what I found is that the camera gets re-enabled if we toggle the photo prop of const isCameraActive = useTabNavigatorFocus({tabIndex: cameraTabIndex});
return (
<Camera
ref={ref}
// eslint-disable-next-line react/jsx-props-no-spreading
{...props}
isActive={isCameraActive}
// Toggle the photo prop as well
photo={isCameraActive}
/>
); Result Record_2024-02-08-08-28-15_out.mp4What alternative solutions did you explore? (Optional)None |
Asked in thread here. Is this a deploy blocker if on staging only, or a fire if it's already on prod? It's a core flow, so if the camera can't load to take a receipt that's pretty bad! |
@aswin-s no we cannot simply update to v3, there are some feature missing unfortunately, like flash. @janicduplessis @ishpaul777 any chance this could be stemming from this update? i see the camera worked for you both in the PR, not sure clearly ifyou have gone back and again to the camera, I would assume yes #35014 |
@mountiny I've detailed how we can fix this without a version upgrade |
We are looking into it whether we can find a better solution than the proposed workaround, give us a moment please!
|
It appears that the root cause is stemming from the react-native-vision-camera upstream, so i dont think this comes from autofocus PR, Also this is hard to reproduce (at least on my device) Camera turns active before i get the chance to click the capture button. |
I can reproduce it on Samsung M 52. Screen_Recording_20240208_144156_New.Expensify.mp4 |
👋 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:
|
Triggered auto assignment to @youssef-lr ( |
Production -not reproduced Screen_Recording_20240208_143925_New.Expensify.mp4 |
QA has confirmed this is not repro in production https://expensify.slack.com/archives/C9YU7BX5M/p1707397831272999?thread_ts=1707394006.658679&cid=C9YU7BX5M Curious what change from the recent deploy could have caused this |
This is a regression from #32471 where 🎀 👀 🎀 C+ reviewed |
Current assignee @youssef-lr is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new. |
@situchan can you please continue with the review on the PR |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.38-6 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-02-15. 🎊 For reference, here are some details about the assignees on this issue:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
Released in latest vc2 tag on npm. |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.39-8 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-02-19. 🎊 For reference, here are some details about the assignees on this issue:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.40-5 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-02-20. 🎊 For reference, here are some details about the assignees on this issue:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 1.4.38-1
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: @rlinoz
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1707336890268789
Action Performed:
Expected Result:
Able to scan the receipt again
Actual Result:
Camera doesn't load when trying to smartscan
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
az_recorder_20240207_173011.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: