react-navigation / react-navigation

Routing and navigation for your React Native apps
https://reactnavigation.org
23.5k stars 5.02k forks source link

Error: [Reanimated] `UpdatePropsManager` is not available on non-native platform. #11729

Closed valery-lavrik closed 2 months ago

valery-lavrik commented 10 months ago

Current behavior

I just upgraded react-native from version 0.72.6 to 0.72.7 and got an error when launching the application: image

Expected behavior

The mistake should not have happened

Reproduction

https://github.com/react-navigation/react-navigation

Platform

Packages

Environment

"dependencies": { "@dhairyasharma/react-native-encryption": "^1.0.0", "@react-native-community/datetimepicker": "^7.6.1", "@react-native-community/geolocation": "github:valery-lavrik/react-native-geolocation", "@react-native-community/netinfo": "^9.4.1", "@react-native-community/progress-bar-android": "^1.0.5", "@react-native-firebase/app": "^18.5.0", "@react-native-firebase/crashlytics": "^18.5.0", "@react-navigation/drawer": "^6.6.4", "@react-navigation/native": "^6.1.8", "@react-navigation/native-stack": "^6.9.14", "axios": "^1.5.1", "moment": "^2.29.4", "react": "18.2.0", "react-native": "0.72.7", "react-native-blob-util": "^0.19.1", "react-native-encrypted-storage": "^4.0.3", "react-native-event-listeners": "^1.0.7", "react-native-fingerprint-scanner": "github:valery-lavrik/react-native-fingerprint-scanner", "react-native-gesture-handler": "^2.13.2", "react-native-nfc-manager": "^3.14.8", "react-native-reanimated": "^3.5.4", "react-native-safe-area-context": "^4.7.2", "react-native-screens": "^3.25.0", "react-native-sqlite-storage": "^6.0.1", "react-native-video": "^6.0.0-alpha.4", "react-native-vision-camera": "^3.3.1", "react-native-webview": "^13.6.2" }, "devDependencies": { "@babel/core": "^7.20.0", "@babel/preset-env": "^7.20.0", "@babel/runtime": "^7.20.0", "@react-native/eslint-config": "^0.72.2", "@react-native/metro-config": "^0.72.11", "@tsconfig/react-native": "^3.0.0", "@types/lodash": "^4.14.200", "@types/react": "^18.0.24", "@types/react-native-sqlite-storage": "^6.0.1", "@types/react-test-renderer": "^18.0.0", "babel-jest": "^29.2.1", "eslint": "^8.19.0", "jest": "^29.2.1", "metro-react-native-babel-preset": "0.76.8", "prettier": "^2.4.1", "react-test-renderer": "18.2.0", "typescript": "4.8.4" },

github-actions[bot] commented 10 months ago

Hey @valery-lavrik! Thanks for opening the issue. It seems that the issue doesn't contain a link to a repro.

The best way to get attention to your issue is to provide an easy way for a developer to reproduce the issue.

You can provide a repro using any of the following:

github-actions[bot] commented 10 months ago

The versions mentioned in the issue for the following packages differ from the latest versions on npm:

Can you verify that the issue still exists after upgrading to the latest versions of these packages?

abdulmomin703 commented 10 months ago

Facing the same issue but only on IOS.

abdulmomin703 commented 10 months ago

@valery-lavrik I had hermes disabled in the podfile and I was Debugging with chrome. Stopping the debug resolved the error.

https://github.com/react-navigation/react-navigation/assets/71210857/5cbb800a-b283-4849-9c66-1b692f4dd2a5

datdt-026 commented 10 months ago

It kinda stupid but i commented the code "if" like this: And it doesn't throw that error. In the file: image

