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

fix: crash on GrapheneOS when downloading certificate (WPB-7407) #2867

Conversation

AndroidBob
Copy link
Collaborator

@AndroidBob AndroidBob commented Apr 5, 2024

BugWPB-7407 [Android] Crash on graphene OS when downloading own or another users certificate

Cherry pick from the original PR:


⚠️ Conflicts during cherry-pick:
app/src/main/kotlin/com/wire/android/ui/home/messagecomposer/recordaudio/AudioMediaRecorder.kt
kalium


PR Submission Checklist for internal contributors

  • The PR Title

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

    • 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

There is 2 issues:

  • When downloading certificate when user is in GrapheneOS it would crash the app
  • When downloading certificate it would download twice (double files)

Causes (Optional)

  • Crash : we need to ask file writing permissions for users in GrapheneOS.
  • double files : We generate the certificate file and was downloading the generated file again.

Solutions

  • Crash : Add verification to ask users permission to write files into external storage (/Downloads folder)
  • double files : remove second download of generated certificate file and change its name:

From:
To:

Testing

How to Test

  • Login to environment with MLS + E2EI enabled
  • Generate certificate
  • Go to : Settings -> Devices -> Current Device -> Certificate Details -> 3 dots at top-right corner -> download
  • Success message should appear, app should NOT crash and when checking /Downloads folder it should contain only 1 certificate file

@AndroidBob AndroidBob added the cherry-pick PR is cherry-picking changes from another banch label Apr 5, 2024
@alexandreferris alexandreferris requested review from a team, MohamadJaara, mchenani, Garzas, ohassine and saleniuk and removed request for a team April 5, 2024 14:34
Copy link
Contributor

github-actions bot commented Apr 5, 2024

Test Results

878 tests  ±0   878 ✅ ±0   8m 47s ⏱️ - 6m 47s
120 suites ±0     0 💤 ±0 
120 files   ±0     0 ❌ ±0 

Results for commit 7a4da0b. ± Comparison against base commit c9069ba.

Copy link
Contributor

github-actions bot commented Apr 5, 2024

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

@AndroidBob
Copy link
Collaborator Author

Build 4009 failed.

@alexandreferris alexandreferris added this pull request to the merge queue Apr 5, 2024
Merged via the queue into develop with commit 2f9e6de Apr 5, 2024
12 of 13 checks passed
@alexandreferris alexandreferris deleted the fix/crash_graphene_os_downloading_certificate-cherry-pick branch April 5, 2024 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick PR is cherry-picking changes from another banch size/XS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants