viro icon indicating copy to clipboard operation
viro copied to clipboard

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

Open tjikaljedy opened this issue 2 years ago • 7 comments

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 avatar May 14 '22 22:05 tjikaljedy

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 avatar May 14 '22 22:05 tjikaljedy

Hi Admin,

please fix this bug. for ViroSurface.tsx line :

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

previously VRTQuad

tjikaljedy avatar May 15 '22 08:05 tjikaljedy

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.

cdmoss avatar May 20 '22 02:05 cdmoss

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 avatar May 30 '22 04:05 Weixuanf

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

robertjcolley avatar May 31 '22 17:05 robertjcolley

Any fix to this issue ?

nkrmr avatar Jun 24 '22 10:06 nkrmr

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)

tjikaljedy avatar Jun 24 '22 17:06 tjikaljedy

any fixes or any worksaround

ansarikhurshid786 avatar Nov 02 '22 09:11 ansarikhurshid786

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 avatar Nov 02 '22 11:11 ansarikhurshid786

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

ansarikhurshid786 avatar Nov 02 '22 11:11 ansarikhurshid786

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

satishwaghela avatar Jan 29 '23 04:01 satishwaghela

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

spector32 avatar Sep 10 '23 22:09 spector32

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?

shawn10067 avatar Jan 11 '24 05:01 shawn10067

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.

cjmcassar avatar Jan 11 '24 07:01 cjmcassar

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

shawn10067 avatar Jan 12 '24 00:01 shawn10067

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.

cjmcassar avatar Jan 12 '24 00:01 cjmcassar

Alright thank you for the help

shawn10067 avatar Jan 12 '24 00:01 shawn10067

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

robertjcolley avatar Jan 31 '24 15:01 robertjcolley