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

Error on view pager #1148

Open
puneetkansal04 opened this issue Jun 22, 2021 · 20 comments
Open

Error on view pager #1148

puneetkansal04 opened this issue Jun 22, 2021 · 20 comments

Comments

@puneetkansal04
Copy link

puneetkansal04 commented Jun 22, 2021

React latest version

"react": "17.0.1",
"react-native": "0.64.2",

Error: Element ref was specified as a string (viewPager) but no owner was set. This could happen for one of the following reasons:

  1. You may be adding a ref to a function component
  2. You may be adding a ref to a component that was not created inside a component's render method
  3. You have multiple copies of React loaded
    See https://reactjs.org/link/refs-must-have-owner for more information.

This error is located at:
in ViewPager (at createAnimatedComponent.js:217)
in AnimatedComponent (at createAnimatedComponent.js:278)
in AnimatedComponentWrapper (at react-native-scrollable-tab-view/index.js:253)
in RCTView (at View.js:34)
in View (at react-native-scrollable-tab-view/index.js:396)
in ScrollableTabView (at ScrollableTabbar.js:8)
in ScrollableTabbar (at VendorProfileScreen.js:44)
in RCTView (at View.js:34)
in View (at VendorProfileScreen.js:43)
in RCTView (at View.js:34)
in View (at VendorProfileScreen.js:21)
in RCTView (at View.js:34)
in View (at VendorProfileScreen.js:19)
in VendorProfileScreen (at SceneView.tsx:122)
in StaticContainer
in EnsureSingleNavigator (at SceneView.tsx:114)
in SceneView (at useDescriptors.tsx:153)
in RCTView (at View.js:34)
in View (at CardContainer.tsx:245)
in RCTView (at View.js:34)
in View (at CardContainer.tsx:244)
in RCTView (at View.js:34)
in View (at CardSheet.tsx:33)
in CardSheet (at Card.tsx:573)
in RCTView (at View.js:34)
in View (at createAnimatedComponent.js:217)
in AnimatedComponent (at createAnimatedComponent.js:278)
in AnimatedComponentWrapper (at Card.tsx:555)
in PanGestureHandler (at GestureHandlerNative.tsx:13)
in PanGestureHandler (at Card.tsx:549)
in RCTView (at View.js:34)
in View (at createAnimatedComponent.js:217)
in AnimatedComponent (at createAnimatedComponent.js:278)
in AnimatedComponentWrapper (at Card.tsx:544)
in RCTView (at View.js:34)
in View (at Card.tsx:538)
in Card (at CardContainer.tsx:206)
in CardContainer (at CardStack.tsx:623)
in RNSScreen (at createAnimatedComponent.js:217)
in AnimatedComponent (at createAnimatedComponent.js:278)
in AnimatedComponentWrapper (at src/index.native.tsx:147)
in Screen (at Screens.tsx:74)
in MaybeScreen (at CardStack.tsx:616)
in RNSScreenContainer (at src/index.native.tsx:186)
in ScreenContainer (at Screens.tsx:50)
in MaybeScreenContainer (at CardStack.tsx:498)
in CardStack (at StackView.tsx:462)
in KeyboardManager (at StackView.tsx:458)
in RNCSafeAreaProvider (at SafeAreaContext.tsx:76)
in SafeAreaProvider (at SafeAreaProviderCompat.tsx:42)
in SafeAreaProviderCompat (at StackView.tsx:455)
in GestureHandlerRootView (at GestureHandlerRootView.android.tsx:26)
in GestureHandlerRootView (at StackView.tsx:454)
in StackView (at createStackNavigator.tsx:87)
in StackNavigator (at StackNavigator.js:32)
in EnsureSingleNavigator (at BaseNavigationContainer.tsx:409)
in BaseNavigationContainer (at NavigationContainer.tsx:91)
in ThemeProvider (at NavigationContainer.tsx:90)
in NavigationContainer (at StackNavigator.js:31)
in StackNavigator (at App.js:15)
in Provider (at App.js:13)
in App (at renderApplication.js:47)
in RCTView (at View.js:34)
in View (at AppContainer.js:107)
in RCTView (at View.js:34)
in View (at AppContainer.js:134)
in AppContainer (at renderApplication.js:40)

If I add @react-native-community/viewpager 2.0.2 then iOS is not working how can I resolve it. Or please add latest version of view pager in the package.

@SyedTayyabUlMazhar1
Copy link

I am facing a similar error: Element ref was specified as a string (tabContainer) but no owner was set

@yuezonglun
Copy link

Me too, how did you solve it?

@farhoudshapouran
Copy link

farhoudshapouran commented Oct 15, 2021

You can use this https://www.npmjs.com/package/react-native-scrollable-tab-view-forked

@bodrius
Copy link

bodrius commented Jan 7, 2022

the same problem +++

@yuezonglun
Copy link

yuezonglun commented Jan 7, 2022 via email

@dhon2407
Copy link

dhon2407 commented Mar 1, 2022

I currently have same issue, did someone manage to solve this?

@yuezonglun
Copy link

yuezonglun commented Mar 1, 2022 via email

@dhon2407
Copy link

dhon2407 commented Mar 1, 2022

You can use this https://www.npmjs.com/package/react-native-scrollable-tab-view-forked

Is there some migration guide for this, have a new error about [Error: Objects are not valid as a React child (found: object with keys {tabLabel, style, children})] when i used the forked version.

@sharifme04
Copy link

I am also facing similar error, Does anyone know any solution ?

Screenshot 2022-03-21 at 2 11 20 PM

@yuezonglun
Copy link

yuezonglun commented Mar 21, 2022 via email

@omarbakr2020
Copy link

Any updates regarding this issue?

@yuezonglun
Copy link

yuezonglun commented Jan 23, 2023 via email

@deepakkpardeshi
Copy link

I was also facing the same issue due to conflict in peer dependencies.
npm i --legacy-peer-deps fixed my issue.

@yuezonglun
Copy link

yuezonglun commented Feb 21, 2023 via email

@alvishdml
Copy link

I was also facing the same issue due to conflict in peer dependencies.
npm i --legacy-peer-deps fixed my issue.

@yuezonglun
Copy link

yuezonglun commented Mar 17, 2023 via email

@111Tashmo
Copy link

same issue to me.....any update?

@yuezonglun
Copy link

yuezonglun commented Mar 9, 2024 via email

@111Tashmo
Copy link

I was also facing the same issue due to conflict in peer dependencies. npm i --legacy-peer-deps fixed my issue.

guys this works for me

@hu-qi
Copy link

hu-qi commented Mar 16, 2024

I was also facing the same issue due to conflict in peer dependencies. npm i --legacy-peer-deps fixed my issue.

Yeah, It works for me, thanks!

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