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] Web - Console error shows up when creating room and opening room chat #25717

Closed
1 of 6 tasks
lanitochka17 opened this issue Aug 22, 2023 · 23 comments
Closed
1 of 6 tasks
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

@lanitochka17
Copy link

lanitochka17 commented Aug 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 #24643

Action Performed:

  1. Go to staging.new.expensify,com
  2. Create a new account
  3. Create a new workspace
  4. Create a public room

Expected Result:

No console error

Actual Result:

Console error shows up when room chat is opened

Workaround:

Unknown

Platforms:

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

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

Version Number: 1.3.56-7

Reproducible in staging?: Yes

Reproducible in production?: No

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

Bug6173787_20230822_132602.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/~01b3473e5d9167fdde
  • Upwork Job ID: 1717965957525639168
  • Last Price Increase: 2023-11-03
@lanitochka17 lanitochka17 added the DeployBlockerCash This issue or pull request should block deployment label Aug 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 Aug 22, 2023

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

@Pujan92
Copy link
Contributor

Pujan92 commented Aug 22, 2023

We are trying to parse the URL and relative href can't be parsed and that's why it jumps to the catch block where we are consoling the error. I think we can just remove console line here as it makes sense that some relative paths will fall down into the catch block for the AnchorRenderer.

console.error('Error parsing URL:', error);

@cead22
Copy link
Contributor

cead22 commented Aug 22, 2023

I don't think this is a bug or a blocker as this console.log seems to have been added for debugging purposes. We can decide to remove it if we want, and do so in any of the PRs submitted for this repo, but I suggest we close this

@cead22 cead22 added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels Aug 22, 2023
@cead22
Copy link
Contributor

cead22 commented Aug 22, 2023

It looks like this is failing in the constructor, and maybe instead of deleting that log line, we should update it to also log the url we're passing to the method

@roryabraham
Copy link
Contributor

Agreed that this doesn't seem like a bug, and certainly not a deploy blocker. It makes sense to me to remove the console.error there.

@shubham1206agra
Copy link
Contributor

Proposal

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

Web - Console error shows up when creating room and opening room chat

What is the root cause of that problem?

This is due to console.error being present in the places

console.error('Error parsing URL:', error);

and
console.error('Error parsing URLs:', error);

Why did new URL(url) fails?

It is because we are trying to parse links such as /settings/profile/display-name, which causes URL to fail as it requires a proper format (i.e., including origin).

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

We should use tryResolveUrlFromApiRoot to append the correct origin to the url if needed here

const attrHref = htmlAttribs.href || '';

to

const attrHref = tryResolveUrlFromApiRoot(htmlAttribs.href || '');

And remove console.error OR change to console.warn

Maybe Optional
In CONFIG.js

const expensifyComWithProxy = getPlatform() === 'web' && useWebProxy ? '/' : expensifyURL;

can be changed to get no problem with link rendering in the DEV server.

const expensifyComWithProxy = getPlatform() === 'web' && useWebProxy ? Url.addTrailingForwardSlash(window.location.origin) : expensifyURL;

What alternative solutions did you explore? (Optional)

@melvin-bot melvin-bot bot added the Overdue label Aug 25, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 28, 2023

@cead22 Huh... This is 4 days overdue. Who can take care of this?

@melvin-bot
Copy link

melvin-bot bot commented Aug 30, 2023

@cead22 Still overdue 6 days?! Let's take care of this!

@melvin-bot
Copy link

melvin-bot bot commented Sep 1, 2023

@cead22 Now this issue is 8 days overdue. Are you sure this should be a Daily? Feel free to change it!

@melvin-bot
Copy link

melvin-bot bot commented Sep 5, 2023

@cead22 12 days overdue now... This issue's end is nigh!

@cead22 cead22 added Weekly KSv2 and removed Daily KSv2 labels Sep 6, 2023
@melvin-bot melvin-bot bot removed the Overdue label Sep 6, 2023
@cead22 cead22 added the Monthly KSv2 label Sep 7, 2023
@cead22
Copy link
Contributor

cead22 commented Sep 7, 2023

Switching to monthly since this isn't a priority

@melvin-bot melvin-bot bot added the Overdue label Sep 18, 2023
@cead22
Copy link
Contributor

cead22 commented Sep 19, 2023

No update. Focused on W9 and this is not a priority

@melvin-bot melvin-bot bot removed the Overdue label Sep 19, 2023
@melvin-bot melvin-bot bot added the Overdue label Sep 27, 2023
@cead22 cead22 removed the Weekly KSv2 label Sep 28, 2023
@cead22
Copy link
Contributor

cead22 commented Sep 28, 2023

No update, focused on detailed design for Wave 9: Violations

@melvin-bot melvin-bot bot removed the Overdue label Sep 28, 2023
@cead22 cead22 added the External Added to denote the issue can be worked on by a contributor label Oct 27, 2023
@melvin-bot melvin-bot bot changed the title Web - Console error shows up when creating room and opening room chat [$500] Web - Console error shows up when creating room and opening room chat Oct 27, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 27, 2023

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

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

melvin-bot bot commented Oct 27, 2023

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

@melvin-bot melvin-bot bot added Daily KSv2 and removed Monthly KSv2 labels Oct 27, 2023
@cead22
Copy link
Contributor

cead22 commented Oct 27, 2023

It is because we are trying to parse links such as /settings/profile/display-name, which causes URL to fail as it requires a proper format (i.e., including origin).

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

We should use tryResolveUrlFromApiRoot to append the correct origin to the url if needed here

@Ollyws can you please review @shubham1206agra 's proposal? I think it looks good but I think we should fix the URL with tryResolveUrlFromApiRoot and not remove the console.error since that's what surfaced this issue. What do you think? cc @roryabraham

@cead22 cead22 changed the title [$500] Web - Console error shows up when creating room and opening room chat [$250] Web - Console error shows up when creating room and opening room chat Oct 27, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 27, 2023

Upwork job price has been updated to $250

@melvin-bot melvin-bot bot added the Overdue label Oct 30, 2023
@Ollyws
Copy link
Contributor

Ollyws commented Oct 30, 2023

I'm not seeing any console errors when creating or navigating to a public room on the latest main. Is this reproducible for anyone else?

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Oct 30, 2023
Copy link

melvin-bot bot commented Nov 3, 2023

@cead22, @Ollyws Whoops! This issue is 2 days overdue. Let's get this updated quick!

Copy link

melvin-bot bot commented Nov 3, 2023

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

@cead22
Copy link
Contributor

cead22 commented Nov 6, 2023

@lanitochka17 can you re-test and see if you can still reproduce please?

@melvin-bot melvin-bot bot removed the Overdue label Nov 6, 2023
@lanitochka17
Copy link
Author

Issue is not reproduced on latest build 1.3.96-5
Windows10/Chrome

Recording.385.mp4

@cead22 cead22 closed this as completed Nov 8, 2023
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