[Android] [Bare] SDK 45 Upgrade - "Could not get BatchedBridge" Error after npx react-native run-android

Please provide the following:

  1. SDK Version: 45
  2. Platforms(Android/iOS/web/all): Android
  3. Add the appropriate “Tag” based on what Expo library you have a question on.

Hello!
We’ve successfully upgraded our Bare app from SDK 44 to 45.
The app builds and runs successfully on both Android and IOS standalone devices and IOS simulator.
Unfortunately the app throws the JS Error “Could not get BatchedBridge, make sure your bundle is packaged correctly.” after running npx react-native run-android on both emulator and physical device.

We followed the upgrade steps via:

We also applied as many updates via a diff of the example bare app:

It seems this error can happen if the metro bundler isn’t connected; however, when i apply changes via my IDE the app reloads, so it seems metro is hooked up okay.
When I run the app via expo-cli it also loads okay.
So it seems it may be something related to the native android code – it’s possible we missed something during the upgrade; however, I’m unclear on how to debug this error.
We would greatly appreciate any direction to debug or resolve this so we can test our android client!
Thank you so much!

Cheers,
Marc

UPDATE: I created a new expo sdk 45 project and ejected. I get the same “Could not get BatchedBridge” error when running npx react-native run-android so it may be related to the current expo sdk or react-native. Running in release mode npx react-native run-android --variant=release works as expected.

SOLVED:
for anyone else who may run into this:
i had updated to macOS Monterey for the sdk45 upgrade and it looks like my port 8081 is now in use.
the issue was resolved by specifying a different port via
npx react-native run-android --port 8082

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