software-mansion / react-native-reanimated

React Native's Animated library reimplemented
https://docs.swmansion.com/react-native-reanimated/
MIT License
9.01k stars 1.3k forks source link

Error in version 3.4.x #4882

Closed MC-HaoPhan closed 1 year ago

MC-HaoPhan commented 1 year ago

Description

Hi everyone, increased version from 3.3.0 to 3.4.1 and got error " ERROR ReferenceError: Property '_IS_FABRIC' doesn't exist, js engine: hermes ".

Screenshot 2023-08-04 at 9 53 41 AM

Steps to reproduce

Only bump version

Snack or a link to a repository

Sorry my project requires security

Reanimated version

3.4.1

React Native version

0.72.3

Platforms

iOS

JavaScript runtime

Hermes

Workflow

React Native (without Expo)

Architecture

Paper (Old Architecture)

Build type

Debug mode

Device

iOS simulator

Device model

No response

Acknowledgements

Yes

github-actions[bot] commented 1 year ago

Hey! 👋

The issue doesn't seem to contain a minimal reproduction.

Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?

piaskowyk commented 1 year ago

Hey 👋 could you provide a reproduction to your problem? Without it we can't help 😔

MC-HaoPhan commented 1 year ago

Sorry, for security reasons, I can only provide dependencies:

