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

Chat - Attachment from old dot chat shown empty rectangles in ND #44445

Closed
1 of 6 tasks
lanitochka17 opened this issue Jun 26, 2024 · 67 comments
Closed
1 of 6 tasks

Chat - Attachment from old dot chat shown empty rectangles in ND #44445

lanitochka17 opened this issue Jun 26, 2024 · 67 comments
Assignees
Labels
AutoAssignerNewDotQuality Used to assign quality issues to engineers Bug Something is broken. Auto assigns a BugZero manager. Internal Requires API changes or must be handled by Expensify staff Weekly KSv2

Comments

@lanitochka17
Copy link

lanitochka17 commented Jun 26, 2024

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


Version Number: 9.0.1-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Email or phone of affected tester (no customers): rybkina+062524old@gmail.com
Issue reported by: Applause - Internal Team

Issue found when executing PR https://github.com/Expensify/Web-Expensify/pull/42420

Action Performed:

  1. Sign up for gmail account and create collect policy in OD
  2. Create report and send message and attachments
  3. Tap on Concierge button > go to chat report

Expected Result:

Attachment from old dot chat shown in ND with image

Actual Result:

Attachment from old dot chat shown empty rectangles in ND

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

Bug6524592_1719352523426.old_to_new.mp4
26 33

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~017e4b531ab757c124
  • Upwork Job ID: 1808449642258792691
  • Last Price Increase: 2024-07-17
Issue OwnerCurrent Issue Owner: @luacmartins
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jun 26, 2024
Copy link

melvin-bot bot commented Jun 26, 2024

