-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[$250] iOS - App crashes when pasting large text to the composer and backgrounding the app #51059
Comments
Triggered auto assignment to @sakluger ( |
@sakluger 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 |
Is this a separate bug from #48888? Or is it a regression from that issue's PR? If we don't allow users to send messages over 10k characters, why would we allow them to paste over 10k characters in the composer? Why don't we just cut off everything over 10k? |
cc @anmurali @jasperhuangg @Pujan92 curious for your thoughts on the expected behavior here since you all were involved in #48888. |
@sakluger Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
I posted to Slack (https://expensify.slack.com/archives/C05LX9D6E07/p1729615084337139) asking for feedback on the expected behavior. |
@sakluger I can't reproduce the crash. Also, this isn't a regression from the other issue. Simulator.Screen.Recording.-.iPhone.15.Pro.-.2024-10-22.at.22.33.43.mp4 |
This feels like a major edge case, especially given that @Pujan92 can't reproduce at all. I'm going to close the issue for now. @IuliiaHerets - if you're still able to reproduce it, feel free to reopen. At that point, if we can consistently reproduce, then we'll likely change the behavior to auto-clip the text to 10k max characters. |
Issue is still reproducible on the latest build 9.0.63-3 Crash.long.text.mp4 |
@lanitochka17 thanks for sharing the new video. Just to confirm, did you use the exact same reproduction steps, or did you modify the steps in any way? |
I updated the expected behavior in the OP to indicate that we should trim to 10,000 characters if the user tries pasting more than that. |
Job added to Upwork: https://www.upwork.com/jobs/~021859632203774875578 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @allroundexperts ( |
@sakluger @techievivek @allroundexperts what is the expectation if the composer already have text? we should trim combined text, right? not only the text from clipboard. I couldn't find a solution without blinking in native, will this blinking acceptable? Kapture.2024-12-12.at.16.19.40.mp4Another thing to consider is -- we would trim the text value before markdown parsing right? For instance new line will have 6 character If we trim parsed value, then the performance might still slow because we'll need to parse it before we trim, also we can't predict if the trimmed text broke the parsed tag or not i.e.
might be parsed as
what if the trimmed result stop at If we agree with my suggestion (to trim text before parsed), then the length will not exactly 10.000 it can be more than it especially if the pasted text contain special pattern (emoji, new line, link, etc) |
Yes, we should check the combined total and trim to 10k total characters.
I didn't really notice the blinking, I think it's fine. @techievivek what do you think?
I'll defer to @techievivek and @allroundexperts for this question. |
@sakluger, @wildan-m, @allroundexperts, @techievivek Whoops! This issue is 2 days overdue. Let's get this updated quick! |
I personally think that we shouldn't trim it, but @techievivek will have the final call. |
Sounds good, let's see what @techievivek says about trimming before parsing. |
+1️⃣
Yeah, it is acceptable for now.
I suggest trimming it before the markdown parsing to avoid the edge cases you mentioned in your comment. This will help prevent issues like broken links or similar problems. @allroundexperts, do you have any thoughts on why we shouldn't be trimming before? IMO trimming beforehand seems like a safer option. |
It just appears a little weird to me that the character limit count won't change when you'd press the space bar. |
Aaah, ok, but I think that's acceptable than handling those edge cases mentioned above. |
@wildan-m I hope you are clear now with the expectations so you can get started with the PR. |
@sakluger, @wildan-m, @allroundexperts, @techievivek Whoops! This issue is 2 days overdue. Let's get this updated quick! |
Limited availability, will continue the PR tomorrow |
I think this PR #49228 has already resolve the same thing for this issue. |
Good find! That PR has been merged for two weeks, so I'll ask QA for a retest to see if this bug is resolved. |
@sakluger, @wildan-m, @allroundexperts, @techievivek Whoops! This issue is 2 days overdue. Let's get this updated quick! |
@sakluger, @wildan-m, @allroundexperts, @techievivek Eep! 4 days overdue now. Issues have feelings too... |
I asked for the retest here: https://expensify.slack.com/archives/C9YU7BX5M/p1735839601691729 |
Issue is not reproducible 0-02-01-91e21b572656558f6e2bc4dbff02176716bd247045ad7f3b71e8e53e7e0b7790_277892e65c8b7f2.mp4 |
Nice, sounds like this is fixed! I'm a little unclear on how much work was completed for this issue before we discovered that another PR fixed it already. @allroundexperts is any payment due for this issue? |
I am pretty sure no payment is due, so I'm going to close the issue. @allroundexperts - if you disagree, please raise in Slack (since I may not see comments on this GH issue after it is closed). |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 9.0.50-5
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Y
Issue was found when executing this PR: #50487
Issue reported by: Applause Internal Team
Action Performed:
Expected Result:
If the pasted text is longer than 10,000 characters, we should trim the text to 10,000 characters.
We can use a similar pattern to how we indicate the character limit in the Workspace name input field (but it would say
Character limit reached (10,000/10,000)
instead, or something similar)Actual Result:
When pasting large text to the composer and backgrounding the app a few times, we attempt to paste the full text string, and the app crashes.
Workaround:
Unknown
Platforms:
Screenshots/Videos
Bug6638032_1729189609126.Pmqw0322.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: