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

[$1000] Clicking the statement link in the Mac Desktop app opens the link in web instead of opening in the app sidebar directly #33977

Closed
1 of 6 tasks
m-natarajan opened this issue Jan 4, 2024 · 39 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Internal Requires API changes or must be handled by Expensify staff

Comments

@m-natarajan
Copy link

m-natarajan commented Jan 4, 2024

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


Version Number: 1.4.22-0
Reproducible in staging?: needs reproduction
Reproducible in production?: needs reproduction
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
Expensify/Expensify Issue URL:
Issue reported by: @puneetlath
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1704219520043159

Action Performed:

  1. Click on the statement link from concierge chat in desktop app

Expected Result:

Should open in the side bar

Actual Result:

Opens in the web

Workaround:

unknown

Platforms:

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

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

image (7)

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01e81b7c4cb7cbfa0e
  • Upwork Job ID: 1744433753657077760
  • Last Price Increase: 2024-01-31
  • Automatic offers:
    • akinwale | Reviewer | 28099226
@m-natarajan m-natarajan added Daily KSv2 Needs Reproduction Reproducible steps needed Bug Something is broken. Auto assigns a BugZero manager. labels Jan 4, 2024
Copy link

melvin-bot bot commented Jan 4, 2024

Triggered auto assignment to @bfitzexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

Copy link

melvin-bot bot commented Jan 4, 2024

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@melvin-bot melvin-bot bot added the Overdue label Jan 8, 2024
Copy link

melvin-bot bot commented Jan 8, 2024

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

@bfitzexpensify bfitzexpensify added External Added to denote the issue can be worked on by a contributor and removed Needs Reproduction Reproducible steps needed labels Jan 8, 2024
@melvin-bot melvin-bot bot changed the title Clicking the statement link in the Mac Desktop app opens the link in web instead of opening in the app sidebar directly [$500] Clicking the statement link in the Mac Desktop app opens the link in web instead of opening in the app sidebar directly Jan 8, 2024
Copy link

melvin-bot bot commented Jan 8, 2024

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jan 8, 2024
Copy link

melvin-bot bot commented Jan 8, 2024

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

@melvin-bot melvin-bot bot removed the Overdue label Jan 8, 2024
Copy link

melvin-bot bot commented Jan 9, 2024

📣 @AnaVlasin! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@BriniM
Copy link

BriniM commented Jan 9, 2024

Contributor details
Your Expensify account email: [email protected]
Upwork Profile Link: https://www.upwork.com/freelancers/maherbrini

Copy link

melvin-bot bot commented Jan 9, 2024

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

@bfitzexpensify
Copy link
Contributor

Awaiting proposals.

@BriniM
Copy link

BriniM commented Jan 10, 2024

Is there a way to reproduce creating that Monthly statement, without having to enter any personal information, say as by having a test account or similar? Also I am fairly new to Expensify so a step-by-step guide / video recording on how to reproduce this would be nice.

@bfitzexpensify
Copy link
Contributor

Hey @BriniM, does https://expensify.slack.com/archives/C01GTK53T8Q/p1701213684698809 answer your question?

@bfitzexpensify
Copy link
Contributor

I'm going to be mostly ooo until Jan 29, assigning a second BZ team member to keep an eye on this.

  • awaiting proposals

@bfitzexpensify bfitzexpensify added Bug Something is broken. Auto assigns a BugZero manager. and removed Bug Something is broken. Auto assigns a BugZero manager. labels Jan 11, 2024
Copy link

melvin-bot bot commented Jan 11, 2024

Triggered auto assignment to @MitchExpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@Piotrfj
Copy link
Contributor

Piotrfj commented Jan 12, 2024

Hello, Im Piotr from Callstack and would like to help with this issue

@melvin-bot melvin-bot bot added the Overdue label Jan 22, 2024
@MitchExpensify
Copy link
Contributor

Friendly bump @Piotrfj

@melvin-bot melvin-bot bot removed the Overdue label Jan 23, 2024
@Piotrfj
Copy link
Contributor

Piotrfj commented Jan 25, 2024

Update: The issue is replicable and the source seems to be in link conversion

@melvin-bot melvin-bot bot added the Overdue label Jan 29, 2024
Copy link

melvin-bot bot commented Jan 30, 2024

@akinwale, @MitchExpensify, @bfitzexpensify, @Piotrfj Eep! 4 days overdue now. Issues have feelings too...

@MitchExpensify
Copy link
Contributor

@bfitzexpensify Not much movement on this one while you were out. Worth doubling do you think?

@melvin-bot melvin-bot bot removed the Overdue label Jan 31, 2024
@bfitzexpensify bfitzexpensify changed the title [$500] Clicking the statement link in the Mac Desktop app opens the link in web instead of opening in the app sidebar directly [$1000] Clicking the statement link in the Mac Desktop app opens the link in web instead of opening in the app sidebar directly Jan 31, 2024
Copy link

melvin-bot bot commented Jan 31, 2024

Upwork job price has been updated to $1000

@bfitzexpensify
Copy link
Contributor

Not much movement on this one while you were out. Worth doubling do you think?

Yep, I reckon - updated to $1000

@BriniM
Copy link

BriniM commented Jan 31, 2024

Wanted to reproduce the monthly statement but couldn't find a way to do this for a fresh expensify account with dummy data, would love to investigate this otherwise.

@ikevin127

This comment was marked as outdated.

@ikevin127
Copy link
Contributor

I think the problem comes from BE here and I came to this conclusion while debugging (more context above in my outdated proposal) - how so ? I noticed that there's no issues with any platform opening the RHN of the statement as long as the statement link has the following form:

  • DEV: https://dev.new.expensify.com:PORT/statements/202312 - the PORT match matters when testing locally
  • STG: https://staging.new.expensify.com/statements/202312
  • PROD: https://new.expensify.com/statements/202312

The only case when the app opens the link externally via the browser is when the statement's link domain env doesn't match the app's env which that's trying to open said link.

This is where I assume the BE sent the wrong env domain for the statement link via Concierge and when this issue was found, if it was found on staging, the link most likely had the prod env domain which the staging app doesn't recognize therefore it opens a new web tab regardless of the platform (web, desktop, natives).

Note: It doesn't have anything to do with the statement link being corrupt or anything like that - it's just the domain env mismatch with the app that's trying to open the link.

We can wait for confirmation from @m-natarajan as to how their Concierge statement link actually looks in terms of domain env and where the open attempt was performed.

For anyone who wants to test or confirm this, here's how you can generate a statement bypassing the wallet / bank flow:

  • create a button somewhere in the UI and add the following function onClick / onPress:
    User.generateStatementPDF(yearMonth) - yearMonth: string - The statement year and month as one string, i.e. 202110
  • open Network tab to make sure it gets created when pressing the button (call succeeds)
  • once you created a statement, this can be accessed via the links demonstrated above for each env
  • you can just paste the link in a chat and click on it - notice that if the link matches your app's env / port (for dev) the statement RHN will open instead of a new browser tab and vice versa

Copy link

melvin-bot bot commented Feb 1, 2024

@akinwale @MitchExpensify @bfitzexpensify @Piotrfj this issue is now 4 weeks old and preventing us from maintaining WAQ, can you:

  • Decide whether any proposals currently meet our guidelines and can be approved as-is today
  • If no proposals meet that standard, please take this issue internal and treat it as one of your highest priorities
  • If you have any questions, don't hesitate to start a discussion in #expensify-open-source

Thanks!

@melvin-bot melvin-bot bot added Internal Requires API changes or must be handled by Expensify staff and removed External Added to denote the issue can be worked on by a contributor labels Feb 1, 2024
Copy link

melvin-bot bot commented Feb 1, 2024

Current assignee @akinwale is eligible for the Internal assigner, not assigning anyone new.

@Piotrfj
Copy link
Contributor

Piotrfj commented Feb 2, 2024

@MitchExpensify @m-natarajan Can you please provide a way to get the exact same message in Concierge chat?

@MitchExpensify MitchExpensify removed their assignment Feb 4, 2024
@melvin-bot melvin-bot bot added the Overdue label Feb 5, 2024
Copy link

melvin-bot bot commented Feb 5, 2024

@akinwale, @bfitzexpensify, @Piotrfj Whoops! This issue is 2 days overdue. Let's get this updated quick!

@melvin-bot melvin-bot bot removed the Overdue label Feb 6, 2024
@bfitzexpensify
Copy link
Contributor

@puneetlath mind taking a look at this comment given you were the one who originally noticed this problem?

@ikevin127
Copy link
Contributor

I think the statement links that Concierge sends always have prod env, no matter on what env the user is seeing said link.

Similar to the fact that when we're attempting login from staging / dev we always get the prod domain magic link (https://new.expensify.com/...). More context about this here #34177 (comment).

Technically we could have a FE based fix which would always make sure that we convert all expensify domain links to the current env of the user, but I think this should be handled by BE in all cases.

@bfitzexpensify
Copy link
Contributor

Thanks @ikevin127

cc @thienlnam from the work in https://github.com/Expensify/Expensify/issues/213310 - Jack, mind taking a look at #33977 (comment) and #33977 (comment) and confirming you think this should be a BE fix?

@thienlnam
Copy link
Contributor

That sounds correct, though the link we send in the Concierge message is always to production. I'm guessing Puneet might have opened this from the staging desktop environment and then clicked on the link which opened prod in web?

That seems fine as long as it works in production as expected.

@bfitzexpensify
Copy link
Contributor

Mind confirming this @puneetlath?

I'm guessing Puneet might have opened this from the staging desktop environment and then clicked on the link which opened prod in web?

If that's what happened, then we can close this out.

@puneetlath
Copy link
Contributor

Ah yeah, that's probably what it was. I'll try it again when the next statement comes. Thanks y'all!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Internal Requires API changes or must be handled by Expensify staff
Projects
None yet
Development

No branches or pull requests

10 participants