if (shouldBeUseWeb()) { const maybeThrowError = () => { // Jest attempts to access a property of this object to check if it is a Jest mock // so we can't throw an error in the getter. // i commented this section // if (!isJest()) { // throw new Error( // '[Reanimated] UpdatePropsManager is not available on non-native platform.' // ); // } }; global.UpdatePropsManager = new Proxy({} as UpdatePropsManager, { get: maybeThrowError, set: () => { maybeThrowError(); return false; }, }); }

kostyatarasenko commented 10 months ago

Any further ideas?

valery-lavrik commented 10 months ago

as a topicstarter, I do not have the opportunity and time to build a repository that would reproduce the problem. Can someone here help?

it seems that without this, the developer does not want to deal with the problem

datdt-026 commented 10 months ago

or u can use reanimated with version 3.5.1 I downgraded to that version and it doesn't show that bug

jsantos42 commented 10 months ago

@valery-lavrik I had hermes disabled in the podfile and I was Debugging with chrome. Stopping the debug resolved the error.

Screen.Recording.2023-12-01.at.3.18.38.AM.mov

I also had this, but only in Android. Thank you @abdulmomin703, disabling the debugger solved the issue for me!

valery-lavrik commented 10 months ago

@jsantos42 disabling the debugger is not a solution to the problem. It is needed for development

mowaisfarid commented 10 months ago

Facing same error on "react-native": "0.71.11", with "react-native-reanimated": "^3.6.0", error goes when stop the debugging mode, any ideas?

TraFriTCR commented 10 months ago

I can confirm with @datdt-026 that downgrading to 3.5.1 seems to fix the issue while allowing to continue the use of both native and debugging builds.

farazahmed12 commented 10 months ago

Closing the debugger resolved my issue, I am continuing with the latest version 3.6.1 of reanimated.

attarchi commented 10 months ago

Downgrading to 3.5.1 fixed the issue for me. I'm able to use debugging now.

tomekzaw commented 9 months ago

We would be more than happy to fix this if someone sends us a repro.

IncrediblePony commented 9 months ago

Can confirm this problem and it strangely coincided with the release of react-native 0.73.0 - Everything in our code base had been working up until 2 hours after the release of react native 0.73.0. It seems suspicious at the very least.

We would be more than happy to fix this if someone sends us a repro.

This might be difficult for us. This means I have to take more time out for this problem than I have at the moment. A reproduceable repo is hard to make when you don't know what the problem is exactly.

Error: [Reanimated] `UpdatePropsManager` is not available on non-native platform. 
    at Handler (http://localhost:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.glfr&modulesOnly=false&runModule=true:123100:38)
    at Drawer (http://localhost:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.glfr&modulesOnly=false&runModule=true:327681:27)
    at DrawerViewBase (http://localhost:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.glfr&modulesOnly=false&runModule=true:323811:23)
    at RNGestureHandlerRootView
    at GestureHandlerRootView
    at RCTView
    at http://localhost:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.glfr&modulesOnly=false&runModule=true:59416:44
    at SafeAreaProviderCompat (http://localhost:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.glfr&modulesOnly=false&runModule=true:326793:26)
    at DrawerView (http://localhost:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.glfr&modulesOnly=false&runModule=true:324011:28)
    at PreventRemoveProvider (http://localhost:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.glfr&modulesOnly=false&runModule=true:303472:26)
    at NavigationContent (http://localhost:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.glfr&modulesOnly=false&runModule=true:304219:23)
    at http://localhost:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.glfr&modulesOnly=false&runModule=true:304235:28
    at DrawerNavigator (http://localhost:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.glfr&modulesOnly=false&runModule=true:323688:19)
    at AppRouter (http://localhost:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.glfr&modulesOnly=false&runModule=true:295065:85)
    at EnsureSingleNavigator (http://localhost:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.glfr&modulesOnly=false&runModule=true:300429:25)
    at BaseNavigationContainer (http://localhost:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.glfr&modulesOnly=false&runModule=true:300030:29)
    at ThemeProvider (http://localhost:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.glfr&modulesOnly=false&runModule=true:305427:22)
    at NavigationContainerInner (http://localhost:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.glfr&modulesOnly=false&runModule=true:305317:27)
    at ThemeProvider (http://localhost:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.glfr&modulesOnly=false&runModule=true:268254:33)
    at RCTView
    at http://localhost:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.glfr&modulesOnly=false&runModule=true:59416:44
    at PortalHost (http://localhost:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.glfr&modulesOnly=false&runModule=true:276206:36)
    at RNCSafeAreaProvider
    at SafeAreaProvider (http://localhost:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.glfr&modulesOnly=false&runModule=true:268859:25)
    at SafeAreaProviderCompat (http://localhost:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.glfr&modulesOnly=false&runModule=true:268757:26)
    at PaperProvider (http://localhost:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.glfr&modulesOnly=false&runModule=true:268643:38)
    at ApolloProvider (http://localhost:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.glfr&modulesOnly=false&runModule=true:293541:21)
    at PersistGate (http://localhost:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.glfr&modulesOnly=false&runModule=true:434228:7)
    at Provider (http://localhost:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.glfr&modulesOnly=false&runModule=true:195745:22)
    at App (http://localhost:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.glfr&modulesOnly=false&runModule=true:122430:26)
    at RCTView
    at http://localhost:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.glfr&modulesOnly=false&runModule=true:59416:44
    at RCTView
    at http://localhost:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.glfr&modulesOnly=false&runModule=true:59416:44
    at AppContainer (http://localhost:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.glfr&modulesOnly=false&runModule=true:59260:36)
    at ComponentWithDisplayName (http://localhost:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.glfr&modulesOnly=false&runModule=true:107942:29)
TypeError: _$$_REQUIRE(...) is not a function

This error is located at:
    in PanGestureHandler (created by Drawer)
    in Drawer (created by DrawerViewBase)
    in DrawerViewBase (created by DrawerView)
    in RNGestureHandlerRootView (created by GestureHandlerRootView)
    in GestureHandlerRootView (created by DrawerView)
    in RCTView (created by View)
    in View (created by SafeAreaInsetsContext)
    in SafeAreaProviderCompat (created by DrawerView)
    in DrawerView (created by DrawerNavigator)
    in PreventRemoveProvider (created by NavigationContent)
    in NavigationContent
    in Unknown (created by DrawerNavigator)
    in DrawerNavigator (created by AppRouter)
    in AppRouter (created by App)
    in EnsureSingleNavigator
    in BaseNavigationContainer
    in ThemeProvider
    in NavigationContainerInner (created by App)
    in ThemeProvider (created by PaperProvider)
    in RCTView (created by View)
    in View (created by Portal.Host)
    in Portal.Host (created by PaperProvider)
    in RNCSafeAreaProvider (created by SafeAreaProvider)
    in SafeAreaProvider (created by SafeAreaInsetsContext)
    in SafeAreaProviderCompat (created by PaperProvider)
    in PaperProvider (created by App)
    in ApolloProvider (created by App)
    in PersistGate (created by App)
    in Provider (created by App)
    in App
    in RCTView (created by View)
    in View (created by AppContainer)
    in RCTView (created by View)
    in View (created by AppContainer)
    in AppContainer
    in glfr(RootComponent)

packgage.json dependencies

{
"dependencies": {
    "@apollo/client": "3.8.4",
    "@formatjs/intl-datetimeformat": "6.10.3",
    "@formatjs/intl-displaynames": "6.5.2",
    "@formatjs/intl-getcanonicallocales": "2.2.1",
    "@formatjs/intl-listformat": "7.4.2",
    "@formatjs/intl-locale": "3.3.4",
    "@formatjs/intl-numberformat": "8.7.2",
    "@formatjs/intl-pluralrules": "5.2.6",
    "@formatjs/intl-relativetimeformat": "11.2.6",
    "@invertase/react-native-apple-authentication": "^2.3.0",
    "@miblanchard/react-native-slider": "^2.3.1",
    "@react-native-community/geolocation": "3.1.0",
    "@react-native-community/netinfo": "^9.0.0",
    "@react-native-firebase/app": "17.3.2",
    "@react-native-firebase/messaging": "17.3.2",
    "@react-native-google-signin/google-signin": "^10.1.1",
    "@react-navigation/drawer": "6.6.6",
    "@react-navigation/native": "^6.1.9",
    "@react-navigation/native-stack": "6.9.13",
    "@reduxjs/toolkit": "1.9.5",
    "@sentry/react-native": "5.9.2",
    "@types/lodash": "^4.14.199",
    "@types/react-native-vector-icons": "6.4.14",
    "apollo-link-queue": "3.1.0",
    "apollo-link-serialize": "4.0.0",
    "apollo-upload-client": "17.0.0",
    "app-modules": "file:app-modules",
    "firebase": "9.23.0",
    "flag-icons": "6.11.1",
    "fuse.js": "6.6.2",
    "global": "^4.4.0",
    "graphql": "16.8.1",
    "i18next": "23.5.1",
    "intl-pluralrules": "2.0.1",
    "lodash": "4.17.21",
    "parse5": "7.1.2",
    "react": "18.2.0",
    "react-dom": "^18.2.0",
    "react-i18next": "13.2.2",
    "react-native": "^0.72.7",
    "react-native-blob-util": "0.19.1",
    "react-native-circular-progress": "1.3.9",
    "react-native-country-picker-modal": "2.0.0",
    "react-native-device-info": "10.11.0",
    "react-native-fbsdk-next": "^12.1.1",
    "react-native-fs": "^2.18.0",
    "react-native-geolocation-service": "^5.3.1",
    "react-native-gesture-handler": "^2.12.0",
    "react-native-get-random-values": "^1.9.0",
    "react-native-google-places-autocomplete": "2.5.1",
    "react-native-hyperlink": "0.0.22",
    "react-native-image-picker": "7.0.0",
    "react-native-inappbrowser-reborn": "3.7.0",
    "react-native-linear-gradient": "2.8.3",
    "react-native-localize": "2.2.4",
    "react-native-map-clustering": "3.4.2",
    "react-native-maps": "2.0.0-beta.14",
    "react-native-paper-dates": "0.19.7",
    "react-native-permissions": "3.9.2",
    "react-native-reanimated": "^3.3.0",
    "react-native-render-html": "^6.1.0",
    "react-native-safe-area-context": "^4.5.3",
    "react-native-screens": "^3.21.0",
    "react-native-svg": "^13.14.0",
    "react-native-webview": "^13.2.2",
    "react-redux": "8.1.2",
    "redux": "4.2.1",
    "redux-persist": "6.0.0",
    "redux-persist-filesystem-storage": "4.2.0",
    "redux-saga": "1.2.3",
    "reselect": "^4.1.8",
    "standard-version": "9.5.0",
    "uuid": "^9.0.1",
    "validator": "13.11.0"
  },
  "devDependencies": {
    "@babel/core": "^7.20.0",
    "@babel/preset-env": "^7.20.0",
    "@babel/runtime": "^7.20.0",
    "@react-native/metro-config": "^0.72.0",
    "@tsconfig/react-native": "^3.0.0",
    "@types/apollo-upload-client": "^17.0.4",
    "@types/react": "^18.0.24",
    "@types/react-test-renderer": "^18.0.0",
    "@types/uuid": "9.0.4",
    "@typescript-eslint/eslint-plugin": "^6.7.2",
    "@typescript-eslint/parser": "^6.8.0",
    "babel-jest": "^29.2.1",
    "eslint": "^8.50.0",
    "eslint-config-glfr": "git+ssh://git@github.com:IngeniumGolf/eslint-config-glfr.git#master",
    "eslint-config-prettier": "^9.0.0",
    "eslint-import-resolver-typescript": "^3.6.1",
    "eslint-plugin-import": "^2.28.1",
    "eslint-plugin-react": "^7.33.2",
    "eslint-plugin-react-hooks": "^4.6.0",
    "expo": "^49.0.13",
    "husky": "8.0.3",
    "jest": "^29.2.1",
    "metro-react-native-babel-preset": "0.76.5",
    "npm": "^10.2.0",
    "prettier": "3.0.3",
    "react-native-asset": "2.1.1",
    "react-native-vector-icons": "10.0.0",
    "react-test-renderer": "18.2.0",
    "typescript": "5.2.2"
  },
  "engines": {
    "node": ">=18"
  },
}
UsamaIrfan commented 9 months ago

Downgrading to react-native-reanimated version 3.5.1 worked as a charm for me.

Zhouwenli commented 9 months ago

I have the same issue, and it works fine when I turn off the debug mode

IncrediblePony commented 8 months ago

Downgrading to react-native-reanimated version 3.5.1 worked as a charm for me.

3.5.4 worked for us as well

heron982 commented 8 months ago

Disabling Debugger worked for me

valery-lavrik commented 8 months ago

Disabling Debugger worked for me

a great solution. I punched a tire on a car, threw it out. No wheel, no problem. how to develop without debbager?

heron982 commented 8 months ago

Disabling Debugger worked for me

a great solution. I punched a tire on a car, threw it out. No wheel, no problem. how to develop without debbager?

I did not figured how to do it yet

darimuhittin commented 8 months ago

Have the same issue with hermes disabled and debugging with chrome active. When deactivate debug mode it doesnt happens.

AllenGe commented 7 months ago

"react-native-reanimated": "3.5.4" the development / debugging / packaging environment can run and use normally without changing the source code

eliataylor commented 7 months ago

To preserve debug mode: "Try resetting your Metro bundler cache with yarn start --reset-cache, npm start -- --reset-cache or expo start -c and run the app again"

From https://docs.swmansion.com/react-native-reanimated/docs/guides/troubleshooting

dejawho commented 6 months ago

I have the same problem in 3.8.1

kirandchavan commented 6 months ago

this is happening with new reanimated version too, with debugger "react-native-reanimated": "^3.8.1", "react-native": "0.72.4",

github-actions[bot] commented 5 months ago

Hello 👋, this issue has been open for more than a month without a repro or any activity. If the issue is still present in the latest version, please provide a repro or leave a comment within 7 days to keep it open, otherwise it will be closed automatically. If you found a solution or workaround for the issue, please comment here for others to find. If this issue is critical for you, please consider sending a pull request to fix it.

VasylenckoSlava commented 5 months ago

Issue still exist

github-actions[bot] commented 4 months ago

Hello 👋, this issue has been open for more than a month without a repro or any activity. If the issue is still present in the latest version, please provide a repro or leave a comment within 7 days to keep it open, otherwise it will be closed automatically. If you found a solution or workaround for the issue, please comment here for others to find. If this issue is critical for you, please consider sending a pull request to fix it.

M-TRUEPLAY commented 3 months ago

Issue still exist

MinaSamir11 commented 3 months ago

Same Issue here while running debugger

github-actions[bot] commented 2 months ago

Hello 👋, this issue has been open for more than a month without a repro or any activity. If the issue is still present in the latest version, please provide a repro or leave a comment within 7 days to keep it open, otherwise it will be closed automatically. If you found a solution or workaround for the issue, please comment here for others to find. If this issue is critical for you, please consider sending a pull request to fix it.

github-actions[bot] commented 2 months ago

Hey! Thanks for opening the issue. Seems that this issue is related to react-native-reanimated library which is a dependency of React Navigation. Can you also post your issue in this repo so that it's notified to the maintainers of that library? This will help us fix the issue faster since it's upto the maintainers of that library to investigate it.