Skip to content

[$250] Web - Console error shows up when creating room and opening room chat #25717

Closed

Description

@lanitochka17

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

Activity

  1. OSBotify commented on Aug 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 Aug 22, 2023

    @melvin-bot

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

  3. Pujan92 commented on Aug 22, 2023

    @Pujan92
    Contributor

    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);

  4. cead22 commented on Aug 22, 2023

    @cead22
    Contributor

    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

  5. added and removed
    DeployBlockerCashThis issue or pull request should block deployment
    on Aug 22, 2023
  6. cead22 commented on Aug 22, 2023

    @cead22
    Contributor

    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

  7. roryabraham commented on Aug 23, 2023

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

  8. shubham1206agra commented on Aug 23, 2023

    @shubham1206agra
    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)

  9. 22 remaining items

  10. cead22 commented on Oct 27, 2023

    @cead22
    Contributor

    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

  11. 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[/+] on Oct 27, 2023
  12. melvin-bot commented on Oct 27, 2023

    @melvin-bot

    Upwork job price has been updated to $250

  13. Ollyws commented on Oct 30, 2023

    @Ollyws
    Contributor

    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?

  14. melvin-bot commented on Nov 3, 2023

    @melvin-bot

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

  15. melvin-bot commented on Nov 3, 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? 💸

  16. cead22 commented on Nov 6, 2023

    @cead22
    Contributor

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

  17. lanitochka17 commented on Nov 7, 2023

    @lanitochka17
    Author

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

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

Metadata

Metadata

Assignees

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