-
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
[HOLD for payment 2024-03-11] [HOLD for payment 2024-03-07] [$500] iOS - Attachment - PDF files aren't cached and flashes once while loading #32232
Comments
Job added to Upwork: https://www.upwork.com/jobs/~01aa9414036934592a |
Triggered auto assignment to @garrettmknight ( |
Bug0 Triage Checklist (Main S/O)
|
Triggered auto assignment to Contributor-plus team member for initial proposal review - @getusha ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.iOS - Attachment - PDF files aren't cached What is the root cause of that problem?We don't use special param for using cache What changes do you think we should make in order to solve the problem?Update this line like
App/src/components/PDFView/index.native.js Line 158 in f7124d5
What alternative solutions did you explore? (Optional)NA |
ProposalPlease re-state the problem that we are trying to solve in this issue.PDF files aren't cached. They are downloaded every time a request is made What is the root cause of that problem?We're not setting caching configuration properly for the PDF in native, see here What changes do you think we should make in order to solve the problem?We need to set
To fix this we need to
Detail implementation: When users logout or authToken get changed we run the following code
What alternative solutions did you explore? (Optional)NA |
ProposalPlease re-state the problem that we are trying to solve in this issue.PDF files are not cached and are re-downloaded everytime. What is the root cause of that problem?The use of the react-native-pdf module is not using the caching options What changes do you think we should make in order to solve the problem?There are 4 items to address it reasonably and completely.
Where cacheFileName is specified by taking the original filename (or id) and prepending the sanitized user's id to it. This way we can easily clean any files not of the current user later by scanning the all files in the CacheDir on Login/Logout with react-native-blob-util
We also should a reasonable expiration time to avoid the Apps storage from growing too large. For example 3 days which is 259200 seconds.
It will be similar to 3 but will involve checking the size of CacheDir folder using What alternative solutions did you explore? (Optional)N/A |
@tienifr how are we going to delete the cache after the user logs out? could you share a code snippet? |
Just a note that I've reproduced. |
@getusha I just added the detail implementation to delete the cache |
Triggered auto assignment to @MonilBhavsar, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
Sounds good. Do we have caching in web? why it is only reproducible on iOS native |
@MonilBhavsar In web, attachments are already cached by default so It doesn't happen on web |
Thanks! wanted to ensure, it's the browser only and we're not using any specific mechanism. |
📣 @getusha 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app! |
📣 @tienifr 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
Working on the PR on specific cases, @tienifr will update soon. |
PR is ready for review, still moving forward. |
PR is still in progress. |
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. |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.45-6 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-03-07. 🎊 For reference, here are some details about the assignees on 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:
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.46-2 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-03-11. 🎊 For reference, here are some details about the assignees on 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:
|
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: [@getusha] The PR that introduced the bug has been identified. Link to the PR: This is a new feature Regression Test Proposal
Do we agree 👍 or 👎 |
Paid up at 50% based on the regression, closing! |
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: 1.4.5.1
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:
Expected Result:
PDF files should be cached and no flashing once while loading
Actual Result:
PDF files aren't cached and flashes once while loading. They are downloaded every time a request is made
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6295195_1701295268248.Cache.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: