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

Environment

  1. Development OS: Windows 10
  2. Device OS & Version: What Android OS version 7.1.2
  3. Version: ViroReact version 2.17.0 and 0.59.10 React Native version
  4. Device(s): LG K9

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

I have followed installation instructions for Viroreact AR tutorial direct from docs.

I have also updated the AndroidManifest.xml as it was recommended in related issues.

Error message still appears after npm start.

About this issue

Most upvoted comments

You should run the setup-ide.sh file present on the root of your project, ./setup-ide.sh --android or ./setup-ide.sh --ios or ./setup-ide.sh --all

Does anyone manage to run react-viro to work on a standalone app for ViroReact + React Native 0.62. I have used patches from https://gist.github.com/akeemphilbert/8323a7b71e682469b922920a624b35a8 . After using these patches I have the same issue as https://github.com/viromedia/viro/issues/634 . without using these patches I have the same issue as https://github.com/viromedia/viro/issues/769
Or can you please suggest a way to run on any other version of react

I just fixed this error by following these steps

  • Go to: node_modules/metro-config/src/defaults/backlist.js and replace sharedBlacklist

with this:

var sharedBlacklist = [
  /node_modules[\/\\]react[\/\\]dist[\/\\].*/,
  /website\/node_modules\/.*/,
  /heapCapture\/bundle\.js/,
  /.*\/__tests__\/.*/
];
  • Open a terminal and run:

react-native start

  • Wait for the dependency graph to load,
  • Open one more terminal and run:

react-native run-android --variant=gvrDebug

Note: We have to specify the variant while running

Worked for me : )

Same problem on android.

Followed the setup procedure; installed packages and ran commands in terminal, including (but not limited to) the following on host workstation (PC):

$ npm install -g react-viro-cli
$ react-viro init ViroSample --verbose

Note: ran setup-ide.sh (suggested in several places as solution to this issue) which does not help

~/ViroSample$ ./setup-ide.sh --android
~/ViroSample$ adb reverse tcp:8081 tcp:8081
~/ViroSample$ npm start

Launching the app on tethered android device, the host connection and initial AR/VR menu display properly…

…but then halted with the error described earlier in this ticket when selecting “AR” button

P.S. our application is AR only, VR of no use to us

have you tried pod install?

add the following lines in your pod file

pod 'ViroReact', :path => '../node_modules/react-viro/ios/'
pod 'ViroKit_static_lib', :path => '../node_modules/react-viro/ios/dist/ViroRenderer/static_lib'

then run pod install, then the app again?

@phuocantd It is the script to update your dev environment, in order to create native ios/ android apps.