App Crash on Android in EAS build

I have created a new expo app using the expo cli and I am using EAS build, I am getting this error from adb logcat as soon as my app starts, it then crashes

This does not happen on classic builds however

11-28 15:06:03.217 14727 14756 E AndroidRuntime: Process: com.bluetrino.app, PID: 14727
11-28 15:06:03.217 14727 14756 E AndroidRuntime: java.lang.RuntimeException: com.facebook.react.devsupport.JSException: Native module not found
11-28 15:06:03.217 14727 14756 E AndroidRuntime: 	at com.facebook.react.bridge.DefaultNativeModuleCallExceptionHandler.handleException(DefaultNativeModuleCallExceptionHandler.java:20)
11-28 15:06:03.217 14727 14756 E AndroidRuntime: 	at com.facebook.react.devsupport.DisabledDevSupportManager.handleException(DisabledDevSupportManager.java:164)
11-28 15:06:03.217 14727 14756 E AndroidRuntime: 	at com.facebook.react.bridge.CatalystInstanceImpl.onNativeException(CatalystInstanceImpl.java:614)
11-28 15:06:03.217 14727 14756 E AndroidRuntime: 	at com.facebook.react.bridge.CatalystInstanceImpl.access$1100(CatalystInstanceImpl.java:47)
11-28 15:06:03.217 14727 14756 E AndroidRuntime: 	at com.facebook.react.bridge.CatalystInstanceImpl$NativeExceptionHandler.handleException(CatalystInstanceImpl.java:632)
11-28 15:06:03.217 14727 14756 E AndroidRuntime: 	at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:29)
11-28 15:06:03.217 14727 14756 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:164)
11-28 15:06:03.217 14727 14756 E AndroidRuntime: 	at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:226)
11-28 15:06:03.217 14727 14756 E AndroidRuntime: 	at java.lang.Thread.run(Thread.java:764)
11-28 15:06:03.217 14727 14756 E AndroidRuntime: Caused by: com.facebook.react.devsupport.JSException: Native module not found
11-28 15:06:03.217 14727 14756 E AndroidRuntime: 	at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
11-28 15:06:03.217 14727 14756 E AndroidRuntime: 	at android.os.Handler.handleCallback(Handler.java:790)
11-28 15:06:03.217 14727 14756 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:99)
11-28 15:06:03.217 14727 14756 E AndroidRuntime: 	at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)
11-28 15:06:03.217 14727 14756 E AndroidRuntime: 	... 3 more
11-28 15:06:03.217 14727 14756 E AndroidRuntime: Caused by: com.facebook.jni.CppException: Native module not found```

Hey @chadfaurie, based on the error logs it looks like your JS bundle is calling a native module which is not present. Is there a chance you published a JS bundle update that makes reference to a module that wasn’t present in your package.json at the time the binary was built?

One of the key changes between expo build and eas build is that EAS only includes the packages that are present in your package.json rather than the whole SDK’s offering. Migrating from "expo build" - Expo Documentation

Cheers,
Adam

Hey @adamjnav, so that is what I assumed was happening, what I then attempted to do was to go to a bare app.tsx and start testing imports, but it seems that as soon as I add anything back it starts failing which I find extremely strange, other than if there are references to packages that I am unaware of

Thanks for the link, i have a suspicion that running expo install expo-navigation-bar and expo install expo-system-ui may solve my issues, I am going to run some tests and will hopefully post back results soon

If anyone else happens to stumble upon this, it was Sentry that was causing this issue
I had attempted to setup the routing instrumentations which does not seem to work on eas, see below the commented out code

// const routingInstrumentation = new Sentry.Native.ReactNavigationInstrumentation()

<NavigationContainer
  // onReady={() => {
  //   // Register the navigation container with the instrumentation
  //   routingInstrumentation?.registerNavigationContainer(navigation);
  // }}>
   <Routes />
</NavigationContainer>

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