{ "version": "0.0.0", "private": true, "license": "MIT", "scripts": { "postinstall": "patch-package", "build": "nx build", "build:check": "nx run-many --target=check --all", "prepare": "husky install", "start": "nx serve", "test": "nx test" }, "dependencies": { "@invertase/react-native-apple-authentication": "^2.2.2", "@lingui/react": "^4.3.0", "@miblanchard/react-native-slider": "^2.3.1", "@react-native-async-storage/async-storage": "1.19.1", "@react-native-community/netinfo": "^9.4.1", "@react-native-community/push-notification-ios": "^1.11.0", "@react-native-firebase/analytics": "^18.3.0", "@react-native-firebase/app": "^18.3.0", "@react-native-firebase/auth": "^18.3.0", "@react-native-firebase/crashlytics": "^18.3.0", "@react-native-firebase/firestore": "^18.3.0", "@react-native-firebase/messaging": "^18.3.0", "@react-native-google-signin/google-signin": "^10.0.1", "@react-navigation/bottom-tabs": "^6.5.8", "@react-navigation/material-top-tabs": "^6.6.3", "@react-navigation/native": "^6.1.7", "@react-navigation/native-stack": "^6.9.13", "@tanstack/react-query": "^4.32.1", "axios": "^1.4.0", "d3": "^7.8.5", "dayjs": "^1.11.9", "lottie-react-native": "^6.0.1", "make-plural": "^7.3.0", "patch-package": "^7.0.2", "randomstring": "^1.3.0", "react": "18.2.0", "react-native": "0.72.3", "react-native-blob-util": "^0.18.6", "react-native-bootsplash": "^4.7.5", "react-native-calendars": "^1.1300.0", "react-native-check-version": "^1.1.1", "react-native-date-picker": "^4.2.13", "react-native-device-info": "^10.8.0", "react-native-fast-image": "^8.6.3", "react-native-fbsdk-next": "11.2.1", "react-native-gesture-handler": "^2.12.1", "react-native-google-mobile-ads": "^11.6.3", "react-native-haptic-feedback": "^2.0.3", "react-native-health": "^1.17.0", "react-native-iap": "^12.10.5", "react-native-linear-gradient": "^2.8.1", "react-native-modal": "^13.0.1", "react-native-pager-view": "^6.2.0", "react-native-permissions": "^3.8.4", "react-native-push-notification": "^8.1.1", "react-native-rate": "^1.2.12", "react-native-reanimated": "^3.3.0", "react-native-reanimated-carousel": "^3.5.1", "react-native-restart": "^0.0.27", "react-native-safe-area-context": "4.7.1", "react-native-screens": "^3.23.0", "react-native-sound": "^0.11.2", "react-native-spinkit": "^1.5.1", "react-native-tab-view": "^3.5.2", "react-native-text-size": "^4.0.0-rc.1", "react-native-touchable-scale": "^2.2.0", "react-native-track-player": "^3.2.0", "react-player": "^2.12.0", "tslib": "^2.6.1", "xlsx": "^0.18.5", }, "devDependencies": { "@babel/core": "^7.22.9", "@babel/preset-env": "^7.22.9", "@babel/preset-react": "^7.22.5", "@lingui/cli": "^4.3.0", "@lingui/macro": "^4.3.0", "@nx/detox": "16.6.0", "@nx/eslint-plugin": "16.6.0", "@nx/jest": "16.6.0", "@nx/js": "16.6.0", "@nx/linter": "16.6.0", "@nx/react": "16.6.0", "@nx/react-native": "16.6.0", "@nx/web": "16.6.0", "@nx/webpack": "16.6.0", "@nx/workspace": "16.6.0", "@pmmmwh/react-refresh-webpack-plugin": "^0.5.10", "@react-native-community/cli": "11.3.6", "@react-native-community/cli-platform-android": "11.3.6", "@react-native-community/cli-platform-ios": "11.3.6", "@react-native/metro-config": "^0.72.9", "@swc-node/register": "^1.6.6", "@swc/cli": "~0.1.62", "@swc/core": "^1.3.74", "@swc/helpers": "~0.5.1", "@testing-library/jest-dom": "5.17.0", "@testing-library/jest-native": "5.4.2", "@testing-library/react": "14.0.0", "@testing-library/react-native": "12.1.3", "@types/d3": "^7.4.0", "@types/jest": "29.5.3", "@types/node": "20.4.7", "@types/randomstring": "^1.1.8", "@types/react": "18.2.18", "@types/react-beautiful-dnd": "^13.1.4", "@types/react-color": "^3.0.6", "@types/react-dom": "18.2.7", "@types/react-is": "18.2.1", "@types/react-native": "0.72.2", "@types/react-native-push-notification": "^8.1.1", "@types/react-router-dom": "5.3.3", "@types/semver": "^7.5.0", "@types/styled-components": "5.1.26", "@types/yup": "^0.32.0", "@typescript-eslint/eslint-plugin": "5.61.0", "@typescript-eslint/parser": "5.61.0", "babel-jest": "29.6.2", "babel-plugin-macros": "^3.1.0", "babel-plugin-styled-components": "2.1.4", "detox": "20.11.2", "eslint": "8.46.0", "eslint-config-prettier": "8.10.0", "eslint-plugin-import": "2.28.0", "eslint-plugin-jsx-a11y": "6.7.1", "eslint-plugin-react": "7.33.1", "eslint-plugin-react-hooks": "4.6.0", "husky": "^8.0.3", "jest": "29.6.2", "jest-circus": "^29.6.2", "jest-environment-jsdom": "^29.6.2", "jest-jasmine2": "29.6.2", "jest-react-native": "18.0.0", "jsdom": "~22.1.0", "metro": "0.77.0", "metro-babel-register": "0.77.0", "metro-config": "0.77.0", "metro-react-native-babel-preset": "0.77.0", "metro-react-native-babel-transformer": "0.77.0", "metro-resolver": "0.77.0", "nx": "16.6.0", "prettier": "2.8.8", "react-native-config": "1.5.1", "react-native-svg": "13.10.0", "react-native-svg-transformer": "1.1.0", "react-refresh": "^0.14.0", "react-test-renderer": "18.2.0", "regenerator-runtime": "0.13.11", "semver": "^7.5.4", "ts-jest": "29.1.1", "ts-node": "10.9.1", "typescript": "5.1.6" }, "resolutions": { "fast-xml-parser": "^4", "semver": "^7", "word-wrap": "^1.2.4" }, "reactNativePermissionsIOS": [ "Notifications" ] }

piaskowyk commented 1 year ago

Could you try to patch locally Reanimated? Try to update this line: https://github.com/software-mansion/react-native-reanimated/blob/main/src/reanimated2/NativeMethods.ts#L56

- const measured = _IS_FABRIC
+ const measured = global._IS_FABRIC
arivanbastos commented 1 year ago

Hi guys. Getting the same error here when running my app in iOS.

@piaskowyk Cant apply the patch cause I dont know how rebuild react-native-reanimated, can you provide a pull request ID?

tpcstld commented 1 year ago

I had the same issue and resolved it by resetting the metro cache