App
App copied to clipboard
[$1000] App displays fixed set of results for few seconds and closes when using symbols like (,@,?,# on first open in address1 field of home address
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Action Performed:
- Open the app
- Open settings
- Open Profile
- Open Personal details
- Open Home address
- Remove current entry in address 1 field and enter any of the following symbol : (,@,?,# and observe the result
- Press on back button
- Again open home address
- Remove current entry in address 1 field and enter any letter eg: a
- Observe the results
Expected Result:
If no results are present for the entry, app shouldn't display any result and if there are results for the entry, app should display those results
Actual Result:
App displays fixed set of result everytime for symbols and when trying with any letter, it again displays same fixed set of result first for 1-2 seconds before displaying actual results
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
- [x] Android / native
- [x] Android / Chrome
- [x] iOS / native
- [x] iOS / Safari
- [x] MacOS / Chrome / Safari
- [x] MacOS / Desktop
Version Number: 1.2.88-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 Notes/Photos/Videos:
https://user-images.githubusercontent.com/43996225/226756931-32da33d6-8bf3-40b4-9212-957032fab0b3.mp4
https://user-images.githubusercontent.com/43996225/226756950-09ee4fcb-6d46-437e-8164-1cdd7508426e.mp4
Expensify/Expensify Issue URL: Issue reported by: @dhanashree-sawant Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1679409645222509
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~017c127888b5f727a7
- Upwork Job ID: 1646583218445266944
- Last Price Increase: 2023-04-13
Triggered auto assignment to @johncschuster (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details.
Bug0 Triage Checklist (Main S/O)
- [ ] This "bug" occurs on a supported platform (ensure
Platforms
in OP are ✅) - [ ] This bug is not a duplicate report (check E/App issues and #expensify-bugs)
- If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
- [ ] This bug is reproducible using the reproduction steps in the OP. S/O
- If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
- If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
- [ ] This issue is filled out as thoroughly and clearly as possible
- Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
- [ ] I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync
@johncschuster Eep! 4 days overdue now. Issues have feelings too...
@johncschuster Still overdue 6 days?! Let's take care of this!
@johncschuster Now this issue is 8 days overdue. Are you sure this should be a Daily? Feel free to change it!
@johncschuster this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!
@johncschuster 12 days overdue now... This issue's end is nigh!
This issue has not been updated in over 14 days. @johncschuster eroding to Weekly issue.
@johncschuster this issue is now 3 weeks old. There is one more week left before this issue breaks WAQ. What needs to happen to get a PR in review this week? Please create a thread in #expensify-open-source to discuss. Thanks!
Triggered auto assignment to @lschurr (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details.
John is OOO, reassigning so this gets actioned. thanks!
Bug0 Triage Checklist (Main S/O)
- [ ] This "bug" occurs on a supported platform (ensure
Platforms
in OP are ✅) - [ ] This bug is not a duplicate report (check E/App issues and #expensify-bugs)
- If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
- [ ] This bug is reproducible using the reproduction steps in the OP. S/O
- If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
- If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
- [ ] This issue is filled out as thoroughly and clearly as possible
- Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
- [ ] I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync
I'm not able to reproduce this. When I enter a symbol, I get no suggested results at all.
Triggered auto assignment to @flodnv (Engineering
), see https://stackoverflow.com/c/expensify/questions/4319 for more details.
@flodnv are you able to reproduce this?
I can't reproduce either. Assuming this is fixed. Please reopen if I'm mistaken.
Hi @laurenreidexpensify, @flodnv, am still able to recreate the issue. Can you try it again by following same steps as attached video? Let me know for any doubts.
https://user-images.githubusercontent.com/87513216/231850112-5fd1cda8-0d70-43ed-a98e-109a25ad1422.mp4
Oh wow, now I see it! It only happens on the first try, if you missed it you have to try again.
Job added to Upwork: https://www.upwork.com/jobs/~017c127888b5f727a7
Current assignee @lschurr is eligible for the External assigner, not assigning anyone new.
Triggered auto assignment to Contributor-plus team member for initial proposal review - @Santhosh-Sellavel (External
)
Current assignee @flodnv is eligible for the External assigner, not assigning anyone new.
Proposal
Please re-state the problem that we are trying to solve in this issue.
The app displays fixed set of results for a few seconds and closes when using symbols like (,@,?,# on first open in address1 field of the home address
What is the root cause of that problem?
When every time the input change, we will call an API, and calling the API takes a few seconds.
For example, at the beginning the input is 'london' and then we remove letter by letter and enter "?". The order of API will be
- The API will call with "londo" params
- The API will call with "lond" params
- The API will call with "lon" params
- The API will call with "lo" params
- The API will call with "l" params
- The API will call with "?" params
After the "?" character is entered, the second or third API is responded and this result is updated, then the suggested data is displayed. After a moment, the sixth API is responded then the correct data is updated.
Although we call _abortRequests whenever the query change to abort the previous requests but we're putting _results and _requests in
https://github.com/Expensify/react-native-google-places-autocomplete/blob/e12768f1542e7982d90f6449798f0d6b7f18f192/GooglePlacesAutocomplete.js#L72-L73
That make _requests is always empty whenever the component is rendered
What changes do you think we should make in order to solve the problem?
Solution 1: We should move these lines https://github.com/Expensify/react-native-google-places-autocomplete/blob/e12768f1542e7982d90f6449798f0d6b7f18f192/GooglePlacesAutocomplete.js#L72-L73
to outside of GooglePlacesAutocomplete
let _results = [];
let _requests = [];
export const GooglePlacesAutocomplete = forwardRef((props, ref) => {
Solution 2: We can use useRef for _results and _requests
What alternative solutions did you explore? (Optional)
NA
Proposal
Please re-state the problem that we are trying to solve in this issue.
GooglePlacesAutocomplete shows last api response data when we don't wait for the last character suggestions to be shown and remove it fast and then insert any character.
What is the root cause of that problem?
Basically when we remove last character fast from the input text before it's api gets completed, below is the flow
eg. current TextInput value is ab
- It is showing the suggestions for the text
ab
- Remove both characters fast with the delete/backspace key
- When letter
b
is deleted, it will make an api call for lettera
- Before the api responded with the result we are removing letter
a
, so datasource turns to an empty array and then it fills with the latter response ofa
- Now whenever we type any letter, it will first show suggestions of the existing datasource result for a moment till it won't fetch new results
https://user-images.githubusercontent.com/14358475/232017804-e54e3f27-d76e-4768-94a6-21bb78341b8c.mov
What changes do you think we should make in order to solve the problem?
When the TextInput gets empty we should first abort the existing requests and then update the datasource to the empty array here.
_abortRequests();
https://github.com/Expensify/react-native-google-places-autocomplete/blob/e12768f1542e7982d90f6449798f0d6b7f18f192/GooglePlacesAutocomplete.js#L558-L561
We can raise an issue to the actual lib https://github.com/FaridSafi/react-native-google-places-autocomplete or we can apply the change in our forked repo.
@dukenv0307
When the input is cleared, we will destroy all before APIs
How are you planning to do that?
Bump @Santhosh-Sellavel @dukenv0307
@flodnv @lschurr @Santhosh-Sellavel this issue is now 4 weeks old and preventing us from maintaining WAQ, can you:
- Decide whether any proposals currently meet our guidelines and can be approved as-is today
- If no proposals meet that standard, please take this issue internal and treat it as one of your highest priorities
- If you have any questions, don't hesitate to start a discussion in #expensify-open-source
Thanks!
Current assignee @Santhosh-Sellavel is eligible for the Internal assigner, not assigning anyone new.
@Santhosh-Sellavel @lschurr I've updated my proposal a bit: https://github.com/Expensify/App/issues/16367#issuecomment-1508094399 Please help take a look
@Pujan92 Already _abortRequests is called here I'm not sure what difference it makes can you explain?