Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ManuSense opened this issue Mar 15, 2024 · 5 comments

Comments

@ManuSense
Copy link

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"

Copy link

linear bot commented Mar 15, 2024

@thekevinbrown
Copy link

I'm seeing the same on iOS.

@nab138
Copy link

nab138 commented May 2, 2024

I'm also seeing the same on ios

@LimitedDani
Copy link

I'm seeing the same

@thekevinbrown
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants