Skip to content
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

[$1000] Android - Task - App crashes when part of long link is used as title #22554

Closed
1 of 6 tasks
lanitochka17 opened this issue Jul 10, 2023 · 20 comments
Closed
1 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors

Comments

@lanitochka17
Copy link

lanitochka17 commented Jul 10, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Issue found when executing PR #21941

Action Performed:

  1. Launch New Expensify app
  2. Go to + > Assign task
  3. Enter the following as title
    attachments/4958013852073029329/w_b699e9f99322181578af40503e25342bab52afb0.jpg?encryptedAuthToken=yGmeJ3lS696v3R71E3qM2R3%2Bbz3xDitFkHi01XVnxxAjNGjY6EyPZpst6GmjnUHaMIpq%2FPNaLHQSroea%2FS1WCjbZIQ%2BtaqO2Q%2FozByT%2Fr3G0Jq5XzrMJNbtDs6I%2F6WihHclCH4cOksOS8hBbvKvDIVJhRLI0z1K%2BwUtTkDYCdYkAHCCrQF7S7BCssB0kaM7O6DVbOQsLphIc3aouhyleQZTjufyhHux7O7ZgO925xTdWqa7NNePXTRZwPwwJF%2BmWOTktaaf1wLkHv7%2BqcEXtHsaxZKGuSYeKD3soQsFVToTUwI4rz%2F6yyipX%2F5%2F9doTqBMc5mOvW51GISWcd1dnNCZVNB4rXirsVgHahWV3IzaPnxPa%2BPeJLqyyIvbFLseB14CxHkM1PmNWIGL%2F%2FsyLF%2FA71%2FzvFgc3FN1SEvYerspiMSCTpToZPI2iqrIF4B%2FaH4Qv6%2B929Ym7kNVpxECzp2zgy0OgIKEFCrXhlR%2B%2FOcVXBKilJ89pk9Zm0lS%2F9R9iepcuRDl8OaklXTJpj45LAvF5L8F4NqcHfa25aih4B17l%2BecyFL5LeDsFr%2Bg%2FbwcR2wAgyyvjsnW3xuV8Jt%2BbUrcYDL2sQkivvRKZP7NGeS5jYyxyJ0zNrGvDlB3756yyuU05%2BnrgwKYmCq8ApLoA%2F9IrgxYg1iqJ5OmgiMXCUj5dnzwqRZ1JqEeUnmEk3giS3xL2zDozVJ4pCyeeFNlMWjP9K%2FXDBp7%2FkTy223YFz2fKqGH%2BzZIiHIArNvlm%2Fp74fxZHCtqpNTV5NNY7Kd4SbtSYmVJ2XemF%2BTcwL46ioRC6pqew0WWK4zjUIzUvkrd9jCWT0tsLabZ22hWDJL6DXNrUh631zh3qhCdys3K3bq3m%2BX1k%2Fc34b2a3VhkbT4tZ5k29cgBocZPD9RkNsMMJhvROzlH7ZtRmP2a1ccGsTSjZPF1A6Hxap6Tjku8WigYtAGHRRZO%2FSJtT1JTuCtGi4sh6j8kSo621keosFBQci6BNCtM19SSFj%2BcYzrcLqnyZG
  4. Enter dwihihdhduhwhhdwhdwihiudwhdwihihdhduhwhhdwhdwihiudwhdwihihdhd@gmail.com
    for assignee
  5. Create the task
  6. Repeat Step 2 to 5 with long random text as title

Expected Result:

Task is created without issue

Actual Result:

Step 5 - Task is not created. App crashes

Workaround:

Unknown

Platforms:

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

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.38.3

Reproducible in staging?: Yes

Reproducible in production?: Yes

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

Notes/Photos/Videos: Any additional supporting documentation

Bug6120143_Screen_Recording_20230708_044426_New_Expensify.mp4

Expensify/Expensify Issue URL:

Issue reported by: Applause - Internal Team

Slack conversation:

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01f538b2c63a1c7040
  • Upwork Job ID: 1678802099600863232
  • Last Price Increase: 2023-07-25
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jul 10, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 10, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jul 10, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@hungvu193
Copy link
Contributor

