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

[HOLD for payment Aug 12] Infinite loading screen when the user manually enters a reportID starting without a number #4319

Closed
aman-atg opened this issue Jul 30, 2021 · 8 comments
Assignees
Labels
Engineering External Added to denote the issue can be worked on by a contributor Improvement Item broken or needs improvement. Reviewing Has a PR in review Weekly KSv2

Comments

@aman-atg
Copy link
Contributor

aman-atg commented Jul 30, 2021

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!

Upwork post: https://www.upwork.com/jobs/~01810669bc6137e1a3


Action Performed:

  1. Login to new expensify
  2. Enter any letter after r/ in the URL
  3. Infinite loading screen is displayed

Expected Result:

Open a chat room with Concierge and show the required error message

chatIssue.mp4

Actual Result:

image

bug.mp4

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

Platform:

Where is this issue occurring?

  • Web
  • Mobile Web

Version Number:
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Expensify/Expensify Issue URL:

View all open jobs on Upwork

@aman-atg aman-atg added AutoAssignerTriage Auto assign issues for triage to an available triage team member Daily KSv2 labels Jul 30, 2021
@MelvinBot
Copy link

Triggered auto assignment to @kadiealexander (AutoAssignerTriage), see https://stackoverflow.com/c/expensify/questions/4749 for more details.

@MelvinBot MelvinBot removed the AutoAssignerTriage Auto assign issues for triage to an available triage team member label Jul 30, 2021
@aman-atg
Copy link
Contributor Author

Proposal

Explaination

  • It's happening because we're returning NaN here as a reportID
    * @returns {Number}
    */
    getReportID() {
    const params = this.props.route.params;
    return Number.parseInt(params.reportID, 10);
    }

Solution

    getReportID() {
        const params = this.props.route.params;
        const id = Number.parseInt(params.reportID, 10);
        if (_.isNaN(id)) {
            handleInaccessibleReport();
        }
        return Number.parseInt(params.reportID, 10);
    }
  • We can redirect the user to Concierge's Chat and show an error message by defining a reusable function inside src/libs/actions/Report.js that can be named something like handleInaccessibleReport
/**
 * Handle the navigation when report is inaccessible
 */
function handleInaccessibleReport() {
    Growl.error(translateLocal('notFound.chatYouLookingForCannotBeFound'));
    navigateToConciergeChat();
}
  • This function can be reused here as well
    .catch((err) => {
    if (err.message === CONST.REPORT.ERROR.INACCESSIBLE_REPORT) {
    Growl.error(translateLocal('notFound.chatYouLookingForCannotBeFound'));
    // eslint-disable-next-line no-use-before-define
    navigateToConciergeChat();
    }
    });

@kadiealexander
Copy link
Contributor

I was able to reproduce this via testing. Sending to engineering!

@MelvinBot
Copy link

Triggered auto assignment to @pecanoro (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@pecanoro pecanoro removed their assignment Aug 2, 2021
@pecanoro pecanoro added Improvement Item broken or needs improvement. External Added to denote the issue can be worked on by a contributor labels Aug 2, 2021
@MelvinBot
Copy link

Triggered auto assignment to @Jag96 (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

@Jag96 Jag96 added the Exported label Aug 2, 2021
@MelvinBot MelvinBot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 2, 2021
@Jag96
Copy link
Contributor

Jag96 commented Aug 2, 2021

Job has been posted, @aman-atg your proposal looks good to me, I've invited you to the Upwork job. I'll assign you once you accept and then you're free to create a PR!

@aman-atg
Copy link
Contributor Author

aman-atg commented Aug 2, 2021

Accepted! (Proposal)

@Jag96 Jag96 removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 2, 2021
@Jag96 Jag96 added Weekly KSv2 and removed Daily KSv2 labels Aug 2, 2021
@Jag96 Jag96 added the Reviewing Has a PR in review label Aug 3, 2021
@Jag96 Jag96 changed the title Infinite loading screen when the user manually enters a reportID starting without a number [HOLD for payment Aug 12] Infinite loading screen when the user manually enters a reportID starting without a number Aug 5, 2021
@Jag96
Copy link
Contributor

Jag96 commented Aug 13, 2021

Paid + bonus!

@Jag96 Jag96 closed this as completed Aug 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Engineering External Added to denote the issue can be worked on by a contributor Improvement Item broken or needs improvement. Reviewing Has a PR in review Weekly KSv2
Projects
None yet
Development

No branches or pull requests

5 participants