Skip to content

[$500] Web - Login - Console error shows up after logging in #28042

Closed

Description

@kbecciv

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Issue found when executing PR #23390

Action Performed:

  1. Go to staging.new.expensify.com
  2. Log in to any account.

Expected Result:

There is no console error after successfully logging in.

Actual Result:

Console error shows up after logging in.

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.73.0
Reproducible in staging?: y
Reproducible in production?: n
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: Any additional supporting documentation

Bug6210675_20230922_222316.mp4

Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~011309d5c068a9ccee
  • Upwork Job ID: 1706215107655745536
  • Last Price Increase: 2023-10-02

Activity

  1. OSBotify commented on Sep 22, 2023

    @OSBotify
    Contributor

    👋 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:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  2. melvin-bot commented on Sep 22, 2023

    @melvin-bot

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

  3. mountiny commented on Sep 25, 2023

    @mountiny
    Contributor

    I cannot repro, demoting

  4. added and removed
    DeployBlockerCashThis issue or pull request should block deployment
    on Sep 25, 2023
  5. 7 remaining items

  6. melvin-bot commented on Sep 25, 2023

    @melvin-bot

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

  7. mountiny commented on Sep 25, 2023

    @mountiny
    Contributor

    Maybe its not repro and we can close it

  8. jjcoffee commented on Sep 25, 2023

    @jjcoffee
    Contributor

    I'm 99% sure this only happens for AuthenticatePusher calls where the channel name is private-report-reportID-null, which only happens if you have report_null in your Onyx data (which would have come from this issue which is now fixed). So no bad side-effects really and I think we can close.

  9. JawadSadiq01 commented on Sep 25, 2023

    @JawadSadiq01

    Proposal

    Please re-state the problem that we are trying to solve in this issue.
    Login - Console error shows up after logging in

    What is the root cause of that problem?
    At src/libs/action/Report.js#179, "reportId" has a string value which is "null". The if condition at line#179 fails, because if(!reportId) return false and the code does not return. And due to this, it's returning private-report-reportID-null string. In this, the null is due to reportId === "null". The Pusher api(http://localhost:8082/api?command=AuthenticatePusher) runs with channel_name: private-report-reportID-null and prints error of 404 on the console.

    What changes do you think we should make in order to solve the problem?
    You just have to change the if block condition with the below code on src/libs/action/Report.js#179.

    if (!reportID || reportID === null) {
            return;
    }
    

    or

    if (!JSON.parse(reportID)) {
            return;
    }
    

    Now the AuthenticatePusher will be execute with a valid reportId, and no error would be log in the console. It will not through 404 error in the Network tab

    What alternative solutions did you explore? (Optional)
    NA

    See Attachment
    image
    image

  10. melvin-bot commented on Sep 29, 2023

    @melvin-bot

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

  11. mallenexpensify commented on Oct 2, 2023

    @mallenexpensify
    Contributor

    @jjcoffee please review @JawadSadiq01 's proposal above
    #28042 (comment)

  12. jjcoffee commented on Oct 2, 2023

    @jjcoffee
    Contributor

    @mallenexpensify I'm not sure if this is worth fixing, see my earlier comment. I don't think we really want to be handling having a report with a null ID.

  13. JawadSadiq01 commented on Oct 2, 2023

    @JawadSadiq01

    @jjcoffee, @mallenexpensify Yes, this bug currently doesn't cause any problems for the app because the page redirects, but it's still showing up in the console. If the same code is used elsewhere in the app, it could crash the entire page(bcz of 404 error) if reportId is equal to null. It's a quick fix, only taking about 2 minutes.

  14. melvin-bot commented on Oct 2, 2023

    @melvin-bot

    📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

  15. jjcoffee commented on Oct 4, 2023

    @jjcoffee
    Contributor

    So just to sum up in @JawadSadiq01's proposal we would be actively adding a check for a null reportID. This would handle cases where (as I understand it) we've optimistically added a report with a null ID (so you end up with report_null in Onyx) due to a typo that has since been fixed.

    Personally I don't think this is worth handling, and I don't agree that it would cause a crash (pretty sure we would have seen reports of this too!). If we do want to fix, we can go with @JawadSadiq01's proposal. I'll leave it up to the engineer to make the final decision.

    🎀👀🎀 C+ reviewed

  16. melvin-bot commented on Oct 4, 2023

    @melvin-bot

    Current assignee @tylerkaraszewski is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.

  17. tylerkaraszewski commented on Oct 4, 2023

    @tylerkaraszewski
    Contributor

    I'm gonna close, it seems like this doesn't need to be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

DailyKSv2EngineeringExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributors

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions