facebook / react-native

A framework for building native applications using React
https://reactnative.dev
MIT License
118.05k stars 24.19k forks source link

Exception thrown while executing UI block: 'parentNode' is a required parameter #29889

Open suraneti opened 4 years ago

suraneti commented 4 years ago

Description

Error: Interpolation property 'useNativeDriver' is not supported by native animated module

This error occurs when I run on an emulator and set useNativeDriver to true on the Animated component.

My solution is set useNativeDriver to false on DEV mode.

useNativeDriver: __DEV__ ? false : true

React Native version:

System:
    OS: macOS 10.15.6
    CPU: (8) x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
    Memory: 1.24 GB / 16.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 14.4.0 - /usr/local/bin/node
    Yarn: 1.22.4 - /usr/local/bin/yarn
    npm: 6.14.8 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.9.3 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 13.6, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
    Android SDK:
      API Levels: 23, 24, 25, 26, 27, 28, 29
      Build Tools: 23.0.1, 26.0.1, 26.0.2, 27.0.3, 28.0.2, 28.0.3, 29.0.3
      System Images: android-25 | Google APIs ARM 64 v8a, android-28 | Google APIs Intel x86 Atom, android-28 | Google Play Intel x86 Atom_64
      Android NDK: 20.0.5594570
  IDEs:
    Android Studio: 3.5 AI-191.8026.42.35.5900203
    Xcode: 11.6/11E708 - /usr/bin/xcodebuild
  Languages:
    Java: 1.8.0_101 - /usr/bin/javac
    Python: 2.7.16 - /usr/bin/python
  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.13.1 => 16.13.1 
    react-native: 0.63.2 => 0.63.2 
  npmGlobalPackages:
    *react-native*: Not Found

Steps To Reproduce

Provide a detailed list of steps that reproduce the issue.

  1. Run code
  2. Test on emulator (If set useNativeDriver to true in Point 1 and Point 2 will error)

Expected Results

No error.

Snack, code example, screenshot, or link to a repository:

  const shake = new Animated.Value(0);

  // Point 1
  const animationShake = shake.interpolate({
    inputRange: [0, 0.3, 0.7, 1],
    outputRange: [0, -20, 20, 0],
    useNativeDriver: true, // If set useNativeDriver both value to true, an error will occur otherwise is fine.
  });

  // Point 2
  Animated.spring(shake, {
        toValue: 1,
        duration: 250,
        tension: 200,
        friction: 4,
        useNativeDriver: true, // If set useNativeDriver both value to true, an error will occur otherwise is fine.
      }).start(() => {
       // Do something
  });
Screen Shot 2563-09-08 at 15 58 11
stale[bot] commented 3 years ago

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

LudoLamerre commented 2 years ago

Same issue thank you for the solution 👍👍👍

github-actions[bot] commented 8 months ago

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

hamoghamdi commented 8 months ago

I am facing this issue with iOS17, changing useNativeDriver value made no difference i am not sure which library or component is causing this issue and i have yet to find a fix

hnsxxscyx commented 7 months ago

I am facing this issue with iOS17, changing useNativeDriver value made no difference i am not sure which library or component is causing this issue and i have yet to find a fix

@hamoghamdi Hello, I also meet this issue. Have you find any solution?

trungledangAxonActive commented 2 months ago

I'm also facing this issue. This happens on IOS 15 and IOS 17