React Native: Android - Google mlkit FaceDetection causing app crash with FATAL EXCEPTION - react-native

After configuring the Firebase dashboard and integrating everything into my React Native app, when launching the Android Emulator the app crashes and I get the following error:
FATAL EXCEPTION: create_react_context
Process: com.appName, PID: XXXX
java.lang.VerifyError: Verifier rejected class com.google.mlkit.vision.face.FaceDetection: com.google.mlkit.vision.face.FaceDetector com.google.mlkit.vision.face.FaceDetection.getClient() failed to verify: com.google.mlkit.vision.face.FaceDetector com.google.mlkit.vision.face.FaceDetection.getClient(): [0x10] can't resolve returned type 'Unresolved Reference: com.google.mlkit.vision.face.FaceDetector' or 'Unresolved Reference: com.google.mlkit.vision.face.internal.FaceDetectorImpl'
The iOS Simulator runs fine and I'm able to use MLKit tools seamlessly, so this leads me to believe I have configured the Android app incorrectly. Any ideas?

Related

Library linking issue after upgrading to React Native 0.70.3

We upgraded the mobile development project we are working on to React Native v0.70.3 from 0.66.4 and our build starting to give all sort of issue in our build server after that. Both iOS and Android builds are failing with following error messages.
Android:
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':react-native-camera-kit:verifyReleaseResources'.
A failure occurred while executing com.android.build.gradle.tasks.VerifyLibraryResourcesTask$Action
Android resource linking failed
ERROR:/Users/jenkinsoffshore/CICDBuilds/workspace/Mobile-Service-Android/node_modules/react-native-camera-kit/android/build/intermediates/merged_res/release/values/values.xml:2784: AAPT: error: resource android:attr/lStar not found.
iOS:
iOS build ends in success and we can upload to testflight as well. but getting the following error in email and the app crashes in devices.
ITMS-90863: Apple silicon Macs support issue - The app links with libraries that are not present on Mac:
#rpath/hermes.framework/hermes
After you’ve corrected the issues, you can upload a new binary to App Store Connect
We upgraded the MacOS version to Ventura and Xcode along with in the build machine. In developer machine both builds work fine.
Do we have to do anything specifically after upgrading to React Native 0.70.3?
Downgrade to atmost react-native 0.69
Rebuilding the server completely solve the issue. We had to setup everything from scratch. There must be a simple solution that that but project deadlines made us to go for a full re-inttall.

Native module cannot be null, but the app works fine

react-native run-ios successfully builds the project and the app is started at simulator, however, I got the error below, I tried to get more details in the Xcode log, I only got this:
[fatal][tid:com.facebook.react.ExceptionsManagerQueue] Unhandled JS Exception: Native module cannot be null.
How can I debug this error? is it just a warning? I can see fatal in Xcode log.
If I press on Dismiss in simulator, the error below gone and the app seems to work fine..
Any idea?

Unable to resolve module 'react-devtools-core' from 'node-modules/react-native/Libraries/Core/Devtools/setupDevtools.js'

Trying to debug react native iOS application but when I am running the app from xcode, getting this error.
'react-devtools-core' from 'node-modules/react-native/Libraries/Core/Devtools/setupDevtools.js'

Running React native application using expo application on android device

I have set up a react native project using create-reacte-native-app.
Problem
I am trying to run the application on my android device using expo app but when i scan the QR code using expo app, i get an error
could not load expo://192.168.8.103:19000. Network response timed out.
Error log displays this error message
Uncaught Error:Java.net.SocketTimedoutException: failed to connect to /192.168.8.103 (port 19000) from /192.168.8.105 (port 38682) after 10000ms
Question
How can i fix this error and run my react native app on android device using expo app?
Try to be on the same network (computer and phone)
and you can try to run it with exp start

React Native Fatal RCTBatchedBridge error on launch

When lauching the app it fails with the following fatal error:
TypeError: methods.forEach is not a function. (In 'methods.forEach', 'methods.forEach' is undefined)
This only happens in the iOS simulator. The app runs fine on a device.
The RN stack trace doesn't show much useful information:
Screenshot of error
Any suggestions would be hugely appreciated!