wire-android icon indicating copy to clipboard operation
wire-android copied to clipboard

fix: recreate cache directories in case cache is cleared [WPB-7368]

Open saleniuk opened this issue 1 year ago • 4 comments

BugWPB-7368 [Android] Playstore crash - Resample Image and File handling


PR Submission Checklist for internal contributors

  • The PR Title

    • [x] conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
    • [x] contains a reference JIRA issue number like SQPIT-764
    • [x] answers the question: If merged, this PR will: ... ³
  • The PR Description

    • [x] is free of optional paragraphs and you have filled the relevant parts to the best of your ability

What's new in this PR?

Issues

We get multiple crashes when accessing cache files (ENOENT errors) which potentially suggest that the cache is fully cleared and the app cannot find needed directories for the given user in cache to create a temporary file for that user.

Solutions

Refactor code to have only single source of temporary file paths - kaliumFileSystem.tempFilePath, and use updated kalium version where cache directories are being recreated when getting a temporary cache file path in case cache is cleared.

Dependencies (Optional)

Needs releases with:

  • https://github.com/wireapp/kalium/pull/2773

Testing

How to Test

Open the app, clear app cache and try to send or download asset.

Notes (Optional)

Specify here any other facts that you think are important for this issue.


PR Post Submission Checklist for internal contributors (Optional)

  • [x] Wire's Github Workflow has automatically linked the PR to a JIRA issue

PR Post Merge Checklist for internal contributors

  • [x] If any soft of configuration variable was introduced by this PR, it has been added to the relevant documents and the CI jobs have been updated.

References
  1. https://sparkbox.com/foundry/semantic_commit_messages
  2. https://github.com/wireapp/.github#usage
  3. E.g. feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764.

saleniuk avatar May 17 '24 12:05 saleniuk

Test Results

927 tests   927 :white_check_mark:  9m 12s :stopwatch: 123 suites    0 :zzz: 123 files      0 :x:

Results for commit 39ef6da2.

github-actions[bot] avatar May 17 '24 12:05 github-actions[bot]

APKs built during tests are available here. Scroll down to Artifacts!

github-actions[bot] avatar May 17 '24 12:05 github-actions[bot]

Build 4798 succeeded.

The build produced the following APK's:

AndroidBob avatar May 17 '24 13:05 AndroidBob