Page MenuHomePhabricator

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

Authored by ashoat on Dec 18 2022, 7:57 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 22, 7:25 AM
Unknown Object (File)
Fri, Nov 22, 7:20 AM
Unknown Object (File)
Fri, Nov 22, 7:05 AM
Unknown Object (File)
Fri, Nov 22, 6:55 AM
Unknown Object (File)
Fri, Nov 22, 6:50 AM
Unknown Object (File)
Fri, Nov 22, 6:41 AM
Unknown Object (File)
Fri, Nov 22, 1:08 AM
Unknown Object (File)
Thu, Nov 14, 10:03 AM
Subscribers

Details

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

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

Harbormaster returned this revision to the author for changes because remote builds failed.Dec 18 2022, 7:58 PM
Harbormaster failed remote builds in B14252: Diff 19491!
ashoat retitled this revision from [native] [27/40] RN 0.70: Fix Expo 47 SecureStore crash on Android to [native] [28/40] RN 0.70: Fix Expo 47 SecureStore crash on Android.Dec 18 2022, 8:05 PM
Harbormaster returned this revision to the author for changes because remote builds failed.Dec 18 2022, 9:34 PM
Harbormaster failed remote builds in B14300: Diff 19539!
ashoat published this revision for review.Dec 19 2022, 9:11 AM

Please ignore CI until the end of the stack

This revision is now accepted and ready to land.Dec 20 2022, 5:26 AM