You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2024-02-14] [$500] Android-Attachments-App crashes on uploading specific PDF #29743
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2EngineeringInternalRequires API changes or must be handled by Expensify staff
Version Number: 1.3.85-0 Reproducible in staging?: Y Reproducible in production?: Y 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 Expensify/Expensify Issue URL: Issue reported by: Applause-Internal Team Slack conversation: @
Action Performed:
Launch app
Tap on a report
Tap plus icon near compose
Tap Add attachments
Tap Choose document
Select the below attached PDF
Expected Result:
User must be able to upload all pdf and app must not crash while trying to upload any pdf.
Actual Result:
When user tries to upload specific pdf app crashes.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
changed the title [-]Android-Attachments-App crashes on uploading specific PDF[/-][+][$500] Android-Attachments-App crashes on uploading specific PDF[/+]on Oct 17, 2023
Please re-state the problem that we are trying to solve in this issue.
Android-Attachments-App crashes on uploading specific (contains formula. Maths Symbols) PDF
What is the root cause of that problem?
this bug from react-native-pdf https://github.com/wonday/react-native-pdf/blob/b700b0a2f27b29728dcc9665289e6e628a669f56/index.js#L361
whenever pdf upload onchange will be trigger at the time we are getting message as string so they spliting the message. so in when [0] position coming as a loadComplete at the time it will trigger onLoadComplete with 4 the param as a tablecontent of pdf message[4]&&JSON.parse(message[4])
here when we parse json its throws the error because above pdf has maths logic so that contains json string (unstructured format ) like this
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.37-7 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
[@fedirjh] The PR that introduced the bug has been identified. Link to the PR:
[@fedirjh] 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:
[@fedirjh] A discussion in #expensify-bugs 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:
[@fedirjh] Determine if we should create a regression test for this bug.
[@fedirjh] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
[@abekkala] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
Determine if we should create a regression test for this bug: Yes
Regression Test Proposal
1. Launch App on Android native.
2. Navigate to any report.
3. Tap plus icon near composer
4. Tap Add attachments.
5. Tap Choose document.
6. Select this PDF file -> https://github.com/Expensify/App/files/12927237/class-9-maths-chapter-10-solutions.pdf
7. Verify pdf is loaded successfully and app did not crash.
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2EngineeringInternalRequires API changes or must be handled by Expensify staff
Activity
[-]Android-Attachments-App crashes on uploading specific PDF[/-][+][$500] Android-Attachments-App crashes on uploading specific PDF[/+]melvin-bot commentedon Oct 17, 2023
Triggered auto assignment to @abekkala (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Oct 17, 2023
Job added to Upwork: https://www.upwork.com/jobs/~01f2fe87b1c515e0af
melvin-bot commentedon Oct 17, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)melvin-bot commentedon Oct 17, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @thesahindia (
External)pradeepmdk commentedon Oct 17, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Android-Attachments-App crashes on uploading specific (contains formula. Maths Symbols) PDF
What is the root cause of that problem?
this bug from react-native-pdf

https://github.com/wonday/react-native-pdf/blob/b700b0a2f27b29728dcc9665289e6e628a669f56/index.js#L361
whenever pdf upload onchange will be trigger at the time we are getting message as string so they spliting the message. so in when [0] position coming as a
loadCompleteat the time it will triggeronLoadCompletewith 4 the param as a tablecontent of pdfmessage[4]&&JSON.parse(message[4])here when we parse json its throws the error because above pdf has maths logic so that contains json string (unstructured format ) like this
https://github.com/wonday/react-native-pdf/blob/b700b0a2f27b29728dcc9665289e6e628a669f56/index.js#L374
What changes do you think we should make in order to solve the problem?
we need to fix this upstream or patch fix using the below options
Option 1 )
add try-catch like
Options 2)
App/src/components/PDFView/index.native.js
Line 158 in bb22e06
we are not using tableContents so maybe we can remove this option in the patch fix
Options 3)
instead of parsing in react-native-pdf we can pass string and parse from in our app (but currently we are not using this 4th param)
thesahindia commentedon Oct 19, 2023
I am busy with other tasks so gonna unassign.
cc: @abekkala
142 remaining items
melvin-bot commentedon Feb 7, 2024
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Feb 7, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.37-7 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-02-14. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Feb 7, 2024
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
abekkala commentedon Feb 8, 2024
PAYMENTS FOR FEB 14
melvin-bot commentedon Feb 14, 2024
Payment Summary
Upwork Job
BugZero Checklist (@abekkala)
abekkala commentedon Feb 15, 2024
@pradeepmdk payment sent and contract ended - thank you! 🎉
abekkala commentedon Feb 15, 2024
@fedirjh can you complete the checklist, please? I can then send payment for this job
fedirjh commentedon Feb 15, 2024
BugZero Checklist:
Regression Test Proposal
abekkala commentedon Feb 15, 2024
@fedirjh payment sent and contract ended - thank you! 🎉