ReactVision / viro

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

Invariant Violation: Tried to register two views with same name VRTQuad #136

Closed tjikaljedy closed 8 months ago

tjikaljedy commented 2 years ago

Requirements:

Please go through this checklist before opening a new issue

Environment

Please provide the following information about your environment:

  1. Development OS: Mac, Windows, Linux
  2. Device OS & Version: What Android OS version (7.0, 8.0, etc.) or iOS version (11.0, 11.2) is your device running on?
  3. Version: ViroReact version and React Native version
  4. 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.

tjikaljedy commented 2 years ago

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

tjikaljedy commented 2 years ago

Hi Admin,

please fix this bug. for ViroSurface.tsx line :

var VRTSurface = requireNativeComponent( "VRTSurface", // @ts-ignore ViroSurface, {

previously VRTQuad

cdmoss commented 2 years ago

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.

Weixuanf commented 2 years ago

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!!

robertjcolley commented 2 years ago

@Weixuanf If you can create a PR, that would be amazing!

nkrmr commented 2 years ago

Any fix to this issue ?

tjikaljedy commented 2 years ago

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)

ansarikhurshid786 commented 1 year ago

any fixes or any worksaround

ansarikhurshid786 commented 1 year ago

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.

ansarikhurshid786 commented 1 year ago

https://github.com/ViroCommunity/viro/issues/136#issuecomment-1126882461

satishwaghela commented 1 year ago

For temporary, you can use yarn add @viro-community/react-viro@npm:react-viro-sw

spector32 commented 1 year ago

This is still an issue using Expo dev client. Although the fix was merged to main branch it was not released yet.

shawn10067 commented 8 months ago

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?

cjmcassar commented 8 months ago

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.

shawn10067 commented 8 months ago

Is there a timeline for the release date of the update?

cjmcassar commented 8 months ago

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.

shawn10067 commented 8 months ago

Alright thank you for the help

robertjcolley commented 8 months ago

4e1b34489b2ecb657fc807b69fe3ea56fb8d1fcf Should have fixed this. Please try v2.23.1!