Triggered auto assignment to @twisterdotcom (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

@lanitochka17
Copy link
Author

@twisterdotcom FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

@melvin-bot melvin-bot bot added the Overdue label Jun 28, 2024
@twisterdotcom
Copy link
Contributor

Sorry, I didn't get around to testing this again this week, my bad. Monday I will and get External on it I assume.

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Jun 28, 2024
@twisterdotcom
Copy link
Contributor

Okay, I can recreate, but I wonder if this is something that will just be resolved by sending the correct OD > ND onyx updates. Also, I didn't turn my Mic on for this, but I'm not redoing it.

44445.mp4

Asking internally: https://expensify.slack.com/archives/C03SSAQ7P/p1719851330833789

@melvin-bot melvin-bot bot removed the Overdue label Jul 1, 2024
@twisterdotcom
Copy link
Contributor

Okay, Onxy should be working for this, so going to make it external.

@twisterdotcom twisterdotcom added the External Added to denote the issue can be worked on by a contributor label Jul 3, 2024
@melvin-bot melvin-bot bot changed the title Chat - Attachment from old dot chat shown empty rectangles in ND [$250] Chat - Attachment from old dot chat shown empty rectangles in ND Jul 3, 2024
Copy link

melvin-bot bot commented Jul 3, 2024

Job added to Upwork: https://www.upwork.com/jobs/~017e4b531ab757c124

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

melvin-bot bot commented Jul 3, 2024

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

Copy link

melvin-bot bot commented Jul 8, 2024

@twisterdotcom, @dukenv0307 Eep! 4 days overdue now. Issues have feelings too...

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

melvin-bot bot commented Jul 10, 2024

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

Copy link

melvin-bot bot commented Jul 10, 2024

@twisterdotcom @dukenv0307 this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

Copy link

melvin-bot bot commented Jul 10, 2024

@twisterdotcom, @dukenv0307 Still overdue 6 days?! Let's take care of this!

Copy link

melvin-bot bot commented Jul 12, 2024

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

@amunim
Copy link

amunim commented Jul 14, 2024

Proposal

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

attachments from old expensify cannot be previewed

What is the root cause of that problem?

CORS issue:
image

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

We add a CORS header to the back-end to allow new.expensify.com

What alternative solutions did you explore? (Optional)

@twisterdotcom
Copy link
Contributor

How is this solution @dukenv0307?

@melvin-bot melvin-bot bot removed the Overdue label Jul 15, 2024
@dukenv0307
Copy link
Contributor

@twisterdotcom Hi, I can't reproduce this bug. I think it's fixed

@amunim
Copy link

amunim commented Jul 15, 2024

@dukenv0307 new images are being loaded correctly, but old ones still same issue. Seeing that expensify and new.expensify are essentially same, we should add the header to the back-end to avoid any future CORS issues as well.
image
image

@melvin-bot melvin-bot bot added the Overdue label Sep 30, 2024
@twisterdotcom
Copy link
Contributor

@luacmartins or @justinpersaud - any more thoughts on this?

@luacmartins
Copy link
Contributor

FWIW I still can't find anything wrong with the headers. Also FWIW I can reproduce this issue on staging, but not on production.

Screen.Recording.2024-09-30.at.5.12.23.PM.mov

@melvin-bot melvin-bot bot removed the Overdue label Sep 30, 2024
@luacmartins
Copy link
Contributor

I'm also unable to reproduce on dev. So this seems to be affecting staging only. @twisterdotcom were you on production when you reproduced the issue?

@justinpersaud
Copy link
Contributor

I cannot reliably reproduce this. I have seen it once, but never again. Even on staging.

@justinpersaud
Copy link
Contributor

I put a PR up that I think may help here.

@github-project-automation github-project-automation bot moved this from CRITICAL to Done in [#whatsnext] #quality Oct 1, 2024
@luacmartins luacmartins reopened this Oct 1, 2024
@luacmartins
Copy link
Contributor

I can still reproduce the issue on staging 😞

@justinpersaud
Copy link
Contributor

@luacmartins can you write out the full steps you're using?

@luacmartins
Copy link
Contributor

luacmartins commented Oct 1, 2024

On staging:

  1. Log into OldDot with a gmail account
  2. Create a collect policy, Settings > Workspaces > Group > New workspace
  3. Create a report Reports > New Report
  4. Add a comment to it and an attachment (not receipt)
  5. Log into NewDot with the same gmail account
  6. Navigate to the report

I can't reproduce on production though

@luacmartins
Copy link
Contributor

These are the request headers

Screenshot 2024-10-01 at 7 19 05 AM

@justinpersaud
Copy link
Contributor

Do you know if we changed anything with how we're fetching the image from the client in NewDot?

If you copy that request as cURL and paste it in your browser with all the headers, you will see the response contains the headers it says are missing:

< access-control-allow-origin: https://staging.new.expensify.com
< access-control-allow-credentials: true

@luacmartins
Copy link
Contributor

I'm not aware of any changes to that. I'll ask in open-source. So you're saying that we're missing the access-control-allow-origin and access-control-allow-credentials headers in the request?

@luacmartins
Copy link
Contributor

luacmartins commented Oct 2, 2024

Asked in open source here. We could add those headers here, but since I'm unable to reproduce in dev, that's a bit of a shot in the dark.

@justinpersaud
Copy link
Contributor

No, the headers should be in the response. But I don't understand this. Are you 100% able to reproduce it on staging now every time? I still cannot for some reason. Only that one time and then yesterday when we tried the new PR but then after revert, I couldn't reproduce again.

@luacmartins
Copy link
Contributor

Yea, it's been pretty consistent for me, but only on staging (can't repro on dev nor prod)

@twisterdotcom
Copy link
Contributor

Agree, this is only on staging for me too, so perhaps it's not super pressing.

@luacmartins
Copy link
Contributor

Yea, this will only affect internal employees and contributors for now. We should still fix it, but maybe the priority is a bit lower since it doesn't affect customers

@mallenexpensify
Copy link
Contributor

I don't remember seeing any/many bugs that are 'stuck' in staging and never hit production. Is this something we need to document somewhere? ie. in the main BZ SO, do we want to add something like "If a bug is stuck in staging and isn't affecting real-world users on production, feel free to treat it as lower priority'

@justinpersaud
Copy link
Contributor

@luacmartins can you copy the request that is failing as curl or fetch and share it here? I tried repro steps again on staging, still can't reproduce it.

I need the full headers, request method and URL that is failing.

@luacmartins
Copy link
Contributor

luacmartins commented Oct 4, 2024

Ha now I can't reproduce using these steps anymore 🙃

I did notice that now the first request to get the attachment is consistently cancelled and the 2nd one succeeds.

Screenshot 2024-10-04 at 8 12 00 AM

@justinpersaud
Copy link
Contributor

For preflight requests, the first request is supposed to be an OPTIONS request and we respond back with a 204, and then it is supposed to request the actual image.

@luacmartins
Copy link
Contributor

Closing as discussed here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AutoAssignerNewDotQuality Used to assign quality issues to engineers Bug Something is broken. Auto assigns a BugZero manager. Internal Requires API changes or must be handled by Expensify staff Weekly KSv2
Projects
Status: Done
Status: No status
Development

No branches or pull requests

8 participants