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

Got error with new-arch: Cannot read property '__internalInstanceHandle' of undefined #953

Closed
manssorr opened this issue Dec 25, 2024 · 8 comments

Comments

@manssorr
Copy link

Environment

package.json

{
  "name": "mobile",
  "main": "expo-router/entry",
  "version": "1.0.3",
  "scripts": {
    "web": "cross-env expo start --web",
    "clean": "rm -rf node_modules",
    "xcode": "xed -b ios",
    "test": "jest --watchAll",
  },
  "jest": {
    "preset": "jest-expo"
  },
  "dependencies": {
    "@expo/vector-icons": "^14.0.0",
    "@gluestack-ui/progress": "^0.1.17",
    "@gluestack-ui/slider": "^0.1.25",
    "@react-native-async-storage/async-storage": "1.23.1",
    "@react-native-picker/picker": "2.9.0",
    "@react-navigation/material-top-tabs": "^7.1.0",
    "@react-navigation/native": "^7.0.0",
    "@shopify/flash-list": "1.7.1",
    "@tanstack/react-query": "^5.59.16",
    "@unitools/image-expo": "^0.0.5",
    "@unitools/link-expo": "^0.0.1",
    "@unitools/router-expo": "^0.0.1",
    "app-icon-badge": "^0.1.2",
    "date-fns": "^4.1.0",
    "expo": "~52.0.18",
    "expo-audio": "~0.3.0",
    "expo-av": "~15.0.1",
    "expo-build-properties": "~0.13.1",
    "expo-constants": "^17.0.3",
    "expo-dev-client": "~5.0.6",
    "expo-document-picker": "~13.0.1",
    "expo-file-system": "~18.0.5",
    "expo-font": "~13.0.1",
    "expo-image": "~2.0.3",
    "expo-image-manipulator": "~13.0.5",
    "expo-image-picker": "~16.0.3",
    "expo-linking": "~7.0.3",
    "expo-local-authentication": "~15.0.1",
    "expo-notifications": "~0.29.11",
    "expo-router": "~4.0.11",
    "expo-secure-store": "~14.0.0",
    "expo-splash-screen": "~0.29.18",
    "expo-status-bar": "~2.0.0",
    "expo-system-ui": "~4.0.6",
    "expo-updates": "~0.26.10",
    "expo-video": "~2.0.2",
    "expo-video-thumbnails": "~9.0.2",
    "expo-web-browser": "~14.0.1",
    "i18next": "^23.15.1",
    "nativewind": "^4.1.23",
    "oidc-client-ts": "^3.1.0",
    "react": "18.3.1",
    "react-dom": "18.3.1",
    "react-i18next": "^15.0.2",
    "react-native": "0.76.5",
    "react-native-collapsible-tab-view": "^8.0.0",
    "react-native-compressor": "^1.10.3",
    "react-native-edge-to-edge": "^1.1.3",
    "react-native-gesture-handler": "~2.20.2",
    "react-native-mmkv": "^3.1.0",
    "react-native-pager-view": "^6.6.1",
    "react-native-reanimated": "~3.16.1",
    "react-native-safe-area-context": "4.12.0",
    "react-native-screens": "~4.1.0",
    "react-native-svg": "15.8.0",
    "react-native-tab-view": "^4.0.5",
    "react-native-web": "~0.19.13",
    "react-oidc-context": "^3.2.0",
    "zustand": "^5.0.0-rc.2"
  },
  "devDependencies": {
    "@babel/core": "^7.24.0",
    "@dev-plugins/async-storage": "^0.1.0",
    "@dev-plugins/react-native-mmkv": "^0.1.0",
    "@dev-plugins/react-navigation": "^0.1.0",
    "@dev-plugins/react-query": "^0.1.0",
    "@types/react": "~18.3.12",
    "@unitools/babel-plugin-universal-image": "^1.0.0",
    "babel-plugin-module-resolver": "^5.0.2",
    "cross-env": "^7.0.3",
    "dotenv": "^16.4.5",
    "jest": "^29.2.1",
    "jest-expo": "~52.0.2",
    "np": "^10.1.0",
    "react-test-renderer": "18.2.0",
    "reactotron-react-native": "^5.1.10",
    "typescript": "~5.3.3"
  },
  "expo": {
    "doctor": {
      "reactNativeDirectoryCheck": {
        "listUnknownPackages": false,
        "exclude": [
          "react-native-restart"
        ]
      }
    },
    "install": {
      "exclude": [
        "eslint-config-expo"
      ]
    }
  },
  "private": true
}

