I upgraded to React Native v0.40 and an app that was working perfectly fine started to throw always that error.
Any clues?
This is the only file I found https://github.com/facebook/react-native/blob/master/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactShadowNode.java after much research.
I had the same problem.
It turns out that I had an Icon component in a Text Component. So I took the Icon out of it.
You may have similar incompatible components inside each other.
If you're using react-native-svg, make sure that you wrap any SVG components, like <Circle .../> inside of <Svg> ... </Svg> tags.
Otherwise, you get this error message.
Try this It worked for me. Go to your react native project folder and run the below commands.
rm -r node_modules
npm install