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) #2864

Conversation

alexandreferris
Copy link
Contributor

@alexandreferris alexandreferris commented Apr 5, 2024

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


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 SQPIT-764
    • 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: certificate.txt
To: wire-certificate-{user_handle}-{date-time}.txt

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

@alexandreferris alexandreferris self-assigned this Apr 5, 2024
Copy link
Contributor

github-actions bot commented Apr 5, 2024

Test Results

816 tests   816 ✅  11m 33s ⏱️
110 suites    0 💤
110 files      0 ❌

Results for commit 1fd0e8d.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Apr 5, 2024

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

@alexandreferris alexandreferris requested review from a team, typfel, yamilmedina, borichellow, MohamadJaara and ohassine and removed request for a team April 5, 2024 10:29
@AndroidBob
Copy link
Collaborator

Build 3991 succeeded.

The build produced the following APK's:

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

Build 4002 succeeded.

The build produced the following APK's:

@alexandreferris alexandreferris merged commit 13d1705 into release/candidate Apr 5, 2024
12 checks passed
@alexandreferris alexandreferris deleted the fix/crash_graphene_os_downloading_certificate branch April 5, 2024 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants