Skip to content

Native share - Unexpected error appears in chat when sharing an image #80838

Closed

Description

@mitarachim

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.3.11-0
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught during regression testing, add the test name, ID and link from BrowserStack: https://test-management.browserstack.com/projects/2219752/folder/13176721/test-cases/41236967
Email or phone of affected tester (no customers): n/a
Issue reported by: Applause Internal Team
Bug source: Regression TC Execution
Device used: iPhone 13 iOS 26.2
App Component: Other

Action Performed:

1.On the device media library - Choose a picture or receipt to share through the "Expensify" app
2.Choose the option as "Share"
3.Select any contact or workspace
4.Verify you land in "Share to Expensify" page
5. Click "Share"

Expected Result:

Verify you land in the chat or workspace you choosen to share and the message is displayed
Verify that the user should be scrolled to the latest shared image

Actual Result:

"Unexpected error posting the comment. Please try again later " error appears in chat when sharing an image

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari

Screenshots/Videos

Bug7060786_1769649464087.ScreenRecording_01-28-2026_21.mp4

View all open jobs on GitHub

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    DeployBlockerIndicates it should block deploying the API
    on Jan 29, 2026
  2. melvin-bot commented on Jan 29, 2026

    @melvin-bot

    Triggered auto assignment to @JmillsExpensify (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.

  3. melvin-bot commented on Jan 29, 2026

    @melvin-bot

    Triggered auto assignment to @marcaaron (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

  4. melvin-bot commented on Jan 29, 2026

    @melvin-bot

    💬 A slack conversation has been started in #expensify-open-source

  5. github-actions commented on Jan 29, 2026

    @github-actions

    👋 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.
  6. m-natarajan commented on Jan 29, 2026

    @m-natarajan

    Discussed about this issue here

  7. changed the title [-]iOS - Native share - Unexpected error appears in chat when sharing an image[/-] [+]Native share - Unexpected error appears in chat when sharing an image[/+] on Jan 29, 2026
  8. OSBotify commented on Jan 29, 2026

    @OSBotify

    Investigation Summary

    Classification: Frontend bug
    Causing PR: #80242 - Part 6: Remove Onyx.connect for SESSION in Report.ts by linhvovan29546 (Medium-High confidence)

    Recommendation: REVERT

    PR 80242 should be reverted as it appears to break the iOS native share functionality. The Share extension context may not have the SESSION data properly initialized when deprecatedCurrentUserAccountID is needed for the attachment upload.

    Evidence:

    • The bug is staging-only, matching the PR merge timeline (merged 2026-01-28)
    • PR 80242 touches src/libs/actions/Report.ts and removes getCurrentUserAccountID function
    • The Share flow calls addAttachmentWithComment which uses deprecatedCurrentUserAccountID
    • In the Share extension context, if SESSION is not loaded before the share action executes, deprecatedCurrentUserAccountID remains -1
    • This causes the API request to fail with generic error: Unexpected error posting the comment

    Root Cause:
    The Share extension is a separate iOS app extension. When sharing an image, if Onyx SESSION has not fully loaded, deprecatedCurrentUserAccountID is still -1, causing the API request to fail.

    Labels: Keeping DeployBlockerCash, Removing DeployBlocker (this is a frontend App issue)

  9. linhvovan29546 commented on Jan 29, 2026

    @linhvovan29546

    The AddAttachment command returns the error message: “Cannot assign to property 'name' which has only a getter.”

  10. linhvovan29546 commented on Jan 29, 2026

    @linhvovan29546

    I can still reproduce the issue locally after reverting the PR above, so that PR is not the cause.

    Screen.Recording.2026-01-29.at.14.15.39.mov
  11. m-natarajan commented on Jan 30, 2026

    @m-natarajan

    This issue is reproducible on iPhone 7 Plus / iOS 15.8.3 and Xiaomi Poco F5 / Android 13 in v9.3.11-12

    1000175818.mp4
    80838_iOS-Repro.mp4
  12. grgia commented on Jan 30, 2026

    @grgia

    Potentially fixed by #80984

  13. grgia commented on Jan 30, 2026

    @grgia
  14. m-natarajan commented on Jan 30, 2026

    @m-natarajan

    Not repro, Xiaomi Redmi Note 10 / Android 12App , iPhone 13 / 26.1 v9.3.11-15, v9.3.11-15

    ScreenRecording_01-30-2026.09-46-18_1.MP4
    Screenrecorder-2026-01-30-16-01-24-79.mp4
  15. grgia commented on Jan 30, 2026

    @grgia

    Wooo! Thank you @m-natarajan

  16. melvin-bot commented on Mar 12, 2026

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

    If a regression has occurred and you are the assigned CM follow the instructions here.

    If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

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

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.EngineeringHourlyKSv2ReviewingHas a PR in review

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions