Bare workflow issue after upgrading to RN 0.65.0 — potentially related to splash-screen

Hi, everyone,

I just tried upgrading my bare workflow app to React Native 0.65.0 and now have a problem. The app builds fine but when running, I see a red error screen on the iOS Simulator (content below) and in the console, the following message:

No native splash screen registered for given view controller. Call 'SplashScreen.show' for given view controller first.

Here’s the information in the red error screen in the Simulator:

Exception '-[RCTModuleRegistry getAllExportedModules]: unrecognized selector sent to instance 0x600000854840' was thrown while invoking addProxiedListener on target UMReactNativeEventEmitter with params (
    ExpoNotificationsHandlerModule,
    onHandleNotification
)
callstack: (
	0   CoreFoundation                      0x00007fff20422fba __exceptionPreprocess + 242
	1   libobjc.A.dylib                     0x00007fff20193ff5 objc_exception_throw + 48
	2   CoreFoundation                      0x00007fff20431d2f +[NSObject(NSObject) instanceMethodSignatureForSelector:] + 0
	3   CoreFoundation                      0x00007fff204274cf ___forwarding___ + 1455
	4   CoreFoundation                      0x00007fff204297a8 _CF_forwarding_prep_0 + 120
	5   AppName                             0x0000000101b35d05 __copy_helper_block_e8_32s40s48s56b64b72s + 9734
	6   AppName                             0x0000000101516705 -[RCTEventEmitter addListener:] + 85
	7   AppName                             0x0000000101b35f04 __copy_helper_block_e8_32s40s48s56b64b72s + 10245
	8   CoreFoundation                      0x00007fff20429a3c __invoking___ + 140
	9   CoreFoundation                      0x00007fff20426c6f -[NSInvocation invoke] + 305
	10  CoreFoundation                      0x00007fff20426f02 -[NSInvocation invokeWithTarget:] + 70
	11  AppName                             0x00000001015581b4 -[RCTModuleMethod invokeWithBridge:module:arguments:] + 2660
	12  AppName                             0x000000010155cc57 _ZN8facebook5reactL11invokeInnerEP9RCTBridgeP13RCTModuleDatajRKN5folly7dynamicEiN12_GLOBAL__N_117SchedulingContextE + 1495
	13  AppName                             0x000000010155c462 _ZZN8facebook5react15RCTNativeModule6invokeEjON5folly7dynamicEiENK3$_0clEv + 178
	14  AppName                             0x000000010155c39c ___ZN8facebook5react15RCTNativeModule6invokeEjON5folly7dynamicEi_block_invoke + 28
	15  libdispatch.dylib                   0x00007fff2010670d _dispatch_call_block_and_release + 12
	16  libdispatch.dylib                   0x00007fff201078df _dispatch_client_callout + 8
	17  libdispatch.dylib                   0x00007fff2010de15 _dispatch_lane_serial_drain + 715
	18  libdispatch.dylib                   0x00007fff2010e98c _dispatch_lane_invoke + 400
	19  libdispatch.dylib                   0x00007fff20118f81 _dispatch_workloop_worker_thread + 772
	20  libsystem_pthread.dylib             0x00007fff6034045d _pthread_wqthread + 314
	21  libsystem_pthread.dylib             0x00007fff6033f42f start_wqthread + 15
)

RCTFatal
facebook::react::invokeInner(RCTBridge*, RCTModuleData*, unsigned int, folly::dynamic const&, int, (anonymous namespace)::SchedulingContext)
facebook::react::RCTNativeModule::invoke(unsigned int, folly::dynamic&&, int)::$_0::operator()() const
invocation function for block in facebook::react::RCTNativeModule::invoke(unsigned int, folly::dynamic&&, int)
_dispatch_call_block_and_release
_dispatch_client_callout
_dispatch_lane_serial_drain
_dispatch_lane_invoke
_dispatch_workloop_worker_thread
_pthread_wqthread
start_wqthread

For context, I’m using the AppLoading component as follows. Before this RN 0.65.0 upgrade, I was having no problems and the splash screen was working as expected.

App.tsx

// ...

async function _cacheResourcesAsync() {
  await Font.loadAsync({
    Poppins_300Light,
    Poppins_400Regular,
    // ...
  })
}

if (!appIsReady || state.isLoading) {
  return (
    <AppLoading
      startAsync={_cacheResourcesAsync}
      onFinish={() => setAppIsReady(true)}
      onError={(error) => Sentry.Native.captureException(error)}
    />
  )
}

return {
  // ...
}

I’ve tried clearing everything — node_modules, yarn cache, bundler cache, pods, etc. — and still have this issue. I’m hoping that there’s something Expo-related that maybe needs upgrading for the just-released RN 0.65.0 but I’m not sure. If there’s anything else I can share that may help, please let me know and I’d be happy to do so.

Thanks in advance.

From the stack trace, it looks like ExpoNotificationsHandlerModule is actually the problem. What if you uninstall expo-notifications, does it work then?

Hi, Charlie.

Thanks for the message. I just uninstalled expo-notifications (and commented-out any related code) and I still get this console error:

WARN  Possible Unhandled Promise Rejection (id: 0):
Error: No native splash screen registered for given view controller. Call 'SplashScreen.show' for given view controller first.

That said, the stack trace is a little different — this time, it’s mentioning ExpoInAppPurchases:

Exception '-[RCTModuleRegistry getAllExportedModules]: unrecognized selector sent to instance 0x6000038dddc0' was thrown while invoking addProxiedListener on target UMReactNativeEventEmitter with params (
    ExpoInAppPurchases,
    "Expo.purchasesUpdated"
)
callstack: (
	0   CoreFoundation                      0x00007fff20422fba __exceptionPreprocess + 242
	1   libobjc.A.dylib                     0x00007fff20193ff5 objc_exception_throw + 48
	2   CoreFoundation                      0x00007fff20431d2f +[NSObject(NSObject) instanceMethodSignatureForSelector:] + 0
	3   CoreFoundation                      0x00007fff204274cf ___forwarding___ + 1455
	4   CoreFoundation                      0x00007fff204297a8 _CF_forwarding_prep_0 + 120
	5   AppName                             0x000000010261bfcd __copy_helper_block_e8_32s40s48s56b64b72s + 9734
	6   AppName                             0x000000010200af05 -[RCTEventEmitter addListener:] + 85
	7   AppName                             0x000000010261c1cc __copy_helper_block_e8_32s40s48s56b64b72s + 10245
	8   CoreFoundation                      0x00007fff20429a3c __invoking___ + 140
	9   CoreFoundation                      0x00007fff20426c6f -[NSInvocation invoke] + 305
	10  CoreFoundation                      0x00007fff20426f02 -[NSInvocation invokeWithTarget:] + 70
	11  AppName                             0x000000010204c9b4 -[RCTModuleMethod invokeWithBridge:module:arguments:] + 2660
	12  AppName                             0x0000000102051457 _ZN8facebook5reactL11invokeInnerEP9RCTBridgeP13RCTModuleDatajRKN5folly7dynamicEiN12_GLOBAL__N_117SchedulingContextE + 1495
	13  AppName                             0x0000000102050c62 _ZZN8facebook5react15RCTNativeModule6invokeEjON5folly7dynamicEiENK3$_0clEv + 178
	14  AppName                             0x0000000102050b9c ___ZN8facebook5react15RCTNativeModule6invokeEjON5folly7dynamicEi_block_invoke + 28
	15  libdispatch.dylib                   0x00007fff2010670d _dispatch_call_block_and_release + 12
	16  libdispatch.dylib                   0x00007fff201078df _dispatch_client_callout + 8
	17  libdispatch.dylib                   0x00007fff2010de15 _dispatch_lane_serial_drain + 715
	18  libdispatch.dylib                   0x00007fff2010e98c _dispatch_lane_invoke + 400
	19  libdispatch.dylib                   0x00007fff20118f81 _dispatch_workloop_worker_thread + 772
	20  libsystem_pthread.dylib             0x00007fff6034045d _pthread_wqthread + 314
	21  libsystem_pthread.dylib             0x00007fff6033f42f start_wqthread + 15
)

RCTFatal
facebook::react::invokeInner(RCTBridge*, RCTModuleData*, unsigned int, folly::dynamic const&, int, (anonymous namespace)::SchedulingContext)
facebook::react::RCTNativeModule::invoke(unsigned int, folly::dynamic&&, int)::$_0::operator()() const
invocation function for block in facebook::react::RCTNativeModule::invoke(unsigned int, folly::dynamic&&, int)
_dispatch_call_block_and_release
_dispatch_client_callout
_dispatch_lane_serial_drain
_dispatch_lane_invoke
_dispatch_workloop_worker_thread
_pthread_wqthread
start_wqthread

Looking at this issue, it seems like the problem is with expo-* packages.

Update: I removed expo-notifications and expo-in-app-purchases and I no longer have any errors or warnings.

Yeah, looks like we need to update some of our packages for RN 65

1 Like

Thanks for looking into this with me, Charlie.

I know these things take time but do you have even the slightest idea when these packages may be updated? I only ask because I’m relatively close to releasing an app and, ideally, I’d like to be running RN 0.65.0 so I’d potentially hold off a little before if I thought the expo-* packages may be updated soon.

Thanks again. Have a nice day.

Hi. I’m not part of the Expo team, but I believe it would be at least the end of the year before they switch the Expo SDK to be based on RN 0.65.x.

SDK 42 is based on 0.63.2.

And as far as I can tell, SDK 43 (probably due around the end of September) will be based on 0.64.2.

If I were to guess I don’t think SDK 44 would be based on RN 0.65 either.

Maybe it’s possible to update these packages to be compatible with RN 0.65.0 before actually updating the SDK to be based on RN 0.65.x. I don’t know. I suppose if you can narrow down the cause of the issue then maybe you could patch RN 0.65, or else the affected expo packages to get them to work together. And maybe the Expo team would be interested in a PR.

Hi. Thanks for the message — that’s good to know. This is my first app with RN/Expo so I’m learning how these things work as I go. It’s not essential that I use RN 0.65.0 in production but seeing as I had to eject for In-App Purchases, I figured one benefit of that would be that I could keep up with the latest React and React Native updates — so far, that’s been the case. I guess there’s more to it with these expo-* packages, though.

Thanks again.

By the way, you might be interested in this thread:

Thanks for sharing!

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.