question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

React Native Debugger - ERROR - TurboModuleRegistry.getEnforcing(...): 'NativeReanimated'

See original GitHub issue

Description

Running a basic example in an Expo client while running React Native Debugger on port 19000. Getting the following error:

Invariant Violation ExceptionsManager.js:179 TurboModuleRegistry.getEnforcing(…): ‘NativeReanimated’ could not be found. Verify that a module by this name is registered in the native binary.

Screenshots

image

Steps To Reproduce

Expected behavior

No errors

Actual behavior

Error (see above)

Snack or minimal code example

import Animated, {
  useSharedValue,
  withTiming,
  useAnimatedStyle,
  Easing,
} from "react-native-reanimated";
import { View, Button } from "react-native";
import React from "react";

export default function AnimatedStyleUpdateExample(props) {
  const randomWidth = useSharedValue(10);

  const config = {
    duration: 500,
    easing: Easing.bezier(0.5, 0.01, 0, 1),
  };

  const style = useAnimatedStyle(() => {
    return {
      width: withTiming(randomWidth.value, config),
    };
  });

  return (
    <View>
      <Animated.View
        style={[
          { width: 100, height: 80, backgroundColor: "black", margin: 30 },
          style,
        ]}
      />
      <Button
        title="toggle"
        onPress={() => {
          randomWidth.value = Math.random() * 350;
        }}
      />
    </View>
  );
}

Package versions

{
  "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"
  },
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo web",
    "eject": "expo eject"
  },
  "private": true
}

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:9
  • Comments:18 (3 by maintainers)

github_iconTop GitHub Comments

39reactions
devshortscommented, May 17, 2021

What does “use flipper to debug” even mean? Flipper doesn’t have a way to connect to a debug port to set breakpoints. You still can’t do performance profiling. If “debug” just means see “console.log” statements thats a poor statement of debugging, I can see that in the terminal now. What does flipper even give you?

8reactions
jakub-gonetcommented, Feb 1, 2021

Have you tried using Flipper for debugging? Remote debugging in Chrome works by running JS code in Chrome’s V8 and connecting to the Bridge. We use Turbomodules (which don’t use Bridge at all) so Chrome can’t connect with the native side – this error is expected but could be described better. AFAIK Flipper should work with Android without problems on any recent RN version and iOS should work after RN 0.64.

EDIT: Seems like Flipper doesn’t work with Expo yet. If you need a debugger functionality you probably should wait with the Reanimated upgrade.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Invariant Violation: TurboModuleRegistry.getEnforcing ...
I got this TurboModuleRegistry.getEnforcing(...): 'NativeReanimated' error and I found the solution: Step 1 - Download react native project ...
Read more >
'DevSettings' could not be found-React Native
Coding example for the question Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'DevSettings' could not be found-React Native.
Read more >
'imageloader' could not be found. - You.com | The AI Search ...
When testing on simulator or device with a debug configuration in Xcode, this was not a problem. But since we archive for the...
Read more >
Reanimated - Expo Documentation
Reanimated uses React Native APIs that are incompatible with "Remote JS Debugging" for JavaScriptCore. In order to use a debugger with your app...
Read more >
React Native Debugger - ERROR - TurboModuleRegistry ...
React Native Debugger - ERROR - TurboModuleRegistry.getEnforcing(...): 'NativeReanimated' 暂时解决方案 · 问题重述.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found