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

Can't navigate using the actual tabs on android #4

Open
kyle-belle opened this issue Jun 13, 2023 · 5 comments
Open

Can't navigate using the actual tabs on android #4

kyle-belle opened this issue Jun 13, 2023 · 5 comments

Comments

@kyle-belle
Copy link

kyle-belle commented Jun 13, 2023

Can't navigate using the actual tab buttons on android gives this error

ERROR  TypeError: Cannot read property 'setPage' of undefined

This error is located at:
    in PagerViewAdapter (created by TabView)
    in RCTView (created by View)
    in View (created by TabView)
    in TabView (created by CollapsibleTabView)
    in RCTView (created by View)
    in View (created by CollapsibleTabView)
    in CollapsibleTabView (created by MaterialTopTabsCollapsibleTabView)
    in MaterialTopTabsCollapsibleTabView (created by MaterialTopTabNavigator)
    in MaterialTopTabNavigator (created by TopTabs)
    in TopTabs (created by HelpLayout)
    in HelpLayout
    in Unknown (created by Route(help))
    in Route (created by Route(help))
    in LocationProvider (created by Route(help))
    in Route(help) (created by SceneView)
    in StaticContainer
    in EnsureSingleNavigator (created by SceneView)
    in SceneView (created by BottomTabView)
    in RCTView (created by View)
    in View (created by Screen)
    in RCTView (created by View)
    in View (created by Background)
    in Background (created by Screen)
    in Screen (created by BottomTabView)
    in RNSScreen (created by AnimatedComponent)
    in AnimatedComponent
    in AnimatedComponentWrapper (created by InnerScreen)
    in Suspender (created by Freeze)
    in Suspense (created by Freeze)
    in Freeze (created by DelayedFreeze)
    in DelayedFreeze (created by InnerScreen)
    in InnerScreen (created by Screen)
    in Screen (created by MaybeScreen)
    in MaybeScreen (created by BottomTabView)
    in RNSScreenContainer (created by ScreenContainer)
    in ScreenContainer (created by MaybeScreenContainer)
    in MaybeScreenContainer (created by BottomTabView)
    in RCTView (created by View)
    in View (created by SafeAreaInsetsContext)
    in SafeAreaProviderCompat (created by BottomTabView)
    in BottomTabView (created by BottomTabNavigator)
    in PreventRemoveProvider (created by NavigationContent)
    in NavigationContent
    in Unknown (created by BottomTabNavigator)
    in BottomTabNavigator
    in Unknown (created by AppLayout)
    in AppLayout
    in Unknown (created by Route(app))
    in Route (created by Route(app))
    in LocationProvider (created by Route(app))
    in Route(app) (created by SceneView)
    in StaticContainer
    in EnsureSingleNavigator (created by SceneView)
    in SceneView (created by SceneView)
    in RCTView (created by View)
    in View (created by DebugContainer)
    in DebugContainer (created by MaybeNestedStack)
    in MaybeNestedStack (created by SceneView)
    in RCTView (created by View)
    in View (created by SceneView)
    in RNSScreen (created by AnimatedComponent)
    in AnimatedComponent
    in AnimatedComponentWrapper (created by InnerScreen)
    in Suspender (created by Freeze)
    in Suspense (created by Freeze)
    in Freeze (created by DelayedFreeze)
    in DelayedFreeze (created by InnerScreen)
    in InnerScreen (created by Screen)
    in Screen (created by SceneView)
    in SceneView (created by NativeStackViewInner)
    in Suspender (created by Freeze)
    in Suspense (created by Freeze)
    in Freeze (created by DelayedFreeze)
    in DelayedFreeze (created by ScreenStack)
    in RNSScreenStack (created by ScreenStack)
    in ScreenStack (created by NativeStackViewInner)
    in NativeStackViewInner (created by NativeStackView)
    in RCTView (created by View)
    in View (created by SafeAreaInsetsContext)
    in SafeAreaProviderCompat (created by NativeStackView)
    in NativeStackView (created by NativeStackNavigator)
    in PreventRemoveProvider (created by NavigationContent)
    in NavigationContent
    in Unknown (created by NativeStackNavigator)
    in NativeStackNavigator
    in Unknown (created by RootLayout)
    in RNCSafeAreaView
    in Unknown
    in NativeWind.NoName
    in Unknown (created by RootLayout)
    in RNCSafeAreaProvider (created by SafeAreaProvider)
    in SafeAreaProvider (created by RootLayout)
    in QueryClientProvider (created by TRPCProvider)
    in TRPCProvider (created by TRPCProvider)
    in TRPCProvider (created by RootLayout)
    in RootLayout
    in Unknown (created by Route())
    in Route (created by Route())
    in LocationProvider (created by Route())
    in Route() (created by RootRoute)
    in RootRoute (created by ContextNavigator)
    in InitialRootStateProvider (created by ContextNavigator)
    in EnsureSingleNavigator
    in BaseNavigationContainer
    in ThemeProvider
    in NavigationContainerInner (created by NavigationContainer)
    in NavigationContainer (created by ContextNavigator)
    in RootRouteNodeProvider (created by ContextNavigator)
    in ContextNavigator (created by ExpoRoot)
    in RNCSafeAreaProvider (created by SafeAreaProvider)
    in SafeAreaProvider (created by ExpoRoot)
    in ExpoRoot (created by App)
    in App (created by withDevTools(App))
    in withDevTools(App)
    in RCTView (created by View)
    in View (created by AppContainer)
    in RCTView (created by View)
    in View (created by AppContainer)
    in AppContainer
    in main(RootComponent), js engine: hermes

lib versions:
"@bacons/expo-router-top-tabs": "^0.1.0",
"@expo/metro-config": "^0.7.1",
"@expo/webpack-config": "^18.0.1",
"expo": "~48.0.19",
"expo-constants": "~14.2.1",
"expo-file-system": "~15.2.2",
"expo-linking": "~4.0.1",
"expo-navigation-bar": "~2.1.1",
"expo-router": "1.5.3",
"expo-splash-screen": "~0.18.2",
"expo-status-bar": "~1.4.4",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-native": "0.71.8",
"react-native-pager-view": "6.1.2",
"react-native-reanimated": "~2.14.4",
"react-native-safe-area-context": "4.5.3",
"react-native-screens": "~3.20.0",
"react-native-svg": "13.4.0",
"superjson": "1.12.3",

@asbilim
Copy link

asbilim commented Sep 16, 2023

same issue

@kyle-belle
Copy link
Author

same issue

damn this hasn't been fixed yet? Probably best to just go back to regular react-navigation

@asbilim
Copy link

asbilim commented Sep 16, 2023

I fixed it using react navigation top bar tab and expo router . I created a custom top tabs and it is working now

@samtoi
Copy link

samtoi commented Oct 17, 2023

A temp fix that worked for me was to bump up some dependency versions in package.json (though with a bunch of warnings), and after that running npm install to get the updated deps:

...
"overrides": {
  "@bacons/expo-router-top-tabs": {
    "expo-router": "^2.0.0",
    "react-native-reanimated": "^3.0.0",
    "react-native-pager-view": "6.2.2"
  }
}
...

The bug for the particular error in this case seems to have been fixed in pager-view project, where they replaced some react-native UIManager ref.

@Nareshj7
Copy link

By installing "react-native-tab-view" and "react-native-pager-view," I was able to resolve this error.

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

4 participants