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

App is crashing after upgrading native version 0.74.3 to 0.76.3. #48065

Open
kapilw360 opened this issue Dec 3, 2024 · 18 comments
Open

App is crashing after upgrading native version 0.74.3 to 0.76.3. #48065

kapilw360 opened this issue Dec 3, 2024 · 18 comments
Labels
Needs: Attention Issues where the author has responded to feedback. Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue.

Comments

@kapilw360
Copy link

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": "[email protected]",
"rnx-kit": {
"kitType": "app",
"alignDeps": {
"requirements": [
"[email protected]"
],
"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

System:
  OS: macOS 14.6.1
  CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
  Memory: 59.26 MB / 32.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 20.17.0
    path: /usr/local/bin/node
  Yarn:
    version: 3.6.4
    path: /usr/local/bin/yarn
  npm:
    version: 10.8.2
    path: /usr/local/bin/npm
  Watchman:
    version: 2024.11.04.00
    path: /usr/local/bin/watchman
Managers:
  CocoaPods:
    version: 1.16.2
    path: /Users/kapil/.rbenv/shims/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.0
      - iOS 18.0
      - macOS 15.0
      - tvOS 18.0
      - visionOS 2.0
      - watchOS 11.0
  Android SDK: Not Found
IDEs:
  Android Studio: 2024.1 AI-241.19072.14.2412.12360217
  Xcode:
    version: 16.0/16A242d
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.12
    path: /Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home/bin/javac
  Ruby:
    version: 3.2.2
    path: /Users/kapil/.rbenv/shims/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 15.1.2
    wanted: ^15.0.0
  react:
    installed: 18.3.1
    wanted: 18.3.1
  react-native:
    installed: 0.76.3
    wanted: ^0.76.0
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: true
  newArchEnabled: true

Stacktrace or Logs

[Firebase/Crashlytics] Version 11.5.0
+[RNFBSharedUtils getConfigBooleanValue:key:defaultValue:] [Line 155] RNFBCrashlyticsInit crashlytics_debug_enabled via RNFBJSON: 1
+[RNFBSharedUtils getConfigBooleanValue:key:defaultValue:] [Line 165] RNFBCrashlyticsInit crashlytics_debug_enabled final value: 1
+[RNFBCrashlyticsInitProvider isCrashlyticsCollectionEnabled] [Line 79] RNFBCrashlyticsInit specific key crashlytics_auto_collection_enabled not set, falling back to general key app_data_collection_default_enabled with default 1 if it does not exist.
+[RNFBSharedUtils getConfigBooleanValue:key:defaultValue:] [Line 162] RNFBCrashlyticsInit app_data_collection_default_enabled via RNFBMeta: 1
+[RNFBSharedUtils getConfigBooleanValue:key:defaultValue:] [Line 165] RNFBCrashlyticsInit app_data_collection_default_enabled final value: 1
+[RNFBCrashlyticsInitProvider componentsToRegister]_block_invoke [Line 129] RNFBCrashlyticsInit initialization successful
11.5.0 - [FirebaseCrashlytics][I-CLS000000] Crashlytics skipped rotating the Install ID during urgent mode because it is run on the main thread, which can't succeed. This can happen if the app crashed the last run and Crashlytics is uploading urgently.
11.5.0 - [FirebaseMessaging][I-FCM001000] FIRMessaging Remote Notifications proxy enabled, will swizzle remote notification receiver handlers. If you'd prefer to manually integrate Firebase Messaging, add "FirebaseAppDelegateProxyEnabled" to your Info.plist, and set it to NO. Follow the instructions at:
https://firebase.google.com/docs/cloud-messaging/ios/client#method_swizzling_in_firebase_messaging
to ensure proper integration.
[HealthKit] Background observers added to the app
11.5.0 - [FirebaseAnalytics][I-ACS023007] Analytics v.11.5.0 started
11.5.0 - [FirebaseAnalytics][I-ACS023008] To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see http://goo.gl/RfcP7r)
[HealthKit] Background delivery enabled for ActiveEnergyBurned
[HealthKit] Background observer set up for ActiveEnergyBurned
Sending `healthKit:ActiveEnergyBurned:setup:success` with no listeners registered.
libc++abi: terminating due to uncaught exception of type std::runtime_error: Feature flags were accessed before being overridden: fuseboxEnabledDebug

Reproducer

Screenshots and Videos

Simulator.Screen.Recording.-.iPhone.16.Pro.-.2024-12-03.at.17.37.08.mp4
@react-native-bot react-native-bot added Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. labels Dec 3, 2024
@react-native-bot
Copy link
Collaborator

Warning

Missing reproducer: We could not detect a reproducible example in your issue report. Please provide either:

@cortinico
Copy link
Contributor

  1. What's the crash? There is no stacktrace in the log you shared.
  2. Can you reproduce the crash somehow?

@kapilw360
Copy link
Author

po [NSThread callStackSymbols]
<_NSCallStackArray 0x600000cb4780>(
0 ??? 0x000000010c0eb8f5 0x0 + 4497258741,
1 Wellness360 0x000000010bf8e92b __debug_blank_executor_main + 0,
2 libsystem_c.dylib 0x00007ff80016fd25 abort + 134,
3 libc++abi.dylib 0x00007ff8002bd6f3 _ZN10__cxxabiv130__aligned_malloc_with_fallbackEm + 0,
4 libc++abi.dylib 0x00007ff8002ae6a4 _ZL28demangling_terminate_handlerv + 240,
5 libobjc.A.dylib 0x00007ff80006a6c0 _ZL15_objc_terminatev + 104,
6 libc++abi.dylib 0x00007ff8002bcacb _ZSt11__terminatePFvvE + 6,
7 libc++abi.dylib 0x00007ff8002bca86 _ZSt9terminatev + 54,
8 libdispatch.dylib 0x000000010c545eda _dispatch_client_callout + 28,
9 libdispatch.dylib 0x000000010c549878 _dispatch_block_invoke_direct + 496,
10 FrontBoardServices 0x00007ff808595e5c FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK + 30,
11 FrontBoardServices 0x00007ff808595d36 -[FBSMainRunLoopSerialQueue _targetQueue_performNextIfPossible] + 188,
12 FrontBoardServices 0x00007ff808595e84 -[FBSMainRunLoopSerialQueue _performNextFromRunLoopSource] + 19,
CoreFoundation 0x00007ff80042991e CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17,
14 CoreFoundation 0x00007ff800429860 __CFRunLoopDoSource0 + 157,
15 CoreFoundation 0x00007ff8004290bf __CFRunLoopDoSources0 + 293,
16 CoreFoundation 0x00007ff800423774 __CFRunLoopRun + 960,
17 CoreFoundation 0x00007ff800422fb3 CFRunLoopRunSpecific + 536,
18 GraphicsServices 0x00007ff8118c20cb GSEventRunModal + 137,
19 UIKitCore 0x00007ff806400c3b -[UIApplication _run] + 875,
20 UIKitCore 0x00007ff806405b7c UIApplicationMain + 123,
21 Wellness360.debug.dylib 0x0000000112e32ee0 __debug_main_executable_dylib_entry_point + 96,
22 dyld 0x000000010c402478 start_sim + 10,
23 ??? 0x0000000119f97345 0x0 + 4730745669
)

(lldb) bt

  • thread nil #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
    frame #0: 0x000000010ca90db6 libsystem_kernel.dylib__pthread_kill + 10 frame #1: 0x000000010c4d4ebd libsystem_pthread.dylibpthread_kill + 262
    frame pthread.h not found #2: 0x00007ff80016fd25 libsystem_c.dylibabort + 134 frame #3: 0x00007ff8002bd6f3 libc++abi.dylibabort_message + 258
    frame Set UIStatusBarStyleLightContent #4: 0x00007ff8002ae6a4 libc++abi.dylibdemangling_terminate_handler() + 240 frame #5: 0x00007ff80006a6c0 libobjc.A.dylib_objc_terminate() + 104
    frame Renamed hasMove to hasMark #6: 0x00007ff8002bcacb libc++abi.dylibstd::__terminate(void (*)()) + 6 frame #7: 0x00007ff8002bca86 libc++abi.dylibstd::terminate() + 54
    frame Support webpack-dev-server #8: 0x00007ff80008c288 libobjc.A.dylibobjc_terminate + 9 frame #9: 0x000000010c545eda libdispatch.dylib_dispatch_client_callout + 28
    frame How do I use superagent from react-native? #10: 0x000000010c549878 libdispatch.dylib_dispatch_block_invoke_direct + 496 frame #11: 0x00007ff808595e5c FrontBoardServicesFBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK + 30
    frame Running on device should be possible #12: 0x00007ff808595d36 FrontBoardServices-[FBSMainRunLoopSerialQueue _targetQueue_performNextIfPossible] + 188 frame #13: 0x00007ff808595e84 FrontBoardServices-[FBSMainRunLoopSerialQueue _performNextFromRunLoopSource] + 19
    frame Add response headers to XMLHttpRequest #14: 0x00007ff80042991e CoreFoundation__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17 frame #15: 0x00007ff800429860 CoreFoundation__CFRunLoopDoSource0 + 157
    frame Improve error when forgetting to npm install #16: 0x00007ff8004290bf CoreFoundation__CFRunLoopDoSources0 + 293 frame #17: 0x00007ff800423774 CoreFoundation__CFRunLoopRun + 960
    frame Add .DS_Store to gitignore #18: 0x00007ff800422fb3 CoreFoundationCFRunLoopRunSpecific + 536 frame #19: 0x00007ff8118c20cb GraphicsServicesGSEventRunModal + 137
    frame npm start fails with "Watcher took too long to load" #20: 0x00007ff806400c3b UIKitCore-[UIApplication _run] + 875 frame #21: 0x00007ff806405b7c UIKitCoreUIApplicationMain + 123

@github-actions github-actions bot added Needs: Attention Issues where the author has responded to feedback. and removed Needs: Author Feedback labels Dec 3, 2024
@hemant-mali-spg
Copy link

I just checked in physical device. App is still crashing at least in physical device got EXC_BREAKPOINT. check screenshot

Screenshot 2024-12-06 at 4 09 09 PM

@kapilw360 @cortinico

@hizbullaharif
Copy link

hizbullaharif commented Dec 9, 2024

@hemant-mali-spg test the release version.

@hemant-mali-spg
Copy link

@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?

@hizbullaharif
Copy link

=

@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 .

@iiagodias
Copy link

any news?

@hemant-mali-spg
Copy link

hemant-mali-spg commented Dec 20, 2024

@iiagodias @hizbullaharif Yes, I am still getting crash. even tried 0.76.5 latest patch.

@iiagodias
Copy link

@iiagodias @hizbullaharifSim, ainda estou tendo travamentos. Até tentei o último patch 0.76.5.

I'm on 0.76.5 and I'm having a problem

@cipolleschi
Copy link
Contributor

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.

@saif482
Copy link

saif482 commented Jan 7, 2025

Same error after upgrading from 0.72.0 to 0.76.0

[TSBackgroundFetch load]: (
)
[TSBGAppRefreshSubscriber load]: {
}
[TSBackgroundFetch registerForTaskWithIdentifier: com.transistorsoft.customtask
[HealthKit] Background observers added to the app
libc++abi: terminating due to uncaught exception of type std::runtime_error: Feature flags were accessed before being overridden: fuseboxEnabledDebug

My AppDelegate.mm is as follows

#import "AppDelegate.h"
#import <Firebase.h>
#import <React/RCTBundleURLProvider.h>
#import <React/RCTLinkingManager.h>
#import <React/RCTRootView.h>
#import <RNSpotifyRemote.h>
#import <UserNotifications/UserNotifications.h>
#import <RNCPushNotificationIOS.h>
#import <AuthenticationServices/AuthenticationServices.h>
#import <SafariServices/SafariServices.h>
#import <FBSDKCoreKit/FBSDKCoreKit-Swift.h>
#import <GoogleSignIn/GoogleSignIn.h>
#import "RCTAppleHealthKit.h"
// IMPORTANT:  Paste import ABOVE the DEBUG macro
#import <TSBackgroundFetch/TSBackgroundFetch.h>

@implementation AppDelegate

- (BOOL)application:(UIApplication *)app
   openURL:(NSURL *)url
   options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
{
  if ([[FBSDKApplicationDelegate sharedInstance] application:app openURL:url options:options]) {
    return YES;
  }

  if ([RCTLinkingManager application:app openURL:url options:options]) {
    return YES;
  }

  if ([GIDSignIn.sharedInstance handleURL:url]) {
    return YES;
  }

  return [[RNSpotifyRemoteAuth sharedInstance] application:app openURL:url options:options];
}

- (BOOL)application:(UIApplication *)application continueUserActivity:(nonnull NSUserActivity *)userActivity
 restorationHandler:(nonnull void (^)(NSArray<id<UIUserActivityRestoring>> * _Nullable))restorationHandler
{
 return [RCTLinkingManager application:application
                  continueUserActivity:userActivity
                    restorationHandler:restorationHandler];
}

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
  [[TSBackgroundFetch sharedInstance] didFinishLaunching];
  [[FBSDKApplicationDelegate sharedInstance] application:application
                          didFinishLaunchingWithOptions:launchOptions];

  self.moduleName = @"FinchX";
  // You can add your custom initial props in the dictionary below.
  // They will be passed down to the ViewController used by React Native.
  self.initialProps = @{};

  RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
  [[RCTAppleHealthKit new] initializeBackgroundObservers:bridge];

  UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter];
  center.delegate = self;

  if (launchOptions != nil)
  {
    NSDictionary* userInfo = [launchOptions objectForKey:UIApplicationLaunchOptionsRemoteNotificationKey];
    if (userInfo != nil)
    {
    [self performSelector:@selector(callNotification:) withObject: userInfo afterDelay:40];
    }
  }
  
  BOOL appStarted = [super application:application didFinishLaunchingWithOptions:launchOptions];
  if ([FIRApp defaultApp] == nil) {
  [FIRApp configure];
  }
  return appStarted;
}

- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
{
  return [self bundleURL];
}
 
- (NSURL *)bundleURL
{
#if DEBUG
  return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
#else
  return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
#endif
}

// Push Notification Handling (RNCPushNotificationIOS)

- (void)application:(UIApplication *)application
    didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
  [RNCPushNotificationIOS didRegisterForRemoteNotificationsWithDeviceToken:deviceToken];
}

- (void)application:(UIApplication *)application
    didReceiveRemoteNotification:(NSDictionary *)userInfo
          fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler {
  [RNCPushNotificationIOS didReceiveRemoteNotification:userInfo fetchCompletionHandler:completionHandler];
}

- (void)application:(UIApplication *)application
    didFailToRegisterForRemoteNotificationsWithError:(NSError *)error {
  [RNCPushNotificationIOS didFailToRegisterForRemoteNotificationsWithError:error];
}

- (void)userNotificationCenter:(UNUserNotificationCenter *)center
    didReceiveNotificationResponse:(UNNotificationResponse *)response
                withCompletionHandler:(void (^)(void))completionHandler {
  [RNCPushNotificationIOS didReceiveNotificationResponse:response];
  completionHandler();
}

- (void)userNotificationCenter:(UNUserNotificationCenter *)center
    willPresentNotification:(UNNotification *)notification
          withCompletionHandler:(void (^)(UNNotificationPresentationOptions options))completionHandler {
  completionHandler(UNNotificationPresentationOptionSound | UNNotificationPresentationOptionAlert | UNNotificationPresentationOptionBadge);
}

-(void) callNotification: (NSDictionary*) userInfo {
[RNCPushNotificationIOS didReceiveRemoteNotification:userInfo];
}

@end

@kapilw360
Copy link
Author

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.

@saif482
Copy link

saif482 commented Jan 7, 2025

@kapilw360 I have tried commenting out the entry code and it still crashed with the same error

@kapilw360
Copy link
Author

Did you apply the changes according to this while upgrading? check the below link select the versions and do files changes accordingly.

https://react-native-community.github.io/upgrade-helper/

@saif482
Copy link

saif482 commented Jan 7, 2025

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.

@kapilw360
Copy link
Author

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

@hemant-mali-spg
Copy link

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 ?

@cipolleschi @kapilw360

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Attention Issues where the author has responded to feedback. Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue.
Projects
None yet
Development

No branches or pull requests

8 participants