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
F3345656: D5923.id19601.diff
Fri, Nov 22, 6:41 AM
F3342294: D5923.diff
Fri, Nov 22, 1:08 AM
Unknown Object (File)
Thu, Nov 14, 10:03 AM
Unknown Object (File)
Thu, Nov 14, 9:56 AM
Unknown Object (File)
Tue, Nov 12, 10:32 AM
Unknown Object (File)
Mon, Nov 11, 1:00 AM
Unknown Object (File)
Sun, Nov 10, 5:54 PM
Unknown Object (File)
Fri, Nov 8, 5: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
Lint Not Applicable
Unit
Tests Not Applicable

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