HomePhabricator
Diffusion Comm 4386aef2000d

[native] Add CommSecureStore.get on main thread to resolve race with DB thread

Description

[native] Add CommSecureStore.get on main thread to resolve race with DB thread

Summary:
Start by reading the included code comment, which explains why we need it.

This resolves ENG-8069, which was an issue caused by D11702, which was supposed to address ENG-7700.

This Linear comment has some backstory.

Test Plan:

  1. Test on physical Android device. Confirm that before this diff it can reproduce ENG-8069
  2. Delete Comm app from phone. Deploy a release build with yarn react-native run-android --variant=release (may need to make sure native/facts/authoritative_keyserver.json is not set)
  3. Repeat the following steps 10 times:
    • Open the app and wait for LoggedOutModal to render
    • Kill the app
    • Open the app again and see if it crashes
    • Between attempts, clear the app's internal storage via settings

Reviewers: marcin, tomek

Differential Revision: https://phab.comm.dev/D12624

Details