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

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

Closed
1 of 6 tasks
kbecciv opened this issue Sep 22, 2023 · 17 comments
Closed
1 of 6 tasks

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

kbecciv opened this issue Sep 22, 2023 · 17 comments
Assignees
Labels
Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors

Comments

@kbecciv
Copy link

kbecciv commented Sep 22, 2023

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
@kbecciv kbecciv added the DeployBlockerCash This issue or pull request should block deployment label Sep 22, 2023
@OSBotify
Copy link
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.

@melvin-bot
Copy link

melvin-bot bot commented Sep 22, 2023

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

@mountiny
Copy link
Contributor

I cannot repro, demoting

@melvin-bot melvin-bot bot added the Overdue label Sep 25, 2023
@mountiny mountiny added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 Overdue labels Sep 25, 2023
@mountiny mountiny added External Added to denote the issue can be worked on by a contributor and removed Overdue labels Sep 25, 2023
@melvin-bot melvin-bot bot changed the title Web - Login - Console error shows up after logging in [$500] Web - Login - Console error shows up after logging in Sep 25, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 25, 2023

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 25, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 25, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Sep 25, 2023

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

@mountiny
Copy link
Contributor

Maybe its not repro and we can close it

@jjcoffee
Copy link
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.

@JawadSadiq01
Copy link

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

@melvin-bot melvin-bot bot added the Overdue label Sep 28, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 29, 2023

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

@mallenexpensify
Copy link
Contributor

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

@melvin-bot melvin-bot bot removed the Overdue label Oct 2, 2023
@jjcoffee
Copy link
Contributor

jjcoffee commented Oct 2, 2023

@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.

@JawadSadiq01
Copy link

@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.

@melvin-bot
Copy link

melvin-bot bot commented Oct 2, 2023

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

@jjcoffee
Copy link
Contributor

jjcoffee commented Oct 4, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Oct 4, 2023

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

@tylerkaraszewski
Copy link
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
Labels
Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors
Projects
None yet
Development

No branches or pull requests

7 participants