hungvu193 commented Jul 10, 2023

Proposal

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

Android - Task - App crashes when part of long link is used as title

What is the root cause of that problem?

When user tried to enter really long message as a part of link for the title or description, our buildOptimisticAddCommentReportAction will tried to parse it which caused the crash since it reached maximum stack

const commentText = getParsedComment(text);

Screen Shot 2023-07-10 at 21 17 38

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

Add validation for our task title and description that only allow character and number, we can also limit the length of them ie: 300 characters.

What alternative solutions did you explore? (Optional)

We should simplify our web site regex.

@twisterdotcom
Copy link
Contributor

Wow, what a super edge case. Going to make this external, but it's gonna be weekly.

@twisterdotcom twisterdotcom added the External Added to denote the issue can be worked on by a contributor label Jul 11, 2023
@melvin-bot melvin-bot bot changed the title Android - Task - App crashes when part of long link is used as title [$1000] Android - Task - App crashes when part of long link is used as title Jul 11, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 11, 2023

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jul 11, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 11, 2023

Current assignee @twisterdotcom is eligible for the External assigner, not assigning anyone new.

@melvin-bot
Copy link

melvin-bot bot commented Jul 11, 2023

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

@twisterdotcom twisterdotcom added Weekly KSv2 and removed Daily KSv2 labels Jul 11, 2023
@situchan
Copy link
Contributor

Same root cause as #21266

@mkhan9047
Copy link

mkhan9047 commented Jul 11, 2023

My approach will be like below:

Implement Text Chunking: Modify the buildOptimisticAddCommentReportAction function to break down the input text into smaller chunks before parsing. This would be done by splitting the text into segments that fall within the regex stack limit.

Adjust Parsing Approach: Instead of parsing the entire text string in one go, parse each chunk individually. This would require adjusting the modifyTextForUrlLinks function in ExpensiMark.js to handle the chunked text.

Reconstruct the Parsed Text: After all chunks have been parsed, they would be combined back together to form the fully parsed text. This should be done in such a way that it is seamless and does not affect the format of the text.

And then testing,The solution would be thoroughly tested to ensure that it works as expected and does not introduce new issues. This would include testing with long strings of text, as well as regular-sized text to ensure normal functionality is not affected.

Contributor details:

Your Expensify account email: [email protected]

Upwork Profile Link: https://www.upwork.com/freelancers/~01afa8ccb0ed055af6

@melvin-bot
Copy link

melvin-bot bot commented Jul 11, 2023

📣 @mkhan9047! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  2. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  3. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@mollfpr
Copy link
Contributor

mollfpr commented Jul 13, 2023

Following the similar issue in the Slack thread

@melvin-bot
Copy link

melvin-bot bot commented Jul 18, 2023

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

@melvin-bot melvin-bot bot added the Overdue label Jul 21, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 24, 2023

@twisterdotcom @mollfpr 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 melvin-bot bot added Daily KSv2 and removed Weekly KSv2 Overdue labels Jul 24, 2023
@mkhan9047
Copy link

I commented here with my solution and also gave my Upwork Id link and my account email. But got no reply or contract on Upwork. I can do it, I shared my solution too.

@mollfpr
Copy link
Contributor

mollfpr commented Jul 25, 2023

@mkhan9047 You must send a proposal like #22554 (comment) to get the C+ review.

Please read through the CONTRIBUTING_GUIDES to get a better idea of how to start contributing to this repo and what the process here.

@mkhan9047
Copy link

Ok

@melvin-bot
Copy link

melvin-bot bot commented Jul 25, 2023

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

@twisterdotcom
Copy link
Contributor

Are we going with the solution @thienlnam mentioned here: https://expensify.slack.com/archives/C01GTK53T8Q/p1689702375226399?thread_ts=1689024254.320539&cid=C01GTK53T8Q.

If so, is this a dupe of #21266?

@mollfpr
Copy link
Contributor

mollfpr commented Jul 27, 2023

@twisterdotcom I just tested the PR for #21266, and it did fix this issue. I think we can close this.

@twisterdotcom
Copy link
Contributor

Okay great. Going to close!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors
Projects
None yet
Development

No branches or pull requests

6 participants