ReactVision / viro

ViroReact: The AR and VR library for React Native 📳💙💛🤍💚

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TypeError: Cannot read property 'setJSMaterials' of null on Android using Expo

ManuSense opened this issue · comments

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

  1. The error effectively means, "Viro cannot load its native code".
  2. 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.
  3. This means you can't use Expo Go.
  4. Should fix it for you!