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

Expo bare + viroReact getting this error on ios -> requireNativeComponent: "VRTText" was not found in the UIManager. #52

Closed
3 tasks done
byyoungjin opened this issue Sep 16, 2021 · 22 comments

Comments

@byyoungjin
Copy link

byyoungjin commented Sep 16, 2021

Requirements:

Please go through this checklist before opening a new issue

Environment

Please provide the following information about your environment:

  1. Development OS: Mac
  2. Device OS & Version: ios 14.7.1
  3. Version:
 "dependencies": {
    "@viro-community/react-viro": "^2.21.1",
    "expo": "~42.0.1",
    "expo-splash-screen": "~0.11.2",
    "expo-status-bar": "~1.0.4",
    "expo-updates": "~0.8.1",
    "react": "16.13.1",
    "react-dom": "16.13.1",
    "react-native": "~0.63.4",
    "react-native-gesture-handler": "~1.10.2",
    "react-native-reanimated": "~2.2.0",
    "react-native-screens": "~3.4.0",
    "react-native-unimodules": "~0.14.5",
    "react-native-web": "~0.13.12"
  },
  1. Device(s): iphone 8

Description

I just trying to initialize my app with Expo bare work flow + @viro-community/react-viro

But keep getting these error

Reproducible Demo

you can reproduce this by following this

  1. npm install --global expo-cli ( my expo-cli version is 4.11.0)

  2. expo init -> select bare work flow

  3. npm install

  4. npm install --save @viro-community/react-viro

  5. go ios/PodFile and add these lines as instructed on https://github.com/ViroCommunity/viro/blob/main/readmes/INSTALL_IOS.md
    pod 'ViroReact', :path => '../node_modules/@viro-community/react-viro/ios/'
    pod 'ViroKit_static_lib', :path => '../node_modules/@viro-community/react-viro/ios/dist/ViroRenderer/static_lib'

  6. npx pod-install

  7. put some viro react code on App.js

  8. npx react-native run ios ( just to check the linking work well)
    -> have error
    Invariant Violation: requireNativeComponent: "VRTText" was not found in the UIManager.

  9. run xcode, and excute with real device
    ->same error with 8

@creimers
Copy link

I'm experiencing the exact same error as @byyoungjin, but with an app that was bootstrapped with react-native-cli. It would appear that something's not quite right with the iOS installation. I'm on react native 0.65.1.

@Hunnainwali
Copy link

Facing same error on bare work flow. Android is working alright but iOS is showing the UIManager error.

@danieldulcettiBN
Copy link

I have this problem too, but in my case the UIManager error reports 'VRTARScene' as not found.
Tried in an existing project and in a new one, both created from react-native-cli.

The problem is only for iOS, Android is working well; I have followed all setup points.

React native: 0.65.1
Viro: 2.21.1 (tried also with 2.21.0)
XCode: 12.5 (tried also on XCode 13)

@Hunnainwali
Copy link

Hunnainwali commented Sep 22, 2021

