Skip to content
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

[$250] Search - Search section loads infinitely when opened after logging in #53285

Closed
3 of 8 tasks
IuliiaHerets opened this issue Nov 28, 2024 · 12 comments
Closed
3 of 8 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Internal Requires API changes or must be handled by Expensify staff Reviewing Has a PR in review

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Nov 28, 2024

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: 9.0.68-0
Reproducible in staging?: Y
Reproducible in production?: Y
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team

Action Performed:

  1. Open the Expensify app.
  2. Log in with any Gmail account.
  3. When logged in, tap on "Search" on the bottom of the screen.
  4. Verify that search section and all the content in it, loads smoothly.

Expected Result:

Search section and all the content in it, should load smoothly when opened.

Actual Result:

Search section loads infinitely when opened just after logging in.

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6679422_1732821969147.Infinitelly.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021863519972369952192
  • Upwork Job ID: 1863519972369952192
  • Last Price Increase: 2024-12-02
Issue OwnerCurrent Issue Owner: @luacmartins
@IuliiaHerets IuliiaHerets added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Nov 28, 2024
Copy link

melvin-bot bot commented Nov 28, 2024

Triggered auto assignment to @bfitzexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

@daledah
Copy link
Contributor

daledah commented Nov 29, 2024

This is a BE Bug. Search API returns no Onyx data.

Screenshot 2024-11-29 at 08 12 04

@huult
Copy link
Contributor

huult commented Nov 29, 2024

Proposal

Please re-state the problem that we are trying to solve in this issue.

Search section loads infinitely when opened after logging in

What is the root cause of that problem?

We called the search API with this jsonQuery, but the response returned an empty onyxData array.

jsonQuery: {"type":"expense","status":"all","sortBy":"date","sortOrder":"desc","filters":null,"inputQuery":"type:expense status:all sortBy:date sortOrder:desc","hash":243428839,"recentSearchHash":422547233,"offset":0}

The reason for the empty onyxData array might be that the backend validated the query as having the wrong format or something similar.

And since onyxData is an empty array, shouldShowLoadingState always returns false, which is why the loading state is not hidden.

const shouldShowLoadingState = !isOffline && !isDataLoaded;

if (shouldShowLoadingState) {

What changes do you think we should make in order to solve the problem?

To resolve this issue, we need to do two things:

  1. Double-check the JSON query to match the backend's requirements.
  2. Handle the case where onyxData is an empty array.

//src/components/Search/index.tsx#L308
+    if (searchResults === undefined && !isOffline) {
+        setShouldShowStatusBarLoading(false);

+        return (
+            <View style={[shouldUseNarrowLayout ? styles.searchListContentContainerStyles : styles.mt3, styles.flex1]}>
+                <EmptySearchView type={type} />
+            </View>
+        );
+    }
POC Screenshot 2024-11-29 at 11 37 23

What alternative solutions did you explore? (Optional)

@melvin-bot melvin-bot bot added the Overdue label Dec 2, 2024
@mountiny mountiny added the External Added to denote the issue can be worked on by a contributor label Dec 2, 2024
@melvin-bot melvin-bot bot changed the title Search - Search section loads infinitely when opened after logging in [$250] Search - Search section loads infinitely when opened after logging in Dec 2, 2024
Copy link

melvin-bot bot commented Dec 2, 2024

Job added to Upwork: https://www.upwork.com/jobs/~021863519972369952192

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Dec 2, 2024
Copy link

melvin-bot bot commented Dec 2, 2024

Triggered auto assignment to Contributor-plus team member for initial proposal review - @akinwale (External)

@melvin-bot melvin-bot bot removed the Overdue label Dec 2, 2024
@mountiny
Copy link
Contributor

mountiny commented Dec 2, 2024

cc @luacmartins @lakchote can you have a look into this?

Copy link

melvin-bot bot commented Dec 2, 2024

@bfitzexpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@luacmartins
Copy link
Contributor

@daledah the requestID shared here shows no errors for that request. Do you have expense data in that account?

@akinwale
Copy link
Contributor

akinwale commented Dec 3, 2024

@huult Could you clarify what you mean by "Double-check the JSON query to match the backend's requirements." in your proposed solution?

@huult
Copy link
Contributor

huult commented Dec 3, 2024

@akinwale Yes, I mean we need to check with the backend why this JSON query has returned Onyx with an empty array, and this resolved it

@luacmartins luacmartins added Reviewing Has a PR in review and removed Help Wanted Apply this label when an issue is open to proposals by contributors External Added to denote the issue can be worked on by a contributor labels Dec 3, 2024
@luacmartins luacmartins added the Internal Requires API changes or must be handled by Expensify staff label Dec 3, 2024
@luacmartins
Copy link
Contributor

This is entirely internal. So gonna unassign BZ and C+

@luacmartins
Copy link
Contributor

This is fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Internal Requires API changes or must be handled by Expensify staff Reviewing Has a PR in review
Projects
None yet
Development

No branches or pull requests

7 participants