[Android] [Reanimated] Failed obtain instance of FabricUIManager
Description
Android build is failing with the above error
Steps to reproduce
- enable newArchEnabled=true in gradle.properties
- Run android app
Snack or a link to a repository
https://github.com/software-mansion/react-native-reanimated/issues/3292
Reanimated version
3.17.5
React Native version
0.79.2
Platforms
Android
JavaScript runtime
Hermes
Workflow
React Native
Architecture
Fabric (New Architecture)
Build type
Debug app & dev bundle
Device
Real device
Host machine
macOS
Device model
No response
Acknowledgements
Yes
Hey! 👋
The issue doesn't seem to contain a minimal reproduction.
Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?
Hi @jineshfrancs, have you tried to reinstalling dependencies (rm -rf node_modules && yarn cache clean && yarn install)? Is the bug present on your side in clean RN app with Reanimated?
Hi @jineshfrancs, have you tried to reinstalling dependencies (
rm -rf node_modules && yarn cache clean && yarn install)? Is the bug present on your side in clean RN app with Reanimated?
Hi @patrycjakalinska, i have tried all these, still no luck
And is the bug present on your side in clean RN app with Reanimated?
Yes @patrycjakalinska. Still there
Hey! 👋
The issue doesn't seem to contain a minimal reproduction.
Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?
I am also getting the same issue after upgrading react Native v0.77.2 with old Architecture to New Architecture.
Solution:
Make sure New Architecture is enabled in gradle.properties file.
newArchEnabled=true
hermesEnabled=true
Then go to android/MainApplication.kt file
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
Add below line inside onCreate() method:
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
load()
}
override fun onCreate() {
super.onCreate()
SoLoader.init(this, OpenSourceMergedSoMapping)
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
load()
}
}
@ravi1234saxena Thanks for posting your solution! 🙌 Since we haven't received any reproduction details from the author of the issue, I'll go ahead and close this one.
@ravi1234saxena we're experiencing the issue from the first message and I tried your fix. Unfortunately it did not help in our case. It felt like it delayed Android crash by a bit, but it still happens on app start. On our side we're continuing investigation.