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.

3.0.0-rc.2 Android - TypeError: Cannot read property 'stateNode' of undefined

See original GitHub issue

Description

I’m attempting to use Fabric with 3.0.0-rc.2. iOS works fine however on Android I get the following attempting to render an Animated.View.

 ERROR  TypeError: Cannot read property 'stateNode' of undefined

This error is located at:
    in AnimatedComponent(View) (at createAnimatedComponent.tsx:533)

Steps to reproduce

Render an <Animated.View/>

Snack or a link to a repository

https://github.com/kyle-ssg/reanimated-reproduction

Reanimated version

3.0.0-rc.2

React Native version

0.69.5 (I can confirm this also happens on RN 0.70.rc-4)

Platforms

Android

JavaScript runtime

JSC

Workflow

React Native (without Expo)

Architecture

Fabric (New Architecture)

Build type

Debug mode

Device

Android emulator

Device model

No response

Acknowledgements

Yes

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:6
  • Comments:19 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
kyle-ssgcommented, Sep 21, 2022

Hmm, I was but I could replicate this by rendering a plain reanimated view in an empty app too. See https://github.com/kyle-ssg/reanimated-reproduction/blob/main/mobile/app/App.tsx#L5

1reaction
kyle-ssgcommented, Nov 20, 2022

Since yesterday I got my setup working (iOS and android) with quite a few dependencies, including @gorhom’s bottom sheet, though from this I learnt I won’t switch to the new architecture for a while, seems too risky and some really important modules aren’t ready.

A few things:

  • If you’re coming from a project that has gone through many version upgrades, https://github.com/software-mansion/react-native-reanimated/tree/main/FabricExample is an excellent example to look at to compare with your own, in particular the AppDelegate.mm and build.gradle’s / MainApplication / MainActivity
  • There are lots of red herring errors due to cache when opting in and out, removing iOS/Android build folders and clearing all the caches will save you from troubleshooting.

Here’s a list of dependencies that currently work for me

     react: 18.1.0 => 18.1.0 
    react-native: 0.70.6 => 0.70.6 

        "@gorhom/bottom-sheet": "4.4.5",
 "react-native-mmkv-storage": "^0.7.6",
        "react-native-gesture-handler": "2.8.0",
        "react-native-reanimated": "3.0.0-rc.3",
         "react-native-safe-area-context": "^4.4.1",
         "react-native-svg": "^13.3.0",
         "react-native-date-picker": "^4.2.6",

A quick note on the above. In order to work, @react-native-community/datetimepicker requires this in react-native-config.js

    '@react-native-community/datetimepicker': {
      platforms: {
        android: {
          androidMkPath: null,
          cmakeListsPath: null,
          componentDescriptors: null,
          libraryName: null,
        },
      },
    },

These don’t work

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot read property 'status' of undefined build:android
so when u rite error.status it will show type error cannot access status on undefined. Share.
Read more >
v1 - Go Packages
When a project reaches major version v1 it is considered stable. Learn more. Repository. git.kolaente.de/vikunja/api. Links. Report a ...
Read more >
Open Source Used In Intersight Mobile App 1.0.172 - Cisco
1.80 unicode-canonical-property-names-ecmascript 1.0.4 ... everyone understands that there is no warranty for this free software. If the.
Read more >
Falcon Sandbox v3.30 © Hybrid Analysis
45.55.222.20:80 (salesstaff.com), GET, salesstaff.com/wp-content/plugins,_jetpack,_modules,_wpgroho.js,qver==4.4.2+themes,_sage,_dist,_scripts,_modernizr- ...
Read more >
Source code of DERO Merchant - documentation/docs.html at ...
Redoc=t(e.null,e.esprima)}(this,(function(e,t){return function(e){var t={} ... T(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on ...
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