Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.52k stars 2.87k forks source link

[$500] IOS - Error "Auth OpenReport returned an error" appears when click reply in thread again #32686

Closed kbecciv closed 9 months ago

kbecciv commented 11 months ago

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: 1.4.9.1 Reproducible in staging?: y Reproducible in production?: y 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: Applause - Internal Team Slack conversation:

Action Performed:

  1. Send a message in any report
  2. Hover over the message and reply in thread
  3. Right click on the thread and click mark as unread
  4. Click out of the thread and click reply in thread again

Expected Result:

Appears error: "Auth OpenReport returned an error"

Actual Result:

The user should not see any errors

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Add any screenshot/video evidence

https://github.com/Expensify/App/assets/93399543/35718bb0-cb49-41b8-bc22-1bd9d8379e68

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01787da6c452409040
  • Upwork Job ID: 1732800230359445504
  • Last Price Increase: 2024-01-04
melvin-bot[bot] commented 11 months ago

Job added to Upwork: https://www.upwork.com/jobs/~01787da6c452409040

melvin-bot[bot] commented 11 months ago

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

melvin-bot[bot] commented 11 months ago

Bug0 Triage Checklist (Main S/O)

melvin-bot[bot] commented 11 months ago

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

shahinyan11 commented 11 months ago

@kbecciv @adelekennedy @eVoloshchak

I would like to make some corrections related issue .

  1. The issues exist for all platforms and and not only on IOS (it is actual for all small screens where after clicking on "reply in thread" the new screen covers full window )
  2. the 3rd point under Action Performed: section is an extra for reproducing
shahinyan11 commented 11 months ago

Proposal

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

IOS - Error "Auth OpenReport returned an error" appears when click reply in thread again

What is the root cause of that problem?

After pressing reply in thread it is called openReport endpoint before which we adding childReportId in Onyx data here. But once a response is received it is deleted because the response contains data with childReportId: null Screenshot 2023-12-09 at 00 57 26

On larger screens this problem does not exist because there is no back icon and we will return back by clicking on the report in LHN which again requests openReport endpoint which already contains needed data.

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

Add the below code in body of this condition

successData.push({
      onyxMethod: Onyx.METHOD.MERGE,
      key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${newReportObject.parentReportID}`,
      value: {[parentReportActionID]: {childReportID: reportID, childType: CONST.REPORT.TYPE.CHAT}},
 });

What alternative solutions did you explore? (Optional)

Request the openReport endpoint again when navigating back ( on pressing back icon or on screen focus )

melvin-bot[bot] commented 10 months ago

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

adelekennedy commented 10 months ago

I can reproduce this - but on prod I get MISSING TRANSLATION error

eVoloshchak commented 10 months ago

Agree with @shahinyan11's comment, reproduction steps should be reduced to:

  1. Send a message in any report
  2. Hover over the message and reply in thread
  3. Click on back button
  4. Click reply in thread again

Request the openReport endpoint again when navigating back ( on pressing back icon or on screen focus )

@shahinyan11, thanks for the proposal! I think the assessment of the root cause is correct, but not sure if calling openReport once more is necessary. When we click 'Reply in thread' for the first time, the thread doesn't exist yet, so we create it using buildOptimisticChatReport. At this point we already have childReportID for the parent thread, since we just created it. Can we save that to Onyx?

melvin-bot[bot] commented 10 months ago

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

shahinyan11 commented 10 months ago

Can we save that to Onyx?

@eVoloshchak I thought if we save this it will also be deleted when the response is received, isn't it ? In the end we get a response where childReportId is null, and we set it to Onyx ?

The only way is to push this object in successData. But I think then we need to do this under a certain condition so as not to cause regression

shahinyan11 commented 10 months ago

Proposal

Updated

adelekennedy commented 10 months ago

@eVoloshchak will review the updated proposal melvin

melvin-bot[bot] commented 10 months ago

@eVoloshchak @adelekennedy 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!

melvin-bot[bot] commented 10 months ago

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

mvtglobally commented 10 months ago

Issue not reproducible during KI retests. (First week)

melvin-bot[bot] commented 10 months ago

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

melvin-bot[bot] commented 10 months ago

@eVoloshchak, @adelekennedy 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

melvin-bot[bot] commented 10 months ago

@eVoloshchak @adelekennedy this issue is now 3 weeks old. There is one more week left before this issue breaks WAQ and will need to go internal. What needs to happen to get a PR in review this week? Please create a thread in #expensify-open-source to discuss. Thanks!

melvin-bot[bot] commented 10 months ago

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

melvin-bot[bot] commented 10 months ago

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

melvin-bot[bot] commented 10 months ago

@eVoloshchak, @adelekennedy 12 days overdue. Walking. Toward. The. Light...

melvin-bot[bot] commented 10 months ago

This issue has not been updated in over 14 days. @eVoloshchak, @adelekennedy eroding to Weekly issue.

eVoloshchak commented 10 months ago

Issue not reproducible during KI retests. (First week)

Also cannot reproduce this anymore, @shahinyan11, could you double check please?

shahinyan11 commented 10 months ago

@eVoloshchak The backend added childReportId to the response, and everything started working

melvin-bot[bot] commented 10 months ago

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

melvin-bot[bot] commented 10 months ago

@eVoloshchak @adelekennedy this issue is now 4 weeks old and preventing us from maintaining WAQ, can you:

Thanks!

melvin-bot[bot] commented 10 months ago

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