Skip to content

[HOLD for payment 2024-12-25] [$500] Android - Chat - Trying to paste onyx data of #applause.expensifail.com chat app freezes #46766

Closed

Description

@lanitochka17

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.9.16
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
Issue reported by: Applause - Internal Team

Action Performed:

  1. Launch app
  2. Long press #applause.expensifail.com and select copy onyx data
  3. Open a report and try to paste it

Expected Result:

Trying to paste onyx data of #applause.expensifail.com chat app must not freeze

Actual Result:

Trying to paste onyx data of #applause.expensifail.com chat app freezes and shows not responding pop up box

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

Bug6560837_1722668432456.Screenrecorder-2024-08-03-12-23-52-882_compress_1.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01d242239866ebb6cc
  • Upwork Job ID: 1822052495061109151
  • Last Price Increase: 2024-08-24
  • Automatic offers:
    • c3024 | Reviewer | 103915587
    • dominictb | Contributor | 103915591
Issue OwnerCurrent Issue Owner: @c3024

Activity

  1. added
    Daily
    Bug
    on Aug 3, 2024
  2. melvin-bot commented on Aug 3, 2024

    @melvin-bot

    Triggered auto assignment to @kevinksullivan (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. lanitochka17 commented on Aug 3, 2024

    @lanitochka17
    Author

    We think that this bug might be related to #vip-vsp

  4. lanitochka17 commented on Aug 3, 2024

    @lanitochka17
    Author

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

  5. lanitochka17 commented on Aug 3, 2024

    @lanitochka17
    Author

    We think that this bug might be related to
    #wave-control

  6. melvin-bot commented on Aug 6, 2024

    @melvin-bot

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

  7. melvin-bot commented on Aug 8, 2024

    @melvin-bot

    @kevinksullivan Huh... This is 4 days overdue. Who can take care of this?

  8. kevinksullivan commented on Aug 9, 2024

    @kevinksullivan
    Contributor

    I don't know where this fits roadmap wise, since it's just general chat troubleshooting.

  9. added
    External
    on Aug 9, 2024
  10. changed the title [-]Android - Chat - Trying to paste onyx data of #applause.expensifail.com chat app freezes[/-] [+][$250] Android - Chat - Trying to paste onyx data of #applause.expensifail.com chat app freezes[/+] on Aug 9, 2024
  11. 96 remaining items

  12. dominictb commented on Nov 13, 2024

    @dominictb
    Contributor

    on my way to update the the E/App PR now.

  13. added
    Weekly
    Awaiting Payment
    and removed on Dec 18, 2024
  14. changed the title [-][$500] Android - Chat - Trying to paste onyx data of #applause.expensifail.com chat app freezes[/-] [+][HOLD for payment 2024-12-25] [$500] Android - Chat - Trying to paste onyx data of #applause.expensifail.com chat app freezes[/+] on Dec 18, 2024
  15. removed
    Reviewing
    on Dec 18, 2024
  16. melvin-bot commented on Dec 18, 2024

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  17. melvin-bot commented on Dec 18, 2024

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.76-12 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2024-12-25. 🎊

    For reference, here are some details about the assignees on this issue:

  18. melvin-bot commented on Dec 18, 2024

    @melvin-bot

    @c3024 / @dominictb @sonialiap @c3024 / @dominictb The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

  19. added
    Daily
    and removed
    Weekly
    on Dec 25, 2024
  20. sonialiap commented on Dec 27, 2024

    @sonialiap
    Contributor

    Payment summary:

  21. c3024 commented on Dec 30, 2024

    @c3024
    Contributor

    BugZero Checklist:

    • [Contributor] Classify the bug:
    Bug classification

    Source of bug:

    • 1a. Result of the original design (eg. a case wasn't considered)
    • 1b. Mistake during implementation
    • 1c. Backend bug
    • 1z. Other:

    Where bug was reported:

    • 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
    • 2b. Reported on staging (eg. found during regression or PR testing)
    • 2d. Reported on a PR
    • 2z. Other:

    Who reported the bug:

    • 3a. Expensify user
    • 3b. Expensify employee
    • 3c. Contributor
    • 3d. QA
    • 3z. Other:
    • [Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.

      Link to comment: No specific PR can be held responsible for this bug. Moreover, the author of the library made suggestions for the PR and reviewed it.

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.

      Link to discussion: This issue happens when pasting an extremely large text with formatting. No discussion was started because this is not a usual flow.

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

    Regression Test Proposal Template

    Regression Test Proposal

    Precondition:

    • None

    Test:

    1. Go to any chat.
    2. Copy the text from this file and paste it in composer.
    3. Verify that the app does not freeze and you can edit the text in the composer.

    Do we agree 👍 or 👎

  22. yellowtailfan commented on Jun 3, 2025

    @yellowtailfan
    Contributor

    @dominictb @c3024 While fixing #57241 we found this line

    paste(Parser.htmlToMarkdown(html.slice(0, maxLength)));
    from your PR #49228 caused the bug. The bug was only reproduced on Windows with Expensify running in Chrome or Firefox so it was quite specific.

    The cause of the bug was:

    • Copying text in Word produces a clipboard with plain text and HTML
    • The HTML has a verbose header that is larger than 10K even when the body is only a few lines
    • When the clipboard is pasted into Expensify, the app detects the HTML in the clip
    • The call to Parser.htmlToMarkdown() linked above truncates the HTML to 10K before parsing
    • This removes the body and the parser fails to parse the header producing raw HTML codes
    • The raw HTML codes are pasted into the chat window

    The truncation is important to maintain performance and fit inside the database storage limits. Our fix was to keep the truncation but move it to occur after the body text has been extracted. This means:

    • Large headers are removed before truncation in a relatively quick regex operation
    • The remaining body is truncated to 10K before expensive parsing into Markdown

    For details please see the PR #61322.

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

Metadata

Metadata

Labels

Awaiting PaymentBugDailyExternal

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions