ReactVision / viro

ViroReact: The AR and VR library for React Native 📳💙💛🤍💚
MIT License
1.31k stars 149 forks source link

Invariant Violation: requireNativeComponent: "VRTText" was not found in the UIManager #124

Open pranavcd opened 2 years ago

pranavcd commented 2 years ago

I created a simple Helloworld ar app with Viro. I am using a single scene with a text component in it.

<ViroARScene onTrackingUpdated={onInitialized}>
      <ViroText
        text={text}
        scale={[0.5, 0.5, 0.5]}
        position={[0, 0, -1]}
        style={styles.helloWorldTextStyle}
      />
    </ViroARScene>

I get the error as soon as I load the app.

I am using the latest version of Viro React 2.23.0 and React native version 0.64.3 Can someone help me this?

dsryan8197 commented 2 years ago

try removing the == ViroConstants.TRACKING_NORMAL from from HelloWorldSceneAR.js. Not a perfect solution but it enabled me to spin up the scene

before _onInitialized(state, reason) { if (state == ViroConstants.TRACKING_NORMAL) { this.setState({ text : "Hello World!" }); } else if (state == ViroConstants.TRACKING_NONE) { } } }

after

_onInitialized(state, reason) { if (state) { this.setState({ text : "Hello World!" }); } else if (state == ViroConstants.TRACKING_NONE) { } }

cgri1 commented 10 months ago

try removing the == ViroConstants.TRACKING_NORMAL from from HelloWorldSceneAR.js. Not a perfect solution but it enabled me to spin up the scene

I tried this but I did not get any results. Is there any solution in this situation?