software-mansion / react-native-reanimated

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

Bumping from Reanimated 3.3.0 -> 3.4.x and up causes app to crash at start #5251

Closed iamchrispham closed 8 months ago

iamchrispham commented 8 months ago

Description

I wanted to bump the reanimated version from 3.3x to the latest 3.5.x and this was working on earlier versions. Performed a pod update and I'm now unable to run the application at all. It immediately crashes before Metro can sync with the iOS simulator. If i try to open the app again via simulator, some babel errors also occur.

Unsure if this is related to Firebase, but the project uses it as a static framework.

Xcode:

Exception NSException "view (for ID 1) not found" 0x0000600000d275a0 name __NSCFConstantString "NSInternalInconsistencyException" 0x00000001b9df26d8 NSCFString NSCFString
NSMutableString NSMutableString NSString NSString
NSObject NSObject
isa Class NSCFConstantString 0x00000001bf9b7740 reason NSCFString "view (for ID 1) not found" 0x0000600000d27450 NSMutableString NSMutableString NSString NSString
NSObject NSObject
isa Class NSCFString 0x01000001bf9b7719 userInfo NSDictionaryM
2 key/value pairs 0x00006000002ce000 [0] (null) "NSAssertLine" : 595
[1] (null) "NSAssertFile" : "//node_modules/react-native/React/Modules/RCTUIManager.m"
reserved __NSDictionaryM * 2 key/value pairs 0x00006000002cda20 [0] (null) "callStackReturnAddresses" : 19 elements
[1] (null) "callStackSymbols" : 19 elements
argc int 2 argv char 0x16f115d10 0x000000016f115d10 argv char "/Users//Library/Developer/CoreSimulator/Devices/BC4CFFA0-5A2F-433A-B126-926CB99F183A/data/Containers/Bundle/Application/9479791C-DBE1-4E13-9529-4ADB9B7275FA/.app/" 0x000000016f116088 argv char '/'

Metro:

error: node_modules/react-native-reanimated/src/reanimated2/threads.ts: //node_modules/react-native-reanimated/src/reanimated2/threads.ts: [Reanimated] Babel plugin exception: Error: Unknown node type: "TSInstantiationExpression"

Package.json:

