viro
viro copied to clipboard
TypeError: Cannot read property 'setJSMaterials' of null on Android using Expo
I am using expo and I just followed the installation guide with expo: https://viro-community.readme.io/docs/integrating-with-expo. Android build went fine but at runtime i got this error:
TypeError: Cannot read property 'setJSMaterials' of null, js engine: hermes
C:\...\Material\ViroMaterials.js
etc...
Any idea how to solve it?
Other info:
"@viro-community/react-viro": "^2.41.1"
"expo": "~50.0.4"
"react": "18.2.0"
"react-native": "0.73.2"
I'm seeing the same on iOS.
I'm also seeing the same on ios
I'm seeing the same
I fixed this by following the instructions here: https://viro-community.readme.io/docs/integrating-with-expo
Summation of Findings
- The error effectively means, "Viro cannot load its native code".
- To get it to load its native code, you need to link / build it in, which you do with the
expo prebuild
command, then running it that way. - This means you can't use Expo Go.
- Should fix it for you!