Closed kavimuru closed 2 months ago
Triggered auto assignment to @sakluger (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details.
Platforms
in OP are β
)App cache is not being cleared on logout
I could not find any place where we are clearing the storage on native devices on logout. This seems more like a feature to me.
The problem at hand can be broken down into two parts.
The first part involves getting the path of the cache directory. We can get the path / location of the cache directory by using react-native-fs
package. This library exposes a CachesDirectoryPath
method that will give us the path to the cache directory.
The second part involves deleting the files present at the above path. This can be done by using unlink
method that the react-native-fs
package exposes. By supplying the path from step 1 to this method, all the cache of the app can be cleared.
We can also use this package to clear the app storage on logout. This package is forked from another package which wasn't working for RN > 0.60. If required, we can just copy the native files and use those directly in our code as custom native modules (https://reactnative.dev/docs/native-modules-android)
Confirmed that the cache is not cleared after signing out. I tried sending an image and the cache change to 1.2MB, then I signed out and the cache was still at 1.2 MB.
Job added to Upwork: https://www.upwork.com/jobs/~0121d019453eb06be4
Current assignee @sakluger is eligible for the External assigner, not assigning anyone new.
Triggered auto assignment to Contributor-plus team member for initial proposal review - @mollfpr (External
)
Triggered auto assignment to @alex-mechler (External
), see https://stackoverflow.com/c/expensify/questions/7972 for more details.
I'm willing to fix the issue, can I?
Reviewing proposal!
@rvenky125 Could you propose a solution? Thanks!
full of bugs bruh
π£ @behind24proxies! π£ 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:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>
Reviewing proposal!
@rvenky125 Could you propose a solution? Thanks!
Can you pls assist me that how can I run the project with windows environment. I installed all node modules and if run npm run android
, I'm getting that the scripts command not found.
@rvenky125 have you followed the instructions here https://github.com/Expensify/App/blob/main/README.md#local-development?
Internally we do not use windows, so it is focused on MacOS. I would check https://reactnative.dev/docs/environment-setup?os=windows#development-os for setting up android on windows
Triggered auto assignment to @kadiealexander (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details.
Readded BZ label since I'm OOO next week.
@mollfpr have you reviewed @allroundexperts's proposal? https://github.com/Expensify/App/issues/19767#issuecomment-1567533987
π£ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? πΈ
Sorry for the delay π
We can also use this package to clear the app storage on logout. This package is forked from another package which wasn't working for RN > 0.60. If required, we can just copy the native files and use those directly in our code as custom native modules (https://reactnative.dev/docs/native-modules-android)
@alex-mechler I'm inclined to go with the alternative solution of @allroundexperts proposal. The reason is react-native-fs
seems complicated to implement. What do you think?
I agree, the alternative seems more straight forward here. Is there any concern about data we might not want cleared on logout? I don't think there is anything off the top of my head
My two cents here are to go with approach 1. The reason is that libraries like react-native-fs
are very well maintained and we might need to install them in the future anyway. The API for react-native-fs
looks very straightforward to me as well.
Great point about it being more well maintained. Its certainly preferable to use a well maintained library like that. @mollfpr do you have concerns with react-native-fs
other than it being more complex @mollfpr?
I don't have other concerns on react-native-fs
π
Sounds good, lets go with @allroundexperts proposal then!
π£ @allroundexperts You have been assigned to this job by @alex-mechler! Please apply to this job in Upwork and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review π§βπ» Keep in mind: Code of Conduct | Contributing π
PR created https://github.com/Expensify/App/pull/20477
Based on my calculations, the pull request did not get merged within 3 working days of assignment. Please, check out my computations here:
On to the next one π
@sakluger, @alex-mechler, @mollfpr, @allroundexperts, @kadiealexander Whoops! This issue is 2 days overdue. Let's get this updated quick!
Back from vacation, unassigning @kadiealexander. Also sent offers to @allroundexperts and @mollfpr so when the PR is deployed and settled we can pay out.
Reviewing
label has been removed, please complete the "BugZero Checklist".
The solution for this issue has been :rocket: deployed to production :rocket: in version 1.3.28-5 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2023-06-23. :confetti_ball:
After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
As a reminder, here are the bonuses/penalties that should be applied for any External 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:
I'm removing AlexM's assignment, and not going to trigger assignment of a new CME (since this is ready for payment at this stage!).
Hey @mollfpr could you please make sure to complete the BZ checklist when you have a chance so that I can pay out the contracts tomorrow? Thanks!
Bump @mollfpr on the BZ checklist.
Sorry for the delay @sakluger
[@mollfpr / @allroundexperts] The PR that introduced the bug has been identified. Link to the PR: [@mollfpr / @allroundexperts] 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 offending PR. This is an improvement for the native app to clean the cache on sign-out.
[@mollfpr / @allroundexperts] 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:
This is not a bug, so a regression test should be enough.
[@mollfpr / @allroundexperts] Determine if we should create a regression test for this bug.
Yes!
[@mollfpr / @allroundexperts] 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.
Prerequisites installed New Expensify app.
For Android
π or π
Thanks! Regression test issue created, contracts paid, all done here!
This is happening to me on iOS, I can create a new bug report/issue, want to reopen now to see if anyone knows why it might be happening.
On iOS, latest staging build, testflight
Hey @mallenexpensify, I think we should create a new GH issue instead so I'm going to close this one back out. Feel free to tag the relevant people on the new issue.
I guess that means no one knows why it might be happening π§ Reported in #expensify-bugs https://expensify.slack.com/archives/C049HHMV9SM/p1725058768402589
If you havenβt already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Action Performed:
Expected Result:
All data and cache are cleared
Actual Result:
Still showing 144mb of data cached and 32 mb of user data
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.19-2 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 Notes/Photos/Videos: Any additional supporting documentation
Expensify/Expensify Issue URL: Issue reported by: @quinthar Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1684945967487669
View all open jobs on GitHub
Upwork Automation - Do Not Edit