viro icon indicating copy to clipboard operation
viro copied to clipboard

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

Open acndur1a opened this issue 5 years ago • 23 comments

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.

acndur1a avatar Oct 29 '19 20:10 acndur1a

Did you follow all the integration instructions in th docs? Also bear in mind that officially ViroMedia is supported up to RN 0.59.9.

djpane avatar Nov 18 '19 13:11 djpane

Thanks for your answer @djpane I have the same issue I did the integration instructions but this error still occurs. Could you please put a video for these instructions?

SiavashBamshadnia avatar Jan 08 '20 14:01 SiavashBamshadnia

@dthian Can you help me please?

SiavashBamshadnia avatar Jan 16 '20 18:01 SiavashBamshadnia

@SiavashBamshadnia Did you manage to fix this error?

fahadhaq avatar Apr 05 '20 02:04 fahadhaq

Did you manage to fix this error

@fahadhaq No

SiavashBamshadnia avatar Apr 05 '20 08:04 SiavashBamshadnia

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

alishgiri avatar Apr 07 '20 06:04 alishgiri

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

What is setup-ide.sh?

phuocantd avatar May 14 '20 15:05 phuocantd

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

RoyceLeonD avatar May 14 '20 20:05 RoyceLeonD

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

Div8285 avatar May 20 '20 07:05 Div8285

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

tellypresence avatar Jun 04 '20 22:06 tellypresence

I have the same issue.

ajeets1978 avatar Sep 13 '20 08:09 ajeets1978

Me too. I hope someone will come up with a solution - I don´t have one :-(

blckwngd avatar Sep 14 '20 19:09 blckwngd

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?

hokaiyipFS avatar Sep 25 '20 20:09 hokaiyipFS

I am building for Android, so pod install won't do anything for me :(

blckwngd avatar Sep 27 '20 06:09 blckwngd

have you followed? https://docs.viromedia.com/docs/integrating-existing-projects-android#updating-settingsgradle

hokaiyipFS avatar Oct 06 '20 17:10 hokaiyipFS

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 : )

anto-pravin avatar Dec 23 '20 07:12 anto-pravin

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 : )

Not working.

  • What went wrong: Task 'installGvrDebug' not found in project ':app'. Some candidates are: 'installDebug'.

jahau avatar Jan 20 '21 13:01 jahau

you can run ./setup-ide.sh --all && react-native run-android --variant=gvrDebug

datptScuti avatar Jan 22 '21 06:01 datptScuti

$ ./setup-ide.sh --all && react-native run-android --variant=gvrDebug
==== Running Android Setup Script ===
Running with verbose logging
Editing MainApplication.java
sed: -e expression #1, char 0: no previous regular expression
sed: -e expression #1, char 0: no previous regular expression
Updating settings.gradle
Updating Project's build.gradle
Updating App's build.gradle
Updating AndroidManifest.xml
Copying over OVR's additional manifest
Updating gradle-wrapper.properties
Updating strings.xml
==== Running iOS Setup Script ===
running with verbose logging
/usr/bin/sed: can't read s/VIRO_PROJECT_NAME/ViroSample/g: No such file or directory
./node_modules/react-viro/bin/ios-setup.sh: line 32: pod: command not found
./node_modules/react-viro/bin/ios-setup.sh: line 35: ruby: command not found
./node_modules/react-viro/bin/ios-setup.sh: line 38: /usr/libexec/PlistBuddy: No such file or directory
./node_modules/react-viro/bin/ios-setup.sh: line 39: /usr/libexec/PlistBuddy: No such file or directory
/usr/bin/sed: can't read s/VIRO_PROJECT_NAME/ViroSample/g: No such file or director
  • What went wrong: Could not compile build file 'C:\temp\ViroSample\android\build.gradle'.

startup failed: build file 'C:\temp\ViroSample\android\build.gradle': 12: unexpected token: } @ line 12, column 1. } ^

1 error

jahau avatar Feb 02 '21 10:02 jahau

$ ./setup-ide.sh --all && react-native run-android --variant=gvrDebug
==== Running Android Setup Script ===
Running with verbose logging
Editing MainApplication.java
sed: -e expression #1, char 0: no previous regular expression
sed: -e expression #1, char 0: no previous regular expression
Updating settings.gradle
Updating Project's build.gradle
Updating App's build.gradle
Updating AndroidManifest.xml
Copying over OVR's additional manifest
Updating gradle-wrapper.properties
Updating strings.xml
==== Running iOS Setup Script ===
running with verbose logging
/usr/bin/sed: can't read s/VIRO_PROJECT_NAME/ViroSample/g: No such file or directory
./node_modules/react-viro/bin/ios-setup.sh: line 32: pod: command not found
./node_modules/react-viro/bin/ios-setup.sh: line 35: ruby: command not found
./node_modules/react-viro/bin/ios-setup.sh: line 38: /usr/libexec/PlistBuddy: No such file or directory
./node_modules/react-viro/bin/ios-setup.sh: line 39: /usr/libexec/PlistBuddy: No such file or directory
/usr/bin/sed: can't read s/VIRO_PROJECT_NAME/ViroSample/g: No such file or director
  • What went wrong: Could not compile build file 'C:\temp\ViroSample\android\build.gradle'.

startup failed: build file 'C:\temp\ViroSample\android\build.gradle': 12: unexpected token: } @ line 12, column 1. } ^

1 error

same as you... after run ./setup-ide.sh android

vlkpa avatar Feb 04 '21 11:02 vlkpa

I can not run the ./setup-ide.sh android.

alexks007 avatar May 14 '21 22:05 alexks007

same issue. this repo seems kinda dead to me ?

ovy9086 avatar Nov 05 '21 12:11 ovy9086

I have a solution here: https://github.com/viromedia/viro/issues/748#issuecomment-1933535988

iamalinski avatar Feb 08 '24 09:02 iamalinski