-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[Due for payment 2025-03-17] [$500] Desktop - Scan receipts - There is a delay after clicking the submit expense button #52668
Comments
Triggered auto assignment to @zanyrenney ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.There is a delay after clicking the submit expense button What is the root cause of that problem?In Lines 24 to 27 in 63c8dd2
it mentioned that we need to provide the What changes do you think we should make in order to solve the problem?This issue happens if we don't provide If on desktop.ts
What alternative solutions did you explore? (Optional) |
Nice, looks like we also already have a proposal. |
Moving ahead here. |
Job added to Upwork: https://www.upwork.com/jobs/~021858847049782861721 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @c3024 ( |
Hi I checked that and i find the root cause. Basically we are calling the api and api takes time to write the data especially while we uploaidng the image. In order to prevent multiple clicks, they are using the
### The Solution is We can display the ActivityIndicator until api success or fails on Press of SubmitExpenses. Also, I see lot of warnings(94) in the code that needs to be addressed. Contributor details |
|
@c3024 What do you think about my proposal? Thanks |
Hi @c3024 |
📣 @dipanshujindal1992! 📣
|
Thanks for the tags. @daledah , I will update soon. @dipanshujindal1992 , Please check out the contributing guidelines. Only proposals in the format given there will be reviewed. |
Hi @c3024 I uploaded the content as your format. May i know what is missing in my format? Contributor details |
|
@daledah , CONFIG.GCP_GEOLOCATION_API_KEY;
const getCurrentPosition: GetCurrentPosition = (success, error, options) => {
if (navigator === undefined || !('geolocation' in navigator) || !CONFIG.GCP_GEOLOCATION_API_KEY) {
...
return;
} on desktop, we will skip fetching coordinates everytime. I think it needs to be found if the check navigator.permissions.query({name: 'geolocation'}) in |
@c3024 But on desktop, we need to add Lines 24 to 27 in 63c8dd2
that why I think we should add |
There may be an issue with the 🎀 👀 🎀 |
📣 @wildan-m 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
@dannymcclain @dubielzyk-expensify @shawnborton Complete flow Kapture.2025-02-11.at.17.16.11.mp4 |
Why is the loading spinner so long? Is this expected or are we testing this on slower networks? As for the screen where location permission already has been denied, we should use this copy: After they tap Settings, I think we should actually stay on that dialog until we've detected that they've turned on Location permission. Do we really need to relaunch the app to make use of the new permission? On macOS I've noticed that location permission seems to not do that for other apps, but for things like screen recording permission you have to trigger a relaunch. The reason why I'm hesitant with a relaunch is that we'll break their flow and discard their work so far, right? So I'd rather not lose the image and things they've done unless it's crucial for us to have that information before proceeding? |
This is the specific case when we disabled the location service, we currently set the timeout to get location at 15 seconds. Can we reduce the time? unfortunately we shouldn't. When we invoke navigator.geolocation.getCurrentPosition, it may complete quickly or take up to tens seconds. If we were to shorten the timeout to, let's say, 5 seconds, we might never get location coordinate, since the timeout will reached before it. In summary, the delay is unavoidable.
That screen will remain, but we add additional screen for desktop after user tapping
After re-testing, the location can be fetched directly without needing to re-launch. The initial reason I suggested this was because previously it did not take effect immediately after toggling the location service. I will test the solution without re-launching and update you on whether it is still necessary. |
Sounds good—I agree with all of Jon's comments. |
Yup, agree as well - glad we don't need to force the user to relaunch the app, that felt weird! |
@dubielzyk-expensify when the setting enabled, there is no OS event that directly tells the app that some settings has been modified. Our options are:
@luacmartins @c3024 any suggestion which way to choose? |
I can't speak to technicalities, but I prefer 1 or 2 over a relaunch at least. If 2 is reliable, then that feels pretty reaasonable to me. I feel like option 3 is a foreign concept to a user, but maybe with the right copy like "Retry" or something. Still prefer 1 and 2, but I'll let the technical part for others. |
Yea, both (1) and (2) LGTM. I think we can use a combination of them.
|
I'd prefer 2 to avoid constant polling. |
@luacmartins when we call requestMoney, we save the GPS coordinates of the receipt. However, I noticed that there was no location information in the response for the transaction. Could you clarify what that location is used for and where it is stored? |
It is used to guess the currency and timezone of the user submitting the receipt to improve the accuracy of currency detection. The backend uses it for this purpose but does not return it in the response. |
@c3024 Thanks for clarification, I guess only dev can fully verify the result then. The PR is ready #57660. Thanks! |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.10-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 2025-03-17. 🎊 For reference, here are some details about the assignees on this issue:
|
@c3024 @zanyrenney @c3024 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] |
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: v9.0.63-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: https://expensify.testrail.io/index.php?/tests/view/5231836&group_by=cases:section_id&group_id=294998&group_order=asc
Issue reported by: Applause Internal Team
Action Performed:
Expected Result:
The submitting expense flow using scanning option is smooth
Actual Result:
There is a delay after clicking the submit expense button
Workaround:
Unknown
Platforms:
Screenshots/Videos
Bug6666749_1731706218416.scan_receipt.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @zanyrenneyThe text was updated successfully, but these errors were encountered: