How were you trying to build the app?
After using react-native-vision-camera latest ver patch, the project builds successfully, but the app is crashing.
Here’s the logcat output showing the error:
08-22 00:24:18.913 14517 14582 E AndroidRuntime: java.lang.IllegalStateException: Tried to access a JS module before the React instance was fully set up. Calls to ReactContext#getJSModule should only happen once initialize() has been called on your native module.
08-22 00:24:18.913 14517 14582 E AndroidRuntime: at com.facebook.react.bridge.BridgeReactContext.getJSModule(BridgeReactContext.java:111)
08-22 00:24:18.913 14517 14582 E AndroidRuntime: at com.mrousavy.camera.react.CameraDevicesManager.sendAvailableDevicesChangedEvent(CameraDevicesManager.kt:102)
Can anyone please help me figure out what’s going wrong?
Full build logs
08-22 00:24:18.913 14517 14582 E AndroidRuntime: java.lang.IllegalStateException: Tried to access a JS module before the React instance was fully set up. Calls to ReactContext#getJSModule should only happen once initialize() has been called on your native module.
08-22 00:24:18.913 14517 14582 E AndroidRuntime: at com.facebook.react.bridge.BridgeReactContext.getJSModule(BridgeReactContext.java:111)
08-22 00:24:18.913 14517 14582 E AndroidRuntime: at com.mrousavy.camera.react.CameraDevicesManager.sendAvailableDevicesChangedEvent(CameraDevicesManager.kt:102)
Project dependencies
"dependencies": {
"react": "19.1.0",
"react-native": "^0.81.0",
"react-native-vision-camera": "^4.7.1",
"react-native-worklets-core": "^1.6.2"
}
VisionCamera Version
4.7.1
Target platforms
Android
Operating system
MacOS
Can you build the VisionCamera Example app?
No, I cannot build the Example app either
Additional information
How were you trying to build the app?
After using react-native-vision-camera latest ver patch, the project builds successfully, but the app is crashing.
Here’s the logcat output showing the error:
08-22 00:24:18.913 14517 14582 E AndroidRuntime: java.lang.IllegalStateException: Tried to access a JS module before the React instance was fully set up. Calls to ReactContext#getJSModule should only happen once initialize() has been called on your native module.
08-22 00:24:18.913 14517 14582 E AndroidRuntime: at com.facebook.react.bridge.BridgeReactContext.getJSModule(BridgeReactContext.java:111)
08-22 00:24:18.913 14517 14582 E AndroidRuntime: at com.mrousavy.camera.react.CameraDevicesManager.sendAvailableDevicesChangedEvent(CameraDevicesManager.kt:102)
Can anyone please help me figure out what’s going wrong?
Full build logs
Project dependencies
VisionCamera Version
4.7.1
Target platforms
Android
Operating system
MacOS
Can you build the VisionCamera Example app?
No, I cannot build the Example app either
Additional information