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)
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
Unknown Object (File)
Wed, Nov 6, 7:10 PM
Unknown Object (File)
Mon, Nov 4, 4:52 PM
Unknown Object (File)
Mon, Nov 4, 4:07 PM
Unknown Object (File)
Mon, Nov 4, 4:07 PM
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