"dependencies": { "@gorhom/bottom-sheet": "^4.4.5", "@notifee/react-native": "^7.7.1", "@react-native-async-storage/async-storage": "^1.17.11", "@react-native-clipboard/clipboard": "^1.10.0", "@react-native-community/netinfo": "^9.3.7", "@react-native-firebase/analytics": "^17.4.2", "@react-native-firebase/app": "^17.4.2", "@react-native-firebase/crashlytics": "^17.4.2", "@react-native-firebase/messaging": "^17.4.2", "@react-native-masked-view/masked-view": "^0.2.8", "@react-navigation/bottom-tabs": "^6.5.9", "@react-navigation/native": "^6.0.13", "@react-navigation/stack": "^6.3.18", "@reduxjs/toolkit": "^1.8.0", "@shopify/flash-list": "^1.4.3", "buffer": "^6.0.3", "html-entities": "^2.3.2", "patch-package": "^6.5.1", "postinstall-postinstall": "^2.1.0", "react": "18.2.0", "react-airplay": "^1.2.0", "react-fast-compare": "^3.2.0", "react-native": "0.72.5", "react-native-bootsplash": "^4.1.3", "react-native-branch": "^5.5.0", "react-native-circular-progress": "^1.3.8", "react-native-code-push": "^7.1.0", "react-native-context-menu-view": "^1.11.0", "react-native-device-info": "^8.5.0", "react-native-dotenv": "^3.3.1", "react-native-draggable-flatlist": "^4.0.1", "react-native-elements": "^4.0.0-beta.0", "react-native-fast-image": "^8.5.11", "react-native-fbsdk": "^3.0.0", "react-native-fs": "^2.20.0", "react-native-gesture-handler": "^2.9.0", "react-native-google-cast": "^4.6.2", "react-native-haptic-feedback": "^1.14.0", "react-native-keychain": "^8.0.0", "react-native-linear-gradient": "^2.5.6", "react-native-reanimated": "^3.5.4", "react-native-redash": "^18.1.0", "react-native-render-html": "^6.3.4", "react-native-safe-area-context": "^4.7.2", "react-native-screens": "^3.25.0", "react-native-snap-carousel": "^3.9.1", "react-native-svg": "^13.14.0", "react-native-system-navigation-bar": "^2.6.0", "react-native-text-ticker": "^1.14.0", "react-native-toast-message": "^2.1.5", "react-native-url-polyfill": "^1.3.0", "react-native-vector-icons": "^9.2.0", "react-native-version-check": "^3.4.3", "react-native-video": "^5.2.1", "react-native-webview": "^11.26.1", "react-redux": "^7.2.6", "react-string-replace": "^1.0.0", "realm": "^11.9.0", "redux-logger": "^3.0.6" }, "devDependencies": { "@babel/core": "^7.23.2", "@babel/preset-env": "^7.23.2", "@babel/preset-typescript": "^7.23.2", "@babel/runtime": "^7.20.0", "@react-native-community/eslint-config": "3.2.0", "@react-native/eslint-config": "0.72.2", "@react-native/metro-config": "^0.72.11", "@rnx-kit/dep-check": "^1.13.5", "@tsconfig/react-native": "^3.0.0", "@types/html-entities": "^1.3.4", "@types/jest": "29.2.1", "@types/react": "^18.0.24", "@types/react-native": "0.68.5", "@types/react-native-snap-carousel": "^3.8.5", "@types/react-native-version-check": "^3.4.4", "@types/react-native-video": "^5.0.13", "@types/react-redux": "^7.1.23", "@types/react-test-renderer": "^18.0.0", "@types/redux-logger": "^3.0.9", "@typescript-eslint/eslint-plugin": "^5.52.0", "@typescript-eslint/parser": "^5.52.0", "babel-jest": "^29.2.1", "babel-plugin-module-resolver": "^5.0.0", "babel-plugin-transform-remove-console": "^6.9.4", "deprecated-react-native-prop-types": "^4.0.0", "eslint": "^8.19.0", "eslint-config-prettier": "^8.6.0", "eslint-plugin-ft-flow": "^2.0.3", "eslint-plugin-simple-import-sort": "^10.0.0", "eslint-plugin-unused-imports": "^2.0.0", "jest": "^29.2.1", "metro-react-native-babel-preset": "0.76.8", "prettier": "^2.4.1", "prop-types": "^15.5.10", "react-native-svg-transformer": "^1.1.0", "react-test-renderer": "18.2.0", "typescript": "^5.2.2" }, "peerDependencies": { "@babel/core": "^7.0.0-0", "@babel/plugin-proposal-nullish-coalescing-operator": "^7.0.0-0", "@babel/plugin-proposal-optional-chaining": "^7.0.0-0", "@babel/plugin-transform-arrow-functions": "^7.0.0-0", "@babel/plugin-transform-shorthand-properties": "^7.0.0-0", "@babel/plugin-transform-template-literals": "^7.0.0-0", "react": "", "react-native": "" }, "engines": { "node": ">=16" }

Steps to reproduce

  1. Get a working version from 3.3.0 on react native 0.72.5
  2. Upgrade from 3.3.0 -> 3.5.4
  3. Pod update, clean build, and run via XCode 15 on iPhone 15 device.

Snack or a link to a repository

N/A

Reanimated version

3.5.4

React Native version

0.72.5

Platforms

iOS

JavaScript runtime

Hermes

Workflow

React Native

Architecture

Paper (Old Architecture)

Build type

Debug mode

Device

iOS simulator

Device model

iPhone 15 Pro

Acknowledgements

Yes

github-actions[bot] commented 8 months 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?

Latropos commented 8 months ago

Try cleaning cache, removing all node_modules and downloading them again, removing and regenerating .lock file if you have any etc.

Please also try running this with Android. Maybe you will get errors that will give us more information. However I am afraid we won't be able to help a lot without a repro.

piaskowyk commented 8 months ago

I can confirm that the regeneration of the .lock file should help. If not, we need to reopen the issue and work together on reproduction for this issue šŸ™

iamchrispham commented 8 months ago

@piaskowyk Regeneration of .lock files doesn't seem to help, if you're referring to the one in pods as well as yarn.lock.

iamchrispham commented 8 months ago

Confirming that this issue doesn't happen on Android, this seems specific to iOS.

riseworld27 commented 8 months ago

It's happening in android as well. I am using react-native 0.72.4 and react-native-reanimated 3.5.4.

cani1see commented 7 months ago

It's happening in android as well. I am using react-native 0.72.4 and react-native-reanimated 3.5.4.

+1 have you fix it?

ReactorCSA commented 7 months ago

Agree. I face same issue trying to bump reanimated version

emanuelboros commented 7 months ago

Is there a specific reason this was closed?

I am facing the same issue

vladyslavNiemtsev commented 6 months ago

@piaskowyk Hi! Looks like this issues has been repeated in other people. I can also confirm that this is repeated for me. I think removing yarn.lock is not a solution..

FBRAA commented 1 week ago

react-native 0.74.2 react-native-reanimated 3.12.1 issue is actual