viro
viro copied to clipboard
Invariant Violation: Tried to register two views with same name VRTQuad
Requirements:
Please go through this checklist before opening a new issue
- [ ] Review the documentation
- [ ] Search for existing issues in: viromedia/viro & ViroCommunity/viro
- [ ] Use the latest ViroReact release
Environment
Please provide the following information about your environment:
- Development OS: Mac, Windows, Linux
- Device OS & Version: What Android OS version (7.0, 8.0, etc.) or iOS version (11.0, 11.2) is your device running on?
- Version: ViroReact version and React Native version
- Device(s): What device(s) are you are seeing the issue on (i.e. iPhone X, Samsung Note 8, etc)
Description
Describe your issue in detail. Include screenshots if needed. If this is a regression, let us know.
Reproducible Demo
Let us know how to reproduce the issue. Include a code sample, screen capture, video recording. The more information you provide, the better we can support you.
And won't be resolver on package with react-native 0.65.1 , only can solve with viro 2.20.2 , above that cannot work
Hi Admin,
please fix this bug. for ViroSurface.tsx line :
var VRTSurface = requireNativeComponent( "VRTSurface", // @ts-ignore ViroSurface, {
previously VRTQuad
Hi Admin,
please fix this bug. for ViroSurface.tsx line :
var VRTSurface = requireNativeComponent( "VRTSurface", // @ts-ignore ViroSurface, {
previously VRTQuad
Had the same issue, this fixed it for me as well. Bumping.
Hi Admin,
please fix this bug. for ViroSurface.tsx line :
var VRTSurface = requireNativeComponent( "VRTSurface", // @ts-ignore ViroSurface, {
previously VRTQuad
bumping this, please fix for ViroSurface.js too, the same problem, should be:
var VRTSurface = (0, react_native_1.requireNativeComponent)("VRTSurface",
instead of VRTQuad
@robertjcolley or I can put up a simple pr since this is just an one-line change, if it helps!
Thank you!!
@Weixuanf If you can create a PR, that would be amazing!
Any fix to this issue ?
Seems we need to wait until the migration to typescript finish. I tried to create PR still not approve. Other workarround you can use NS-BOBBY-Patch version (javascript)
any fixes or any worksaround
Hi Admin,
please fix this bug. for ViroSurface.tsx line :
var VRTSurface = requireNativeComponent( "VRTSurface", // @ts-ignore ViroSurface, {
previously VRTQuad
It is working perfectly. I modified locally.
https://github.com/ViroCommunity/viro/issues/136#issuecomment-1126882461
For temporary, you can use yarn add @viro-community/react-viro@npm:react-viro-sw
This is still an issue using Expo dev client. Although the fix was merged to main branch it was not released yet.
This still seems to be an issue using the Expo dev client. Any suggestions? Here's my app.tsx code:
import { StyleSheet } from "react-native";
import {
ViroText,
ViroARSceneNavigator,
ViroScene,
} from "@viro-community/react-viro";
const HelloWorldSceneAR = () => {
return (
<ViroScene>
<ViroText
text={"Hello World!"}
position={[0, 0, -1]}
style={styles.helloWorldTextStyle}
/>
</ViroScene>
);
};
export default function App() {
return (
<ViroARSceneNavigator
autofocus={true}
initialScene={{
scene: HelloWorldSceneAR,
}}
style={styles.f1}
/>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: "#fff",
alignItems: "center",
justifyContent: "center",
},
f1: { flex: 1 },
helloWorldTextStyle: {
fontFamily: "Arial",
fontSize: 30,
color: "#ffffff",
textAlignVertical: "center",
textAlign: "center",
},
});
Would using Vanilla JS solve this?
We will be making some updates to the expo client soon. Just added it to the internal roadmap. Once we get through our next major updates we will come back to this if this issue still exists.
Is there a timeline for the release date of the update?
Is there a timeline for the release date of the update?
We're still organising things internally but hoping to clarify things by the end of the month. Please join the discord for announcements.
Alright thank you for the help
4e1b34489b2ecb657fc807b69fe3ea56fb8d1fcf Should have fixed this. Please try v2.23.1!