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.55k stars 2.9k forks source link

[$250] Expense - "Auth AddComment returned an error" when sending reply in system message thread #51525

Open lanitochka17 opened 2 weeks ago

lanitochka17 commented 2 weeks 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: 9.0.54-1 Reproducible in staging?: Y Reproducible in production?: Y If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A 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): applausetester+w4@applause.expensifail.com Issue reported by: Applause - Internal Team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to workspace chat
  3. Submit two expenses
  4. Go to transaction thread of any expense
  5. Click Category and select a category
  6. Right click on the system message > Reply in thread
  7. Send a reply

Expected Result:

No error will show up

Actual Result:

"Auth AddComment returned an error" shows up when sending reply in system message thread

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Add any screenshot/video evidence

https://github.com/user-attachments/assets/6425a2c2-8ba0-4372-95fb-af2cc860533b

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021851358944485603052
  • Upwork Job ID: 1851358944485603052
  • Last Price Increase: 2024-11-05
Issue OwnerCurrent Issue Owner: @suneox
melvin-bot[bot] commented 2 weeks ago

Triggered auto assignment to @anmurali (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 commented 2 weeks ago

@anmurali 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

lanitochka17 commented 2 weeks ago

We think that this bug might be related to #wave-collect - Release 1

melvin-bot[bot] commented 2 weeks ago

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

melvin-bot[bot] commented 2 weeks ago

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

huult commented 2 weeks ago

This error is from the response of the API request. So I think we need to use the requestId to get more logs in order to debug. requestId: 8da9ab7e1e42a05d-SIN

curl 'https://dev.new.expensify.com:8082/api/AddComment?' \
  -H 'Accept: */*' \
  -H 'Accept-Language: en-US,en;q=0.9,vi;q=0.8' \
  -H 'Cache-Control: no-cache' \
  -H 'Connection: keep-alive' \
  -H 'Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryi1P0kXIlAoV3fpBT' \
  -H 'Cookie: initialReferer=https%3A%2F%2Fdev.new.expensify.com%3A8082%2F; browserGUID=66ff56f697461; fs_cid=1.1; _gcl_au=1.1.1558755845.1728534381; _ga_GR0HGLT8QC=GS1.2.1728534381.1.0.1728534381.60.0.0; _ga_JN0QG4EC3H=GS1.2.1728745870.1.1.1728745952.60.0.0; mutiny.user.token=f50c2fb7-ffa8-49bd-b6aa-e4d66e509cd8; _ga=GA1.1.1126723881.1728534381; fs_uid=#o-1WN56P-na1#30803e0c-e997-4552-8f42-cade3456d90f:dd6a9235-9acc-4ef7-bb1d-1bbec9a1a2cf:1729779699452::1#93ff4771#/1760418993; cebs=1; _ce.clock_data=-68%2C104.28.156.148%2C1%2Ca455ebc67d0b5007e2a055414dd14d78%2CChrome%2CSG; cebsp_=1; _uetsid=4c192920968611efa55d997900e3780a; _uetvid=cd39e97086bf11efa2e31f545eddec00; _clck=1luyg1x%7C2%7Cfqg%7C0%7C1744; _clsk=qpppys%7C1730268903708%7C1%7C1%7Ck.clarity.ms%2Fcollect; _ga_6BR2QJRCCD=GS1.1.1730268901.8.0.1730268911.50.0.0; _ce.s=v~7e5b3bbe05c45eb2dd5720ccc71a58f50b59abc7~lcw~1730268910714~vir~returning~lva~1730268901154~vpv~2~v11.cs~429427~v11.s~4c011c60-9686-11ef-8064-6fcb499b5bac~v11.sla~1730268911080~gtrk.la~m2vhfl3f~v11.send~1730268910714~lcw~1730268911080; cf_clearance=vHc5NnNZDnjrh8GepScZ4DAsJbPnZCyGqmMRZv4CfDo-1730270144-1.2.1.1-QLLO_YgfeB.iCzTicNvus3IhMOVKccENBz8lCWMWFQOqnBZyRM2xtTsg5VcV7GlTPvDWJ5YMhp3piU7rTDzI0UorbCXWKhVEITpj5RC8u7vWGYN0a5M5prRFzb.hoIYMlufRjuceVtcaBubkrk92RAfbnk8WOo76U6r.PYtus85LOaySBEMriQ1qjLfQ8w1y5dB3yN_1Od8Zh1vtuOufPqQjYL0qoqnwXQp6NpX0ixu6N.mD3.QNRu5782xGQp5ZlksqFNtGI72xyoVNUvBc7Hta8w3CvboOLaQ_GpYJUkRHkF8x4HbalQ9eTxutu08KZ6yzZZUNfkcLVWW6zerTMreQ4D2F0coF6dH_kIBxTW96gtx2bjE4Lv7sDYt6DfXV; _cfuvid=CGTdok13lkn6h6taQ.0lsFS7xq9zRbXtMlDW2fF4l4g-1730271641930-0.0.1.1-604800000; __cf_bm=Dp5GjerAZKYLm2iu8ZzvEcEPo5wGNOMMPFKXnOsDwqw-1730272561-1.0.1.1-8QjA2H7ndBGZz2yAaKwcUG8MBu1F4oy4WeCZMb0r9117_XKdB6yALnpW9xfeY4DlK0nrToI617T.Rsm44Bdjpw' \
  -H 'Origin: https://dev.new.expensify.com:8082' \
  -H 'Pragma: no-cache' \
  -H 'Referer: https://dev.new.expensify.com:8082/r/4995646634903921' \
  -H 'Sec-Fetch-Dest: empty' \
  -H 'Sec-Fetch-Mode: cors' \
  -H 'Sec-Fetch-Site: same-origin' \
  -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36' \
  -H 'sec-ch-ua: "Chromium";v="130", "Google Chrome";v="130", "Not?A_Brand";v="99"' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'sec-ch-ua-platform: "macOS"' \
  --data-raw $'------WebKitFormBoundaryi1P0kXIlAoV3fpBT\r\nContent-Disposition: form-data; name="reportID"\r\n\r\n4995646634903921\r\n------WebKitFormBoundaryi1P0kXIlAoV3fpBT\r\nContent-Disposition: form-data; name="reportActionID"\r\n\r\n4310684614639039880\r\n------WebKitFormBoundaryi1P0kXIlAoV3fpBT\r\nContent-Disposition: form-data; name="commentReportActionID"\r\n\r\nnull\r\n------WebKitFormBoundaryi1P0kXIlAoV3fpBT\r\nContent-Disposition: form-data; name="reportComment"\r\n\r\nhello\r\n------WebKitFormBoundaryi1P0kXIlAoV3fpBT\r\nContent-Disposition: form-data; name="clientCreatedTime"\r\n\r\n2024-10-30 07:25:26.964\r\n------WebKitFormBoundaryi1P0kXIlAoV3fpBT\r\nContent-Disposition: form-data; name="idempotencyKey"\r\n\r\n9963cbf3-9fb0-630a-ac3c-2bed1d061613\r\n------WebKitFormBoundaryi1P0kXIlAoV3fpBT\r\nContent-Disposition: form-data; name="apiRequestType"\r\n\r\nwrite\r\n------WebKitFormBoundaryi1P0kXIlAoV3fpBT\r\nContent-Disposition: form-data; name="pusherSocketID"\r\n\r\n794236.1820901\r\n------WebKitFormBoundaryi1P0kXIlAoV3fpBT\r\nContent-Disposition: form-data; name="shouldRetry"\r\n\r\ntrue\r\n------WebKitFormBoundaryi1P0kXIlAoV3fpBT\r\nContent-Disposition: form-data; name="canCancel"\r\n\r\ntrue\r\n------WebKitFormBoundaryi1P0kXIlAoV3fpBT\r\nContent-Disposition: form-data; name="authToken"\r\n\r\n1152DB508ACE32F2BACA33F284453B9792BE5DBA53CFB4FFC90860088C1B6F0ED0682E887CBBFE35E72093552C4E7B4FDC2A1DE5657D91462A05CC987C9A9FE4FBCFB8CCE6E2ECE4318E796FF8560888A25FDF3635B3CB20FEAF99DD6A4EA8C8DAA93E6786AF5D7A853EDC34C980A926800B1778A080D7DCC007651B9B1B9CBED214C44DBA9711E84BDD3D48E9851C7780676CCECC266FD82FCC22627AAB151C36AAC3BE469A856D2D067BE7315CDCA48B55D66D512B3D219CB7659E88D67BE061499EF5B6143AA5B99260B0DDF9C3AAA5E9B8AE78F0451094D2445603C39E66168DB44DC17CB4761B221181846DCF49DE348E97BA2B572B09295C0CB48D385494C1DD8B98456CC841371F6B245F320514CEE3C03E02A0D5E7CA40CCB9A829283B9D7FC3F8384FAF01F575F2719F6749\r\n------WebKitFormBoundaryi1P0kXIlAoV3fpBT\r\nContent-Disposition: form-data; name="referer"\r\n\r\necash\r\n------WebKitFormBoundaryi1P0kXIlAoV3fpBT\r\nContent-Disposition: form-data; name="platform"\r\n\r\nweb\r\n------WebKitFormBoundaryi1P0kXIlAoV3fpBT\r\nContent-Disposition: form-data; name="api_setCookie"\r\n\r\nfalse\r\n------WebKitFormBoundaryi1P0kXIlAoV3fpBT\r\nContent-Disposition: form-data; name="email"\r\n\r\nabcd+2349242@gmail.com\r\n------WebKitFormBoundaryi1P0kXIlAoV3fpBT\r\nContent-Disposition: form-data; name="isFromDevEnv"\r\n\r\ntrue\r\n------WebKitFormBoundaryi1P0kXIlAoV3fpBT\r\nContent-Disposition: form-data; name="appversion"\r\n\r\n9.0.55-2\r\n------WebKitFormBoundaryi1P0kXIlAoV3fpBT\r\nContent-Disposition: form-data; name="clientUpdateID"\r\n\r\n2658065613\r\n------WebKitFormBoundaryi1P0kXIlAoV3fpBT--\r\n'
suneox commented 2 weeks ago

@anmurali, it seems we’ll need the internal team to verify from the BE side, or should we disable reply a system message? This issue also occurs when replying to a remove member message but doesn’t happen when replying to an invite member message.

https://github.com/user-attachments/assets/9a26b2f2-e21e-46b4-83a2-63d610e40238

melvin-bot[bot] commented 1 week ago

@suneox, @anmurali Eep! 4 days overdue now. Issues have feelings too...

melvin-bot[bot] commented 1 week ago

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

anmurali commented 1 week ago

Asking for an internal engineer to be assigned in Slack - https://expensify.slack.com/archives/C06ML6X0W9L/p1730857824543679

nyomanjyotisa commented 1 week ago

Proposal

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

Expense - "Auth AddComment returned an error" when sending reply in system message thread

What is the root cause of that problem?

We don't include action with type MODIFIEDEXPENSE and REMOVEFROMROOM on shouldDisableThread https://github.com/Expensify/App/blob/2699cbe625b3b8f917b40446e816e737312b49b8/src/libs/ReportUtils.ts#L7816-L7833

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

Include action with type MODIFIEDEXPENSE and REMOVEFROMROOM on shouldDisableThread

    const isModifiedExpenseAction = ReportActionsUtils.isModifiedExpenseAction(reportAction);
    const isRemoveFromRoomAction = ReportActionsUtils.isRemoveFromRoomAction(reportAction);

    return (
        ...
        isModifiedExpenseAction ||
        isRemoveFromRoomAction
    );

If any other action types need to be disabled thread, we can list it here as well

What alternative solutions did you explore? (Optional)

melvin-bot[bot] commented 3 days ago

@suneox, @anmurali Huh... This is 4 days overdue. Who can take care of this?

anmurali commented 3 days ago

Still looking for someone internal to help with troubleshooting.

melvin-bot[bot] commented 3 days ago

Current assignee @garrettmknight is eligible for the Bug assigner, not assigning anyone new.

anmurali commented 3 days ago

Rotating the label so we can assign another BZ member while I am OOO

melvin-bot[bot] commented 2 hours ago

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