Description

The errro message:

 (NOBRIDGE) ERROR  Warning: TypeError: Cannot read property '__internalInstanceHandle' of undefined

This error is located at:
    in PagerView (created by AnimatedComponent(PagerView))
    in AnimatedComponent(PagerView)
    in Unknown
    in RCTView (created by View)
    in View (created by CssInterop.View)
    in CssInterop.View (created by AnimatedComponent(View))
    in AnimatedComponent(View)
    in Unknown
    in Unknown
    in ProfileScreen
    in Unknown (created by Route(my-profile))
    in Suspense (created by Route(my-profile))
    in Route (created by Route(my-profile))
    in Route(my-profile) (created by SceneView)
    in StaticContainer
    in EnsureSingleNavigator (created by SceneView)
    in SceneView (created by BottomTabNavigator)
    in RCTView (created by View)
    in View (created by Screen)
    in RCTView (created by View)
    in View (created by CssInterop.View)
    in CssInterop.View (created by Animated(View))
    in Animated(View) (created by Background)
    in Background (created by Screen)
    in Screen (created by BottomTabView)
    in RNSScreen (created by Animated(Anonymous))
    in Animated(Anonymous)
    in Suspender (created by Freeze)
    in Suspense (created by Freeze)
    in Freeze (created by DelayedFreeze)
    in DelayedFreeze
    in InnerScreen (created by Screen)
    in Screen (created by MaybeScreen)
    in MaybeScreen (created by BottomTabView)
    in RNSScreenNavigationContainer (created by ScreenContainer)
    in ScreenContainer (created by MaybeScreenContainer)
    in MaybeScreenContainer (created by BottomTabView)
    in RCTView (created by View)
    in View (created by SafeAreaProviderCompat)
    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 TabsLayout)
    in TabsLayout
    in Unknown (created by Route((tabs)))
    in Suspense (created by Route((tabs)))
    in Route (created by Route((tabs)))
    in Route((tabs)) (created by SceneView)
    in StaticContainer
    in EnsureSingleNavigator (created by SceneView)
    in SceneView (created by NativeStackNavigator)
    in RNSScreenContentWrapper (created by ScreenContentWrapper)
    in ScreenContentWrapper (created by DebugContainer)
    in DebugContainer
    in RNSScreen (created by Animated(Anonymous))
    in Animated(Anonymous)
    in Suspender (created by Freeze)
    in Suspense (created by Freeze)
    in Freeze (created by DelayedFreeze)
    in DelayedFreeze
    in InnerScreen (created by Screen)
    in Screen
    in ScreenStackItem (created by SceneView)
    in SceneView (created by NativeStackView)
    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 Unknown (created by ScreenStack)
    in ScreenStack (created by NativeStackView)
    in RCTView (created by View)
    in View (created by SafeAreaProviderCompat)
    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 AppLayout)
    in RCTView (created by View)
    in View (created by CssInterop.View)
    in CssInterop.View (created by AppLayout)
    in AppLayout
    in Unknown (created by Route((app)))
    in Suspense (created by Route((app)))
    in Route (created by Route((app)))
    in Route((app)) (created by SceneView)
    in StaticContainer
    in EnsureSingleNavigator (created by SceneView)
    in SceneView (created by NativeStackNavigator)
    in RNSScreenContentWrapper (created by ScreenContentWrapper)
    in ScreenContentWrapper (created by DebugContainer)
    in DebugContainer
    in RNSScreen (created by Animated(Anonymous))
    in Animated(Anonymous)
    in Suspender (created by Freeze)
    in Suspense (created by Freeze)
    in Freeze (created by DelayedFreeze)
    in DelayedFreeze
    in InnerScreen (created by Screen)
    in Screen
    in ScreenStackItem (created by SceneView)
    in SceneView (created by NativeStackView)
    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 Unknown (created by ScreenStack)
    in ScreenStack (created by NativeStackView)
    in RCTView (created by View)
    in View (created by SafeAreaProviderCompat)
    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 AuthInterceptor (created by RootLayout)
    in QueryClientProvider (created by ReactQueryProvider)
    in ReactQueryProvider (created by RootLayout)
    in AuthProvider (created by AuthProvider)
    in AuthProvider (created by RootLayout)
    in ThemeProvider (created by RootLayout)
    in ToastProvider (created by GluestackUIProvider)
    in PortalProvider (created by GluestackUIProvider)
    in RCTView (created by View)
    in View (created by CssInterop.View)
    in CssInterop.View (created by GluestackUIProvider)
    in GluestackUIProvider (created by RootLayout)
    in RCTView (created by View)
    in View (created by CssInterop.View)
    in CssInterop.View (created by GestureHandlerRootView)
    in GestureHandlerRootView (created by RootLayout)
    in RootLayout
    in Try
    in Unknown
    in Unknown (created by Route())
    in Suspense (created by Route())
    in Route (created by Route())
    in Route() (created by ContextNavigator)
    in SafeAreaEnv (created by SafeAreaProviderShim)
    in RNCSafeAreaProvider (created by SafeAreaProvider)
    in SafeAreaProvider (created by SafeAreaProviderShim)
    in SafeAreaProviderShim (created by wrapper)
    in wrapper (created by ContextNavigator)
    in ThemeProvider
    in EnsureSingleNavigator
    in BaseNavigationContainer
    in NavigationContainerInner (created by ContextNavigator)
    in ContextNavigator (created by ExpoRoot)
    in ExpoRoot (created by App)
    in App (created by ErrorOverlay)
    in ErrorToastContainer (created by ErrorOverlay)
    in ErrorOverlay (created by withDevTools(ErrorOverlay))
    in withDevTools(ErrorOverlay)
    in RCTView (created by View)
    in View (created by CssInterop.View)
    in CssInterop.View (created by AppContainer)
    in RCTView (created by View)
    in View (created by CssInterop.View)
    in CssInterop.View (created by AppContainer)
    in AppContainer
    in main(RootComponent)

Image

Reproducible Demo

@iiagodias
Copy link

I have the same problem.

@rileysay
Copy link

rileysay commented Dec 28, 2024

Reanimated problem? Maybe try Version 3.16.4. See #947.

@manssorr
Copy link
Author

Reanimated problem. Temp fix downgrade to Version 3.16.4. See #947

I'm on "react-native-reanimated": "~3.16.1" already not higher as I mentioned in package.json

@manssorr
Copy link
Author

Hello my issue was related to The tilde (~) in the version specification ~3.16.1 allows patch-level changes. This means it will accept any version from 3.16.4 up to, but not including 3.17.0.

So my solution is forcing exact version like this: "react-native-reanimated": "3.16.4"

Thanks @rileysay, maybe this could help you @iiagodias !

@rileysay
Copy link

@manssorr All good! Yes 13.16.4 explicitly. Sorry I should of specified

@utsavsmn
Copy link

Warning: TypeError: Cannot read property '__internalInstanceHandle' of undefined |
"react-native": "^0.76.5",
"react-native-reanimated": "^3.16.6",
"react-native-pager-view": "^6.6.1",
not working this version
give soluation fast

@samsonong
Copy link

Warning: TypeError: Cannot read property '__internalInstanceHandle' of undefined | "react-native": "^0.76.5", "react-native-reanimated": "^3.16.6", "react-native-pager-view": "^6.6.1", not working this version give soluation fast

Downgrading to 3.16.4 works. No idea why it's not working on 3.16.6 too

@piaskowyk
Copy link

Should be fixed with software-mansion/react-native-reanimated#6884

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

6 participants