I've got it working.

  1. uninstall viro using $npm uninstall @viro-community/react-viro
  2. install again using $npm install @viro-community/react-viro@2.20.2 --save (I'm using react-native version 0.64.2)
  3. run $npx react-native link
  4. run $cd ios
  5. run $pod deintegrate
  6. run $pod clean
  7. run $pod setup
  8. run $pod install

For simulator you'll get error related to ARWorldTrackingConfiguration which means project is configured correctly with Viro and you can test on real device.

Please let me know if it works or not.

@creimers
Copy link

Bildschirmfoto 2021-09-23 um 12 19 30

@mariansam
Copy link

Thanks @Hunnainwali, I hope this will help us. But now we need to find the reason things got broken in v2.21.0.

Cc @doranteseduardo

@doranteseduardo
Copy link
Member

Question, is you use the stardard lib instead the static_lib, does it work well or it seems to be broken too?

@byyoungjin
Copy link
Author

I've got it working.

  1. uninstall viro using $npm uninstall @viro-community/react-viro
  2. install again using $npm install @viro-community/react-viro@2.20.2 --save (I'm using react-native version 0.64.2)
  3. run $npx react-native link
  4. run $cd ios
  5. run $pod deintegrate
  6. run $pod clean
  7. run $pod setup
  8. run $pod install

For simulator you'll get error related to ARWorldTrackingConfiguration which means project is configured correctly with Viro and you can test on real device.

Please let me know if it works or not.

Yes it is working! Thanks. And also work on version 2.21.0. This problem only happens on 2.21.1 as #53 says

@byyoungjin
Copy link
Author

byyoungjin commented Sep 28, 2021

Question, is you use the stardard lib instead the static_lib, does it work well or it seems to be broken too?

I think I'm using static_lib following this https://github.com/ViroCommunity/viro/blob/main/readmes/INSTALL_IOS.md
I haven't used standard lib. I Think.

@Cchumi
Copy link

Cchumi commented Oct 9, 2021

Hey all a quick question. I cannot use the 2.21.1 because of this VRTEXT error.

The fact is that this release fix virovideo which is needed for my application. Is this planned to fix the problem on the 2.21.1 release ?

If not for now how can i fix by myself ?

thanks

@doranteseduardo
Copy link
Member

Working on it

@Cchumi
Copy link

Cchumi commented Oct 10, 2021

Working on it

Thanks guy

@doranteseduardo
Copy link
Member

doranteseduardo commented Oct 10, 2021

I've been unable to build the static_lib, however the standard lib works well for me.
Can anyone confirm that changing the line:
pod 'ViroKit_static_lib', :path => '../node_modules/@viro-community/react-viro/ios/dist/ViroRenderer/static_lib'
to
pod 'ViroKit', :path => '../node_modules/@viro-community/react-viro/ios/dist/ViroRenderer/'
works?

@Cchumi
Copy link

Cchumi commented Oct 10, 2021

I've been unable to build the static_lib, however the standard lib works well for me.

Can anyone confirm that changing the line:

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

to

pod 'ViroKit', :path => '../node_modules/@viro-community/react-viro/ios/dist/ViroRenderer/'

works?

I don't know this I try it tomorrow and post back the result.
Thanks 👌

@Cchumi
Copy link

Cchumi commented Oct 11, 2021

I've been unable to build the static_lib, however the standard lib works well for me. Can anyone confirm that changing the line: pod 'ViroKit_static_lib', :path => '../node_modules/@viro-community/react-viro/ios/dist/ViroRenderer/static_lib' to pod 'ViroKit', :path => '../node_modules/@viro-community/react-viro/ios/dist/ViroRenderer/' works?

I try your option and it is not working.
First i try in my app but getting also the VRTEXT error.

So i try this in the starter kit and it's not working also, always this UIManager error.

What else to try to fix this ?

this my pod file
`require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, '11.0'

target 'myviroapp' do
config = use_native_modules!

use_react_native!(
:path => config[:reactNativePath],
# to enable hermes on iOS, change false to true and then install pods
:hermes_enabled => false
)

pod 'ViroReact', :path => '../node_modules/@viro-community/react-viro/ios/'
pod 'ViroKit', :path => '../node_modules/@viro-community/react-viro/ios/dist/ViroRenderer/'

target 'myviroappTests' do
inherit! :complete

end

post_install do |installer|
react_native_post_install(installer)
end
end
`
Thanks

@Piquart
Copy link

Piquart commented Oct 24, 2021

Same issue on my side, I have tried using both static and standard lib but I'm receiving the same issue: "VRTVideoSurface was not found in the UIManager", please help me :(

I can confirm that, as suggested by #56, using the library of version 2.21.0 (libViroReact.a) it works but the ViroVideo is not working ("setOnBufferEndViro" error).

Is there a working workaround to solve this problem?

Thanks in advance,

@Cchumi
Copy link

Cchumi commented Oct 24, 2021

Hi I got virovideo working in 2.22.1 but I have need to compile libviroreact by myself.
As explanation if you look at node modules viro packages you will notice in the dist folder that every libviroreact.a size is 132ko that is not correct so I have compiled on my side and place them in this folder.
Result virovideo is working for me.

I create an issue for this case.

And doesn't know if it is useful.

Same issue on my side, I have tried using both static and standard lib but I'm receiving the same issue: "VRTVideoSurface was not found in the UIManager", please help me :(

I can confirm that, as suggested by #56, using the library of version 2.21.0 (libViroReact.a) it works but the ViroVideo is not working ("setOnBufferEndViro" error).

Is there a working workaround to solve this problem?

Thanks in advance,

@Piquart
Copy link

Piquart commented Oct 24, 2021

Hi thank you for your quick reply!

Could you suggest me all the required steps to compile libviroreact on my own?

Thank you again,

@Cchumi
Copy link

Cchumi commented Oct 24, 2021

I can send a link to download the dist folder tomorrow if you want

@Piquart
Copy link

Piquart commented Oct 24, 2021

Thank you very much for your support, fortunately I was able to compile the libviroreact, now it seems to be working; using ViroVideo I have noticed a strange thing, when I dismiss the scene the sound does not stop, I partially solved the issue putting a reference and stopping the audio (this.refs[VIDEO_REF].paused = "true") but, closing and opening the scene many times, there are memory leaks and the app crashes, it happens to you? do you fixed this issue?

Thank you again @Cchumi !!!

Regards

@HugoGaechter
Copy link

Hello, I have the same issue as you, and changing the line:

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

to

pod 'ViroKit', :path => '../node_modules/@viro-community/react-viro/ios/dist/ViroRenderer/'

didn't work for me either.

I need virovideo therefore I need the 2.21.1 version

@Piquart @Cchumi
Could you explain to me how to compile the libviroreact library on my own, or send me the dist folder ?

Thank you very much

@doranteseduardo
Copy link
Member

Closed in favour of #56

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

9 participants