HomePhabricator
Diffusion Comm e65cbbae7907

[native] [28/40] RN 0.70: Fix Expo 47 SecureStore crash on Android

Description

[native] [28/40] RN 0.70: Fix Expo 47 SecureStore crash on Android

Summary:
I (@ashoat) was seeing a crash-on-start in the Android app after the Expo update: ENG-2211. In the Linear issue, you can see that @bartek took on the investigation and created this commit that resolved the issue. Here's the initial commit text from him:

The expo-secure-store on Android now requires also providing Expo-specific ModuleRegistry. This is only needed, because the module now requires two interfaces: UIManager and ActivityProvider and it tries to access them using the module registry. Both of them are implemented by UIManagerModuleWrapper class which is simply a wrapper for some RN/Android functionalities.

My workaround is as follows:

  • Create mock expo ModuleRegistry object
  • Add a single module to the registry: UIManagerModuleWrapper
  • Provide the registry to SecureStoreModule.onCreate() to make it happy

Depends on D5922

Test Plan:

  1. Confirm crash-on-start with error text from linked Linear task is gone
  2. Tested along with whole stack: test plan

Reviewers: tomek, bartek

Subscribers: atul, bartek

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

Details

Provenance
bartekAuthored on Nov 10 2022, 11:53 PM
ashoatCommitted on Dec 20 2022, 10:58 AM
Differential Revision
D5923: [native] [28/40] RN 0.70: Fix Expo 47 SecureStore crash on Android
Parents
rCOMMf4d6e6abba09: [native] [27/40] RN 0.70: Patch react-native-camera to fix ViewPropTypes crash
Branches
Unknown
Tags
Unknown