Closed Eli-Nathan closed 4 years ago
Completely removing the android device from my AVD manager and adding it again fixed the issue suggesting that it was something to do with my caching.
Closing now
Same problem on iOS, removing android simulators from AVD didn't help
IIRC this should be resolved on newest alpha, have you tried updating?
Yea, I've actually just installed alpha-8 following instructions and got this. I've only configured for iOS since that's the only platform I'll be building for - so no config other than Babel plugin
Getting the same when trying to enable remote debugger. IOS, alpha-8, RN 62.0
am also getting this with alpha-8 when trying to run on iOS
I too am getting this issue on IOS
Same here with alpha8 when trying to start the debugger
I'm in the same boat.
All the people who report it could you please tell us the environment you're using?
XCode 12.1 React 16.13.1 React Native 0.63.3 React Native Reanimated 2.0.0-alpha.8 Node 12.18.2 npm 6.14.5 Pod RNReanimated 2.0.0-alpha.8
I can see ReanimatedModule in the NativeModules list, but not NativeReanimated (not sure if it's supposed to show up there at all). My Podfile.lock lists RNReanimated 2.0.0-alpha.8.
I also didn't follow the other version instructions dealing with TurboModules, and only have looked at the instructions for installing alpha 8. Perhaps there's something subtle I missed?
Did you upgrade or it's clean install of Reanimated?
This was an upgrade from 1.4.0.
I'm not familiar with the way TurboModules are supposed to get registered or appear to the RN runtime, so pardon my ignorance here, but I started stepping through RN's TurboModuleRegistry
implementation and see that the turboModuleProxy
constant (which is set by global.__turboModuleProxy
is undefined.
Again, I haven't done anything in my app to turn them on explicitly, so I'm not sure if this is undefined
from something I did (or didn't do), or if it's supposed to be undefined
if no TurboModules have been properly registered in the app.
Thanks for any insights!
Did you enable TurboModules on Android as it explained in the installation guide?
Sorry, to be clear, my problem is specifically iOS. I haven't attempted to build for Android yet. I realize this ticket was created originally in the Android context, but the rest of the comments were talking about iOS, so I joined in. Tomorrow I can try to get Android running and get back to you.
I am having the same issue with iOS. Andriod is working fine.
More developments: I downloaded the playground application, fired it up, everything worked well. I turned on debugging and now I'm seeing the error.
So, I turned debugging off on my app and we're back in business. This occurs in both iOS and Android for me. So it appears to be something with having the debugger enabled that is causing the issue.
Digging in further, it looks like when we are externally debugging global.__reanimatedModuleProxy
is undefined so then we go to ask for the module from the TurboModuleRegistry.getEnforcing()
method, which bombs out in both scenarios. When not attached to the debugger global.__reanimatedModuleProxy
is set.
I'm using the latest production version of Chrome - 86.0.4240.193
I'm looking at the UIResponder+Reanimated.mm
code and started stepping through. What's interesting to me is that when I am not attached to the debugger, the code runs. When I switch to attaching to the debugger, it doesn't run. Then when I switch back, it runs again.
I've been digging into RN's RCTCxxBridge
it look as if the code which would register the __reanimatedModuleProxy
variable is wiped out if connected to the debugger.
Line 336 of the bridge code checks to see if the executorClass
is set, and if not, will call the code in UIResponder+Reanimated.mm
. Otherwise, it hits the else
branch which wipes out the executorFactory
and constructs a new one generated with respect to the executorClass
, thus removing the code which is executed during runtime initialization to register the __reanimatedModuleProxy
global. This executorClass
is only set if in a debug mode and is of type RCTWebSocketExecutor
.
Does that seem like a reasonable diagnosis? Thanks for the help!
XCode 12.1 React 16.13.1 React Native 0.63.2 React Native Reanimated 2.0.0-alpha.8 Node 12.14.1 npm 6.14.7 Pod RNReanimated 2.0.0-alpha.8
After upgrading, the issue persists when trying to downgrade to reanimated 1.13.1
@kotavy , did you run the bundler with --reset-cache
after you downgraded? I had to so that in both an upgrade and downgrade scenarios.
Thanks for the tip. I do have 1.13.1 working again after adding that to my all-in-one reset command:
watchman watch-del-all && rm -rf node_modules/ && yarn cache clean && yarn install && yarn start --reset-cache
Followed by running the sim again:
yarn react-native run-ios --simulator 'iPad Air 2'
I'll test upgrading in a similar way next.
When loading with 2.0.0-alpha.8 I'm still running into ExceptionsManager.js:179 Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'NativeReanimated' could not be found. Verify that a module by this name is registered in the native binary.
That's the issue I'm running into as well. In my comments above, I detailed what I think is the reason, which is that the module registration mechanism the library is using in alpha.8 has a flaw in it. That flaw being, it doesn't work when the debugger is connected. I am unfamiliar with react-native's underlying native code registration mechanisms, especially with the new JSI system that Reanimated2 uses, but I stepped through the code yesterday and that was my conclusion. I'm just waiting on comments from the maintainers on if that's the case and if there is anything that can be done to patch it before a new version is release.
In the meantime, I have resorted to turning my debugging off and have resorted to print statements. Not optimal, and not a long term strategy, but it is allowing me to proceed.
It seems like a solid lead, thank you for investigating. That's the issue that lead me here in the beginning. I'm trying alpha.6.1 now but if I'm stuck there I'll have to wait it out.
Edit: Using 6.1 and following the turbo install instructions is working for me.
Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'NativeReanimated' could not be found. Verify that a module by this name is registered in the native binary., js engine: hermes
This says that TurboModuleRegistry cannot find our turbo module. This can be coming from the wrong configuration of Reanimated or using a debugger. Debugging RN works by running JS in the browser (v8 engine) and making remote calls via bridge to the native side. Turbomodules work by sharing JS engine context on the native side, so when you run JS in the other engine it loses that context. Note that this is a limitation coming from RN and not Reanimated. This comment may give some more insight into that.
If disabling debugger fixes your problem then it works like intended. If not, please create a repro repository to allow us to investigate this issue.
Thanks @jakub-gonet! Do you think that there would be some value in allowing the debugger to be enabled, but if so, returning a mock of reanimated2? For those of us using reanimated2 is specific parts of our apps, doing do could enable us to debug non-reanimated dependent code.
Using alpha 8 allows us to not enable TurboModules at all, which gives us the debugger option in the developer menu again. So I think it would be possible to achieve.
I would rather suggest to just disable the code which uses Reanimated instead
Have the same issue with: Xcode: 12.0.1 RN: 0.63.3 react-native-reanimated: 2.0.0-alpha.8
I don't know why this issue is closed!
I just had the same issue. Also wondering why this issue is closed.
Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'NativeReanimated' could not be found. Verify that a module by this name is registered in the native binary.
"react": "~16.13.1",
"react-dom": "~16.13.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-39.0.0.tar.gz",
"react-native-gesture-handler": "~1.7.0",
"react-native-keyboard-aware-scroll-view": "^0.9.1",
"react-native-reanimated": "^2.0.0-alpha.9.2",
I just had the same issue
Please stick to this version "react-native-reanimated": "2.0.0-alpha.6",
. I had the same issue, so make sure you have 2.0.0-alpha.6
and implemented the following instructions https://docs.swmansion.com/react-native-reanimated/docs/2.0.0-alpha.7/installation/#ios
P.S.: Notice #import <RNReanimated/REATurboModuleProvider.h>
, REATurboModuleProvider is renamed from RETurboModuleProvider (this module is used somewhere in the code it needs rename as well) and it seems that this file is not available in the newer version of reanimated.
I get this when I Shake Device -> Debug
the app.
I do have the same problem. I had the "react-native-reanimated": "^2.0.0-alpha.9.2" version. I did reinstalled the version "react-native-reanimated": "^2.0.0-alpha.6". Flush the node_modules and the package-lock.json. Rebuild the app. And I still get the same error.
Same here. The issue arise when I'm in debug mode with expo. And if the app is in debug mode, the only way to revert it is to reinstall the expo app because the menu to disable the debug mode is not available when there is an error.
still happening, 2.0.0-rc.1, xcode 12.3
@yleclanche you are right, if anyone got this problem, try to re install app and do not turn debug on :))
I'm confused about the status of debugging with react-native-reanimated. In the alpha versions, we couldn't debug because turbo modules were enabled. Now in the release candidates the debug menu is enabled, but it kills react native as described above. Should the debug menu still be disabled? I would really like to use chrome debugging for why-did-you-render, but I'm unable to because of the reanimated integration.
This is blocking me from moving to react native 0.64.0 as Hermes is getting first-class treatment
I'm having this problem. It's unfortunate.
2.0.0-rc.2, xcode 12.3, RN-0.63.4
Same issue here:
TurboModuleRegistry.getEnforcing(...): 'NativeReanimated' could not be found. Verify that a module by this name is registered in the native binary.
xcode: 12.1 DevTools 4.10.1-3a8c04e3b2
"dependencies": { "@react-native-async-storage/async-storage": "^1.13.3", "expo": "~40.0.0", "expo-status-bar": "~1.0.3", "react": "16.13.1", "react-dom": "16.13.1", "react-native": "https://github.com/expo/react-native/archive/sdk-40.0.1.tar.gz", "react-native-reanimated": "2.0.0-rc.0", "react-native-web": "~0.13.12" }, "devDependencies": { "@babel/core": "~7.9.0", "babel-preset-expo": "8.3.0" },
Check Hermes engine is enabled and add some codes for RNA v2. https://docs.swmansion.com/react-native-reanimated/docs/installation/
Same problem here when using debugging.
TurboModuleRegistry.getEnforcing(...): 'NativeReanimated' could not be found. Verify that a module by this name is registered in the native binary.
"react": "16.13.1", "react-native": "0.63.3", "react-native-reanimated": "^2.0.0-alpha.9.2", Xcode 12.2
Hermes is enabled. Turbo modules was set as described in the documentation.
I hope this is helpful and I'm not stating the obvious to everyone here:
The current (rc.2
) docs specify that RN's remote debugging will not work alongside JSI.
For people looking to keep using Reanimated V2 and continue logging to a console, the current solution is to use Flipper to connect to the device instead of enabling the in-browser remote debugger. It's already part of react-native
on the device, so all you're missing is to run the desktop application to receive the app's logs:
@L-A I am getting this error even though I didn't enable the debug mode. I am using "react-native-reanimated": "2.0.0-rc.3"
Can you please help me on this?
BTW, It's working fine in IOS. issue with android only.
I have this error on my m1 macbook pro...
Same in debug mode only..
i had the same error.
Solution: uninstalled current version for: @react-navigation/drawer @react-navigation/native @react-navigation/stack
then installed: "@react-navigation/drawer": "^5.12.3", "@react-navigation/native": "^5.9.2", "@react-navigation/stack": "^5.14.2",
this fixed the error
Description
Using this package along with React Native Reanimated Bottom Sheet, I get this error on Android. (ios works great!)
Dismissing the error on my android emulator results in a blank white screen.
Screenshots
Steps To Reproduce
Expected behavior
App is usable
Actual behavior
App fails with the above error
Package versions