-
Notifications
You must be signed in to change notification settings - Fork 24.5k
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
App is crashing after upgrading native version 0.74.3 to 0.76.3. #48065
Comments
Warning Missing reproducer: We could not detect a reproducible example in your issue report. Please provide either:
|
|
po [NSThread callStackSymbols] (lldb) bt
|
I just checked in physical device. App is still crashing at least in physical device got EXC_BREAKPOINT. check screenshot |
@hemant-mali-spg test the release version. |
@hizbullaharif , do you mean version 0.76.4? Were you able to reproduce this issue and fix it? |
=
is this still exists?if it exists i will try is it for both android and IOs . |
any news? |
@iiagodias @hizbullaharif Yes, I am still getting crash. even tried 0.76.5 latest patch. |
I'm on 0.76.5 and I'm having a problem |
duplicated of #47587. Please, follow the instructions I shared here and report which libraries the interop layer is trying to load. Also, provide a reproducer using this template where you only add the library that is causing the crash. In this way we can use the reproducers to look for a comprehensive fix that will make all these library work with the interop layer. |
Same error after upgrading from 0.72.0 to 0.76.0
My AppDelegate.mm is as follows
|
try to run from VS code terminal and comment the all entry code (index.ts or App.ts) and just print any simple msg and then see it is crashing or not. if not crashing then there will be issue with extra dependency that you are using at index.js file. |
@kapilw360 I have tried commenting out the entry code and it still crashed with the same error |
Did you apply the changes according to this while upgrading? check the below link select the versions and do files changes accordingly. |
I did upgrade the version using the provided link and resolved other build error along the way, now build succeeds but as soon as the app launches it crashes with the above error. |
then try to install error related dependency for checking purpose like react-native-health also comment the code background related code form Appdelegate.m also |
Can someone let me know if I should use the suggested versions from React Native Upgrade Helper or if I can use the latest versions of the packages? also is this good idea to migrate to 0.77.0-rc-6 ? |
you should use suggested versions from React Native Upgrade Helper with respected file changes. and for other third party dependency you can use any compatible versions. and also don't go beyond 0.76.5. (0.76.5 is stable version) |
Hello @cipolleschi @kapilw360, I read all your comments to resolve app crash issue but I didn't, just for an reference I update react-native 0.74.3 to 0.76.6. ios app build successfully done, but app crash. Here is the terminal log: Attaching the screenshot also: ![]() If anyone have solution please share, or if you want any other information let me know. |
@saif482 In your AppDelegate, you need to move the lines RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
[[RCTAppleHealthKit new] initializeBackgroundObservers:bridge]; AFTER the line BOOL appStarted = [super application:application didFinishLaunchingWithOptions:launchOptions]; Also, please don't create a new bridge, but add this import #import <React/RCTBridge+Private.h> And do this instead -RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
+RCTBridge *bridge = [RCTBridge currentBridge]; This will give you a proxy object with the New Architecture or the actual bridge with the legacy architecture. @hemant-mali-spg please do not upgrade to 0.77 until it is stable. We are aiming to release the new version next Monday, so it is close. @amitesh786 what's happening is that some module is doing something wrong when it is initialized. We had several reports of that, but every time is a different library. Can you check which module is creating the crash? You can provide us the name by following the instructions I reported here. Once we have the module name, we can try to look into the library. |
How about disabling Fabric in top of
|
Any updates for this? I still facing this issue on 0.76.6 |
Yes this did solved it thanks 🙏 |
@YohayBar @tero-paananen the solution of disabling the New Architecture is NOT a solution to the problem. @bima-aone what's the problem for you? What's crashing? |
I tried to upgrade from 0.75.3 to 0.76.6, @cipolleschi, and the building was successful, but when I tried to open it, it forced close, and when I tried to debug, I got the same error line as @amitesh786. this is my AppDelegate.mm
this is my package json; maybe it's a dependency issue
|
We found one problem in the turbomodule interop layer and this is the PR that should fix that: #49072 |
@cipolleschi when will the fix be available? I have the same problem. Thank you |
We first need to merge the fix in main. Then we have to pick it in the releases and release new versions of each react native. So far, it still need to land, so it will take a few more days... |
Summary: Pull Request resolved: #49072 We have instance of apps crashing when enabling the New Architecture because of the TurboModule interop layer. What's happening is that when the module is loaded, the TM Interop Layer tries to parse the method definition to expose them in JS. However, for some libraries in the Legacy Architecture, it is possible to define a method in Objective-C and to define a different signature in Swift. For example, the [`RNBluetoothClassic` library](https://github.com/kenjdavidson/react-native-bluetooth-classic) defines a selector in objective-c which [has the signature](https://github.com/kenjdavidson/react-native-bluetooth-classic/blob/main/ios/RNBluetoothClassic.m#L134-L136) ``` RCT_EXTERN_METHOD(available: (NSString *)deviceId resolver: (RCTPromiseResolveBlock)resolve rejecter: (RCTPromiseRejectBlock)reject) ``` And the method is inmplemented in Swift with [the signature](https://github.com/kenjdavidson/react-native-bluetooth-classic/blob/main/ios/RNBluetoothClassic.swift#L502-L505): ``` func availableFromDevice( _ deviceId: String, resolver resolve: RCTPromiseResolveBlock, rejecter reject: RCTPromiseRejectBlock ) ``` When the TurboModule interop layer tries to parse the method, it receives the `accept:resolver:rejecter:` signature, but that signature is not actually defined in as a method in the module instance, and it crashes. This crash was not happening in the Old Architecture, which was handling this case gracefully. Notice that the specific method from the example is not working in the Old Architecture either. However, the app is not crashing in the old architecture. This change adds the same graceful behaviors plus it adds a warning in development to notify the developer about which methods couldn't be found in the interface. Fixes: - #47587 - #48065 ## Changelog: [iOS][Fixed] - Avoid crashing the app when the InteropLayer can't find some methods in the native implementation. Reviewed By: javache Differential Revision: D68901734 fbshipit-source-id: 844d1bf29423d5c601b583540e86d57dfffd1428
Summary: Pull Request resolved: #49072 We have instance of apps crashing when enabling the New Architecture because of the TurboModule interop layer. What's happening is that when the module is loaded, the TM Interop Layer tries to parse the method definition to expose them in JS. However, for some libraries in the Legacy Architecture, it is possible to define a method in Objective-C and to define a different signature in Swift. For example, the [`RNBluetoothClassic` library](https://github.com/kenjdavidson/react-native-bluetooth-classic) defines a selector in objective-c which [has the signature](https://github.com/kenjdavidson/react-native-bluetooth-classic/blob/main/ios/RNBluetoothClassic.m#L134-L136) ``` RCT_EXTERN_METHOD(available: (NSString *)deviceId resolver: (RCTPromiseResolveBlock)resolve rejecter: (RCTPromiseRejectBlock)reject) ``` And the method is inmplemented in Swift with [the signature](https://github.com/kenjdavidson/react-native-bluetooth-classic/blob/main/ios/RNBluetoothClassic.swift#L502-L505): ``` func availableFromDevice( _ deviceId: String, resolver resolve: RCTPromiseResolveBlock, rejecter reject: RCTPromiseRejectBlock ) ``` When the TurboModule interop layer tries to parse the method, it receives the `accept:resolver:rejecter:` signature, but that signature is not actually defined in as a method in the module instance, and it crashes. This crash was not happening in the Old Architecture, which was handling this case gracefully. Notice that the specific method from the example is not working in the Old Architecture either. However, the app is not crashing in the old architecture. This change adds the same graceful behaviors plus it adds a warning in development to notify the developer about which methods couldn't be found in the interface. Fixes: - #47587 - #48065 ## Changelog: [iOS][Fixed] - Avoid crashing the app when the InteropLayer can't find some methods in the native implementation. Reviewed By: javache Differential Revision: D68901734 fbshipit-source-id: 844d1bf29423d5c601b583540e86d57dfffd1428
Hi @cipolleschi @cortinico @kapilw360 I would like to know if I can migrate to version 0.77 while still using the old architecture. I want to check this because version 0.77 supports Android API 35, and I would like to see if the accessibility issues are resolved after moving to 0.77. |
yes use ENV['RCT_NEW_ARCH_ENABLED'] = '0' in podfile (make sure Android new architecture is also disabled) |
|
@kapilw360 We will release a patch to 0.77 next week with the fix. |
Also im not able to apply maxFontSizeMultiplier in 0.76.3 RN version. did you fixed this one also ? or how i can manage this ? |
@cipolleschi when upgrading the app from 0.76.1 to 0.77.0, the app builds successfully but then crashes everytime. Is there a fix for that. |
We still need to ship a version of 0.77 with the fix. (This is the pick request for the fix, for context: reactwg/react-native-releases#772) |
Description
In my existing project i upgrade all version with native version and app is crashing.
here is the package.json file
{
"name": "wellness360",
"version": "0.0.1",
"IOS_VERSION": "1.22",
"IOS_BUILD_NUMBER": "0",
"ANDROID_VERSION": "1.0",
"ANDROID_BUILD_NUMBER": "38",
"private": true,
"scripts": {
"check-dependencies": "rnx-align-deps",
"fix-dependencies": "rnx-align-deps --write",
"prepare": "husky",
"postinstall": "husky",
"lint-staged": "lint-staged",
"android": "react-native run-android",
"ios": "react-native run-ios",
"lint": "eslint .",
"lint-error": "eslint --quiet .",
"code-format": "prettier . --write",
"start": "react-native start",
"test": "jest",
"type-check": "tsc",
"test:report": "jest --collectCoverage --coverageDirectory="./coverage" --ci --reporters=default --reporters=jest-junit --coverage",
"pod-install": "cd ios && RCT_NEW_ARCH_ENABLED=1 bundle exec pod install && cd ..",
"bundle:ios": "react-native bundle --entry-file='index.js' --bundle-output='./ios/main.jsbundle' --dev=false --platform='ios' --assets-dest='./ios'",
"check-updates": "yarn dlx npm-check-updates"
},
"lint-staged": {
".{js,jsx,ts,tsx}": [
"eslint",
"prettier --write"
],
".{css,scss,md,html}": [
"prettier --write"
]
},
"dependencies": {
"@datadog/mobile-react-native": "^2.4.4",
"@datadog/mobile-react-navigation": "^2.4.4",
"@gluestack-style/react": "^1.0.57",
"@gluestack-ui/config": "^1.1.20",
"@gluestack-ui/themed": "^1.1.61",
"@notifee/react-native": "^7.8.2",
"@react-native-async-storage/async-storage": "^2.0.0",
"@react-native-community/slider": "^4.5.5",
"@react-native-firebase/analytics": "^21.6.1",
"@react-native-firebase/app": "^21.6.1",
"@react-native-firebase/crashlytics": "^21.6.1",
"@react-native-firebase/messaging": "^21.6.1",
"@react-native-masked-view/masked-view": "^0.3.0",
"@react-navigation/bottom-tabs": "^7.0.13",
"@react-navigation/drawer": "^7.0.13",
"@react-navigation/native": "^6.0.8",
"@react-navigation/native-stack": "^7.1.9",
"@react-navigation/stack": "^6.3.21",
"@reduxjs/toolkit": "^2.3.0",
"async-mutex": "^0.5.0",
"base-64": "^1.0.0",
"formik": "^2.4.6",
"i18next": "^24.0.2",
"lodash": "^4.17.21",
"lottie-react-native": "^7.1.0",
"lucide-react-native": "^0.462.0",
"mixpanel-react-native": "^3.0.8",
"moment": "^2.30.1",
"react": "18.3.1",
"react-dom": "^18.3.1",
"react-fast-compare": "^3.2.2",
"react-i18next": "^15.1.2",
"react-native": "^0.76.0",
"react-native-blob-util": "^0.19.11",
"react-native-calendars": "^1.1307.0",
"react-native-circular-progress": "^1.4.1",
"react-native-date-picker": "^5.0.7",
"react-native-device-info": "^14.0.1",
"react-native-document-picker": "^9.3.1",
"react-native-file-viewer": "^2.1.5",
"react-native-fs": "^2.18.0",
"react-native-gesture-handler": "^2.20.0",
"react-native-health": "^1.19.0",
"react-native-health-connect": "^3.3.1",
"react-native-htmlview": "^0.17.0",
"react-native-image-crop-picker": "^0.41.6",
"react-native-inappbrowser-reborn": "^3.7.0",
"react-native-keyboard-aware-scroll-view": "^0.9.5",
"react-native-mmkv": "^3.1.0",
"react-native-pdf": "^6.7.5",
"react-native-reanimated": "^3.16.1",
"react-native-render-html": "^6.1.0",
"react-native-safe-area-context": "^4.12.0",
"react-native-screens": "^3.34.0",
"react-native-svg": "^15.8.0",
"react-native-track-player": "^4.1.1",
"react-native-vector-icons": "^10.2.0",
"react-native-video": "^6.8.2",
"react-native-webview": "^13.12.2",
"react-native-youtube-iframe": "^2.3.0",
"react-redux": "^9.1.2",
"react-test-renderer": "18.3.1",
"redux-persist": "^6.0.0",
"rn-samsung-health": "github:wellness360inc/rn_shealth",
"url": "^0.11.4",
"victory-native": "^36.9.2-next.3",
"yup": "^1.4.0"
},
"resolutions": {
"react-dom": "18.3.1",
"react-native-reanimated": "3.14.0"
},
"devDependencies": {
"@babel/core": "^7.25.2",
"@babel/preset-env": "^7.25.3",
"@babel/runtime": "^7.25.0",
"@react-native-community/cli": "^15.0.0",
"@react-native-community/cli-platform-android": "^15.0.0",
"@react-native-community/cli-platform-ios": "^15.0.0",
"@react-native/babel-preset": "^0.76.0",
"@react-native/eslint-config": "0.76.3",
"@react-native/metro-config": "^0.76.0",
"@react-native/typescript-config": "0.76.3",
"@react-navigation/devtools": "^7.0.9",
"@rnx-kit/align-deps": "^3.0.2",
"@tsconfig/react-native": "^3.0.5",
"@types/base-64": "^1.0.2",
"@types/lodash": "^4.17.13",
"@types/react": "^18.2.6",
"@types/react-native-htmlview": "^0.16.5",
"@types/react-native-vector-icons": "^6.4.18",
"@types/react-native-video": "^5.0.20",
"@types/react-redux": "^7.1.34",
"@types/react-test-renderer": "^18.0.0",
"@typescript-eslint/eslint-plugin": "^8.16.0",
"@typescript-eslint/eslint-plugin-tslint": "^7.0.2",
"@typescript-eslint/parser": "^8.16.0",
"babel-jest": "^29.6.3",
"babel-plugin-inline-dotenv": "^1.7.0",
"babel-plugin-module-resolver": "^5.0.2",
"dotenv": "^16.4.5",
"eslint": "^9.15.0",
"eslint-config-prettier": "^9.1.0",
"eslint-config-react-app": "^7.0.1",
"eslint-config-react-native": "^4.1.0",
"eslint-define-config": "^2.1.0",
"eslint-plugin-ft-flow": "^3.0.11",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-jest": "^28.9.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react": "^7.37.2",
"eslint-plugin-react-hooks": "^5.0.0",
"husky": "^9.1.7",
"jest": "^29.2.1",
"lint-staged": "^15.2.10",
"metro-runtime": "^0.81.0",
"prettier": "3.4.1",
"react-test-renderer": "18.3.1",
"typescript": "^5.7.2"
},
"engines": {
"node": ">=18"
},
"packageManager": "yarn@3.6.4",
"rnx-kit": {
"kitType": "app",
"alignDeps": {
"requirements": [
"react-native@0.76"
],
"capabilities": [
"animation",
"babel-preset-react-native",
"core",
"core-android",
"core-ios",
"core/metro-config",
"filesystem",
"gestures",
"html",
"jest",
"masked-view",
"navigation/native",
"navigation/stack",
"react",
"react-dom",
"react-test-renderer",
"safe-area",
"screens",
"storage",
"svg",
"webview"
]
}
}
}
Steps to reproduce
Please go thought the attached vedio.
React Native Version
0.76.3
Affected Platforms
Runtime - iOS
Output of
npx react-native info
Stacktrace or Logs
Reproducer
Screenshots and Videos
Simulator.Screen.Recording.-.iPhone.16.Pro.-.2024-12-03.at.17.37.08.mp4
The text was updated successfully, but these errors were encountered: