React-native-firebase: [🐛] Crashlytics 8.4.2 not collecting on iOS with pods 6.31?

Created on 8 Sep 2020  ·  80Comments  ·  Source: invertase/react-native-firebase

[EDITED by @mikehardy 20200913]: it appears the pods 6.28 may work fine with our @react-native-firebase/crashlytics@^8.4.2, but that pods 6.31 does not. This is an area of active investigation. But you may try overriding pods to 6.28 for now. https://rnfirebase.io/#ios

Original issue follows:


Issue



I just upgraded @react-native-firebase/crashlytics from 6.4.0 to 8.4.2. Crash report from iOS didn't displayed on Firebase Console Dashboard.

What I've Done

  • Read https://github.com/invertase/react-native-firebase/issues/3879
  • removed all fabric related code/config from xschme, project.pbxproj, podfile, podfile.lock
  • added firebase.json
  • ran crashlytics().setCrashlyticsCollectionEnabled(true); in app code
  • triggered crash using crashlytics().crash()
  • Built on Debug and Release mode.
  • Last but not least, wait 8 hours

After all things i've done, nothing resulted to displaying error on my Firebase Console.

This log displayed immediately after app builded and ran on my phone.

[Firebase/Crashlytics] Version 4.4.0
6.30.0 - [Firebase/Crashlytics][I-CLS000000] [Crashlytics] Running on iPhone9,3, 13.7.0 (17H35)
6.30.0 - [Firebase/Crashlytics][I-CLS000000] Root: /var/mobile/Containers/Data/Application/7529E6A5-A2B7-42E4-929B-AF26A1E622AA/Library/Caches/com.crashlytics.data/id.flip.debug
6.30.0 - [Firebase/Crashlytics][I-CLS000000] [Crashlytics:Crash:Reports:Event] Registered Firebase Analytics event listener
6.30.0 - [Firebase/Crashlytics][I-CLS000000] Automatic data collection is disabled.
6.30.0 - [Firebase/Crashlytics][I-CLS000000] [Crashlytics:Crash] There are no unsent reports.

Sometimes, 1 unsent reports are available. Checking for upload permission. displayed on console. But, nothing happened after I trigger crashlytics().sendUnsentReports();

[Firebase/Crashlytics] Version 4.4.0
6.30.0 - [Firebase/Crashlytics][I-CLS000000] [Crashlytics] Running on iPhone9,3, 13.7.0 (17H35)
6.30.0 - [Firebase/Crashlytics][I-CLS000000] [Crashlytics:Settings] No settings were cached
se/Crashlytics][I-CLS000000] Root: /var/mobile/Containers/Data/Application/AE3C2DEF-A21A-4722-8F8F-E4B24DDBC49A/Library/Caches/com.crashlytics.data/id.flip.debug
6.30.0 - [Firebase/Crashlytics][I-CLS000000] [Crashlytics:Crash:Reports:Event] Registered Firebase Analytics event listener
6.30.0 - [Firebase/Crashlytics][I-CLS000000] Automatic data collection is disabled.
6.30.0 - [Firebase/Crashlytics][I-CLS000000] [Crashlytics:Crash] 1 unsent reports are available. Checking for upload permission.
6.30.0 - [Firebase/Crashlytics][I-CLS000000] [Crashlytics:Crash] Notifying that unsent reports are available.
6.30.0 - [Firebase/Crashlytics][I-CLS000000] [Crashlytics:Crash] Waiting for send/deleteUnsentReports to be called.

I also followed this suggestion. I added

<key>FirebaseCrashlyticsCollectionEnabled</key>
    <true/>

to Info.plist and it gave result.

[Firebase/Crashlytics] Version 4.4.0
6.30.0 - [Firebase/Crashlytics][I-CLS000000] [Crashlytics] Running on iPhone9,3, 13.7.0 (17H35)
6.30.0 - [Firebase/Crashlytics][I-CLS000000] Root: /var/mobile/Containers/Data/Application/B14705F3-E1B1-4C0A-87F0-979DB5891E46/Library/Caches/com.crashlytics.data/id.flip.debug
6.30.0 - [Firebase/Crashlytics][I-CLS000000] [Crashlytics:Crash:Reports:Event] Registered Firebase Analytics event listener
6.30.0 - [Firebase/Crashlytics][I-CLS000000] Automatic data collection is enabled.
6.30.0 - [Firebase/Crashlytics][I-CLS000000] Unsent reports will be uploaded at startup

we may highlighted Automatic data collection is enabled. but no crash appeared on firebase console.

On device log, It displayed this error
image


Project Files






Javascript

Click To Expand

#### `package.json`:

"dependencies": {
    "@react-native-community/async-storage": "^1.8.1",
    "@react-native-community/cameraroll": "^1.7.2",
    "@react-native-community/netinfo": "^5.6.2",
    "@react-native-community/push-notification-ios": "^1.0.7",
    "@react-native-community/viewpager": "^3.3.0",
    "@react-native-firebase/analytics": "^7.6.1",
    "@react-native-firebase/app": "^8.4.1",
    "@react-native-firebase/crashlytics": "^8.4.2",
    "@react-native-firebase/dynamic-links": "^7.5.2",
    "@react-native-firebase/in-app-messaging": "^7.4.2",
    "@react-native-firebase/messaging": "^7.8.4",
    "@react-native-firebase/perf": "^7.4.2",
    "@react-native-firebase/remote-config": "^9.0.3",
    "appcenter": "^3.0.0",
    "appcenter-analytics": "^3.0.0",
    "appcenter-crashes": "^3.0.0",
    "apsl-react-native-button": "^3.1.1",
    "assert": "^1.4.1",
    "babel-plugin-transform-remove-console": "^6.8.5",
    "crypto-js": "^3.1.9-1",
    "lodash": "^4.17.15",
    "lottie-ios": "^3.1.8",
    "lottie-react-native": "^3.4.0",
    "memoize-one": "^5.1.1",
    "moment": "^2.15.0",
    "moment-timezone": "^0.5.31",
    "prop-types": "^15.7.2",
    "react": "16.9.0",
    "react-native": "^0.61.5",
    "react-native-appsflyer": "^5.2.0",
    "react-native-check-box": "^2.1.7",
    "react-native-code-push": "^6.1.0",
    "react-native-collapsible": "^1.5.1",
    "react-native-config": "^0.11.7",
    "react-native-device-info": "^5.3.1",
    "react-native-emoji": "git+https://github.com/jorilallo/react-native-emoji.git",
    "react-native-fbsdk": "^1.1.2",
    "react-native-freshchat-sdk": "2.6.3",
    "react-native-gesture-handler": "^1.3.0",
    "react-native-hyperlink": "0.0.19",
    "react-native-image-picker": "git+https://github.com/abdullahizzuddiin/react-native-image-picker.git",
    "react-native-intercom": "^13.2.0",
    "react-native-keyboard-aware-scroll-view": "^0.9.1",
    "react-native-linear-gradient": "^2.5.6",
    "react-native-material-dropdown": "^0.11.1",
    "react-native-modalbox": "^2.0.0",
    "react-native-onesignal": "git+https://github.com/abdullahizzuddiin/react-native-onesignal.git",
    "react-native-photo-view": "git+https://github.com/alwx/react-native-photo-view.git",
    "react-native-reanimated": "^1.7.0",
    "react-native-router-flux": "^4.2.0",
    "react-native-screens": "^2.3.0",
    "react-native-scrollable-tab-view": "git+https://github.com/abdullahizzuddiin/react-native-scrollable-tab-view.git",
    "react-native-select-contact": "^1.3.2",
    "react-native-simple-toast": "^1.0.0",
    "react-native-spinkit": "^1.5.0",
    "react-redux": "^7.2.0",
    "redux": "^4.0.5",
    "redux-thunk": "^2.3.0",
    "rn-fetch-blob": "^0.12.0",
    "stream-browserify": "^2.0.1",
    "timers-browserify": "^2.0.10",
    "tty-browserify": "0.0.1",
    "url": "^0.11.0",
    "vm-browserify": "1.0.1",
    "warning": "^3.0.0"
  },
  "devDependencies": {
    "@babel/core": "^7.6.2",
    "@babel/runtime": "^7.6.2",
    "@react-native-community/eslint-config": "^0.0.5",
    "@typescript-eslint/eslint-plugin": "^3.8.0",
    "@typescript-eslint/parser": "^3.8.0",
    "babel-jest": "^24.9.0",
    "babel-plugin-module-resolver": "^4.0.0",
    "eslint": "^6.5.1",
    "eslint-import-resolver-babel-module": "^5.1.2",
    "eslint-plugin-import": "^2.22.0",
    "eslint-plugin-module-resolver": "^1.0.0",
    "eslint-plugin-react-native": "^3.8.1",
    "jest": "^24.9.0",
    "jetifier": "^1.6.3",
    "metro-react-native-babel-preset": "^0.56.0",
    "react-devtools": "3.6.2",
    "react-test-renderer": "16.9.0",
    "reactotron-react-native": "^2.1.0",
    "typescript": "^3.9.7"
  }
#### `firebase.json` for react-native-firebase v6:
{
  "react-native": {
    "crashlytics_debug_enabled": true,
    "crashlytics_disable_auto_disabler": true,
  }
}
### iOS
Click To Expand

#### `ios/Podfile`: - [ ] I'm not using Pods - [x] I'm using Pods and my Podfile looks like:

# Uncomment the next line to define a global platform for your project
platform :ios, '10.0'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

target 'AppName' do
  # Pods for your project
  pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
  pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"
  pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"
  pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"
  pod 'React', :path => "../node_modules/react-native/"
  pod 'React-Core', :path => "../node_modules/react-native/"
  pod 'React-CoreModules', :path => "../node_modules/react-native/React/CoreModules"
  pod 'React-Core/DevSupport', :path => "../node_modules/react-native/"
  pod 'React-RCTActionSheet', :path => "../node_modules/react-native/Libraries/ActionSheetIOS"
  pod 'React-RCTAnimation', :path => "../node_modules/react-native/Libraries/NativeAnimation"
  pod 'React-RCTBlob', :path => "../node_modules/react-native/Libraries/Blob"
  pod 'React-RCTImage', :path => "../node_modules/react-native/Libraries/Image"
  pod 'React-RCTLinking', :path => "../node_modules/react-native/Libraries/LinkingIOS"
  pod 'React-RCTNetwork', :path => "../node_modules/react-native/Libraries/Network"
  pod 'React-RCTSettings', :path => "../node_modules/react-native/Libraries/Settings"
  pod 'React-RCTText', :path => "../node_modules/react-native/Libraries/Text"
  pod 'React-RCTVibration', :path => "../node_modules/react-native/Libraries/Vibration"
  pod 'React-Core/RCTWebSocket', :path => "../node_modules/react-native/"
  pod 'React-cxxreact', :path => "../node_modules/react-native/ReactCommon/cxxreact"
  pod 'React-jsi', :path => "../node_modules/react-native/ReactCommon/jsi"
  pod 'React-jsiexecutor', :path => "../node_modules/react-native/ReactCommon/jsiexecutor"
  pod 'React-jsinspector', :path => "../node_modules/react-native/ReactCommon/jsinspector"
  pod 'ReactCommon/jscallinvoker', :path => "../node_modules/react-native/ReactCommon"
  pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"
  pod 'Yoga', :path => "../node_modules/react-native/ReactCommon/yoga"
  pod 'DoubleConversion', :podspec => "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec"
  pod 'glog', :podspec => "../node_modules/react-native/third-party-podspecs/glog.podspec"
  pod 'Folly', :podspec => "../node_modules/react-native/third-party-podspecs/Folly.podspec"

  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
  # use_frameworks!

  # Pods for AppName
  pod 'AppCenter/Crashes'
  pod 'AppCenter/Analytics'
  pod 'AppCenterReactNativeShared'

  pod 'FBSDKLoginKit'
  pod 'FBSDKShareKit'

  pod 'Intercom'
  pod 'ZendeskSupportSDK'
  pod 'OneSignal', '>= 2.14.2', '< 3.0'

  pod 'RNDeviceInfo', :path => '../node_modules/react-native-device-info'
  pod 'RNCPushNotificationIOS', :path => '../node_modules/@react-native-community/push-notification-ios'
  pod 'RCTSelectContact', :path => '../node_modules/react-native-select-contact'

  pod 'react-native-cameraroll', :path => '../node_modules/@react-native-community/cameraroll'

  target 'AppNameTests' do
    inherit! :search_paths
    # Pods for testing
  end

  use_native_modules!

  post_install do |installer|
    installer.pods_project.targets.each do |target|
      if target.name == 'react-native-config'
        phase = target.project.new(Xcodeproj::Project::Object::PBXShellScriptBuildPhase)
        phase.shell_script = "cd ../../"\
                             " && RNC_ROOT=./node_modules/react-native-config/"\
                             " && export SYMROOT=$RNC_ROOT/ios/ReactNativeConfig"\
                             " && export BUILD_DIR=$RNC_ROOT/ios/ReactNativeConfig"\
                             " && ruby $RNC_ROOT/ios/ReactNativeConfig/BuildDotenvConfig.ruby"

        target.build_phases << phase
        target.build_phases.move(phase,0)
      end
      if target.name == "React"
        target.remove_from_project
      end
    end
  end
end

target 'AppName-tvOS' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
  # use_frameworks!

  # Pods for AppName-tvOS

  target 'AppName-tvOSTests' do
    inherit! :search_paths
    # Pods for testing
  end

end

target 'OneSignalNotificationServiceExtension' do
  pod 'OneSignal', '>= 2.14.2', '< 3.0'
end

pre_install do |installer|
  # workaround for https://github.com/CocoaPods/CocoaPods/issues/3289
  Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
end
#### `AppDelegate.m`:
/*
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

#import <React/RCTBridge.h>
#import <React/RCTLog.h>
#import "Intercom/intercom.h"
#import "FreshchatSDK.h"

#import "AppDelegate.h"
#import <AppCenterReactNative.h>
#import <AppCenterReactNativeAnalytics.h>
#import <AppCenterReactNativeCrashes.h>
#import <CodePush/CodePush.h>
#import <FBSDKCoreKit/FBSDKCoreKit.h>
#import <RNCPushNotificationIOS.h>

#import <React/RCTLinkingManager.h>
#if __has_include(<AppsFlyerLib/AppsFlyerTracker.h>)
#import <AppsFlyerLib/AppsFlyerTracker.h>
#else
#import "AppsFlyerTracker.h"
#endif

#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>
@import SupportSDK;
@import ZendeskCoreSDK;
@import Firebase;
@import AppsFlyerLib;

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
  //enable debug on release mode, disable when release to user or in debug mode
  //RCTSetLogThreshold(RCTLogLevelInfo - 1);

  // Intercom
  [Intercom setApiKey:@""];

  // Dynamic Links
  [FIROptions defaultOptions].deepLinkURLScheme = @"id.AppName.release";

  // Firebase init
  [FIRApp configure];

  // Freshchat init
  NSString *FRESHCHAT_APP_ID = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"FreshchatAppId"];
  NSString *FRESHCHAT_APP_KEY = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"FreshchatAppKey"];

  FreshchatConfig *config = [[FreshchatConfig alloc]initWithAppID:FRESHCHAT_APP_ID  andAppKey:FRESHCHAT_APP_KEY];
  config.gallerySelectionEnabled = YES;
  config.cameraCaptureEnabled = YES;
  config.teamMemberInfoVisible = YES;
  config.showNotificationBanner = YES;
  config.responseExpectationVisible = YES;
  config.domain = @"msdk.au.freshchat.com";
  [[Freshchat sharedInstance] initWithConfig:config];

  [ZDKZendesk initializeWithAppId: @""
    clientId: @""
    zendeskUrl: @""];
  [ZDKSupport initializeWithZendesk: [ZDKZendesk instance]];
  id<ZDKObjCIdentity> userIdentity = [[ZDKObjCAnonymous alloc] initWithName:nil email:nil];
  [[ZDKZendesk instance] setIdentity:userIdentity];


  [AppCenterReactNativeCrashes registerWithAutomaticProcessing];  // Initialize AppCenter crashes

  [AppCenterReactNativeAnalytics registerWithInitiallyEnabled:true];  // Initialize AppCenter analytics

  [AppCenterReactNative register];  // Initialize AppCenter

  [[FBSDKApplicationDelegate sharedInstance] application:application
                           didFinishLaunchingWithOptions:launchOptions];

   RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
   RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
                                                     moduleName:@"AppName"
                                              initialProperties:nil];


  // Sentry init
  UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter];
  center.delegate = self;


  rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];

  self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
  UIViewController *rootViewController = [UIViewController new];
  rootViewController.view = rootView;
  self.window.rootViewController = rootViewController;
  [self.window makeKeyAndVisible];

  return YES;
}

- (BOOL)application:(UIApplication *)application
    openURL:(NSURL *)url
        options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {

    [[AppsFlyerTracker sharedTracker] handleOpenUrl:url options:options];

    BOOL handled = [[FBSDKApplicationDelegate sharedInstance] application:application
        openURL:url
            sourceApplication:options[UIApplicationOpenURLOptionsSourceApplicationKey]
            annotation:options[UIApplicationOpenURLOptionsAnnotationKey]
            ];

    return handled;
}

//Universal Links (iOS 9 +)
- (BOOL)application:(UIApplication *)application continueUserActivity:(nonnull NSUserActivity *)userActivity restorationHandler:(nonnull void (^)(NSArray<id<UIUserActivityRestoring>> * _Nullable))restorationHandler {
  [[AppsFlyerTracker sharedTracker] continueUserActivity:userActivity restorationHandler:restorationHandler];
  return YES;
}

- (void)applicationDidBecomeActive:(UIApplication *)application{
  /* Reset badge app count if so desired */
}

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

  // notify AppsFlyerTracker
  [[AppsFlyerTracker sharedTracker] registerUninstall:deviceToken];
  // Intercom
  [Intercom setDeviceToken:deviceToken];
  // Freshchat
  [[Freshchat sharedInstance] setPushRegistrationToken:deviceToken];
}

- (void) application:(UIApplication *)app didReceiveRemoteNotification:(NSDictionary *)info{
}

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

  [self processPaymentInfo: userInfo];

  if ([[Freshchat sharedInstance]isFreshchatNotification:userInfo]) {
    [[Freshchat sharedInstance]handleRemoteNotification:userInfo andAppstate:application.applicationState];
  }
}

/* For devices running on ios 10 and above */
- (void)userNotificationCenter:(UNUserNotificationCenter *)center
       willPresentNotification:(UNNotification *)notification
         withCompletionHandler:(void (^)(UNNotificationPresentationOptions options))completionHandler {
          if ([[Freshchat sharedInstance]isFreshchatNotification:notification.request.content.userInfo]) {
            [[Freshchat sharedInstance]handleRemoteNotification:notification.request.content.userInfo andAppstate:[[UIApplication sharedApplication] applicationState]];
            completionHandler( UNAuthorizationOptionSound );
          } else {
              completionHandler( UNAuthorizationOptionAlert | UNAuthorizationOptionSound | UNAuthorizationOptionBadge );
          }
}

/* For devices running on ios 10 and above */
- (void)userNotificationCenter:(UNUserNotificationCenter *)center
didReceiveNotificationResponse:(UNNotificationResponse *)response
         withCompletionHandler:(void (^)(void))completionHandler {
  if ([[Freshchat sharedInstance]isFreshchatNotification:response.notification.request.content.userInfo]) {
    [[Freshchat sharedInstance]handleRemoteNotification:response.notification.request.content.userInfo andAppstate:[[UIApplication sharedApplication] applicationState]];
  }
  completionHandler();
}

- (void)application:(UIApplication *)application didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings
{
  [RNCPushNotificationIOS didRegisterUserNotificationSettings:notificationSettings];
}

// Required for the registrationError event.
- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error
{
  [RNCPushNotificationIOS didFailToRegisterForRemoteNotificationsWithError:error];
}
// Required for the localNotification event.
- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification
{
  [RNCPushNotificationIOS didReceiveLocalNotification:notification];
}

- (void)processPaymentInfo:(NSDictionary *) additionalData
{
  NSLog(@"ON NOTIFICATION PROCESSING");
  NSLog(@"%@", additionalData);

  NSLog(@"Finishing payment transaction");
  @try {
    int fee = [[additionalData valueForKey:@"biaya"] intValue];
    int status = [[additionalData valueForKey:@"statusTransaksi"] intValue];
    int transactionId = [[additionalData valueForKey:@"idTransaksi"] intValue];
    int transactionType = [[additionalData valueForKey:@"jenis_transaksi"] intValue];

    if (fee > 0 && status == 2) {
      [self finishPayment:transactionId withFee:fee];
    } else if (fee > 0 && status == 6 && transactionType == 6) {
      [self refundPayment:transactionId withFee:fee];
    }

  } @catch (NSException* e) {
    NSLog(@"Payment info exception => %@", e);
  }
}

- (void)finishPayment:(int) transactionId withFee:(int) fee {

  [FIRAnalytics logEventWithName:kFIREventEcommercePurchase parameters:@{
    kFIRParameterTransactionID: [NSString stringWithFormat:@"%d", transactionId],
    kFIRParameterValue: [NSString stringWithFormat:@"%d", fee],
    kFIRParameterCurrency: @"IDR"
  }];
}

- (void)refundPayment:(int) transactionId withFee:(int) fee {
  [FIRAnalytics logEventWithName:kFIREventPurchaseRefund parameters:@{
    kFIRParameterTransactionID: [NSString stringWithFormat:@"%d", transactionId],
    kFIRParameterValue: [NSString stringWithFormat:@"%d", fee],
    kFIRParameterCurrency: @"IDR"
  }];
}

- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
{
  #if DEBUG
    return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
  #else
    return [CodePush bundleURL];
  #endif
}


@end


Android

Click To Expand

#### Have you converted to AndroidX? - [ ] my application is an AndroidX application? - [ ] I am using `android/gradle.settings` `jetifier=true` for Android compatibility? - [ ] I am using the NPM package `jetifier` for react-native compatibility? #### `android/build.gradle`:

// N/A
#### `android/app/build.gradle`:
// N/A
#### `android/settings.gradle`:
// N/A
#### `MainApplication.java`:
// N/A
#### `AndroidManifest.xml`:
<!-- N/A -->


Environment

Click To Expand

**`react-native info` output:**

System:
    OS: macOS 10.15.6
    CPU: (4) x64 Intel(R) Core(TM) i5-5287U CPU @ 2.90GHz
    Memory: 18.34 MB / 8.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 14.5.0 - /usr/local/bin/node
    Yarn: 1.22.4 - /usr/local/bin/yarn
    npm: 6.14.5 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  IDEs:
    Android Studio: 4.0 AI-193.6911.18.40.6626763
    Xcode: /undefined - /usr/bin/xcodebuild
  npmPackages:
    react: 16.9.0 => 16.9.0 
    react-native: ^0.61.5 => 0.61.5

- **Platform that you're experiencing the issue on**: - [x] iOS - [ ] Android - [ ] **iOS** but have not tested behavior on Android - [ ] **Android** but have not tested behavior on iOS - [ ] Both - **`react-native-firebase` version you're using that has this issue:**
"@react-native-firebase/analytics": "^7.6.1",
"@react-native-firebase/app": "^8.4.1",
"@react-native-firebase/crashlytics": "^8.4.2",
"@react-native-firebase/dynamic-links": "^7.5.2",
"@react-native-firebase/in-app-messaging": "^7.4.2",
"@react-native-firebase/messaging": "^7.8.4",
"@react-native-firebase/perf": "^7.4.2",
"@react-native-firebase/remote-config": "^9.0.3",
- **`Firebase` module(s) you're using that has the issue:** - `e.g. Instance ID` - **Are you using `TypeScript`?** - `N`




General Needs Triage iOS Bug

Most helpful comment

From this :

    "@react-native-firebase/analytics": "^7.6.2",
    "@react-native-firebase/app": "^8.4.2",
    "@react-native-firebase/crashlytics": "^8.4.4", <--
    "@react-native-firebase/messaging": "^7.8.6",

To that :

    "@react-native-firebase/analytics": "^7.4.1",
    "@react-native-firebase/app": "^8.3.0",
    "@react-native-firebase/crashlytics": "8.3.0", <--
    "@react-native-firebase/messaging": "^7.6.1",

All 80 comments

as mentioned on #3879 I'm also seeing same issue, anything I can do to help please let me know!

Hi @rossjohnsonMP ,
thank you for you willing to help.

Do you have any idea/step/trick to do so my ios crash report can appeared on Firebase Console?

@abdullahizzuddiin that was more aimed at collaborators or maintainers, I can't help you as I'm in the same position :)

Please confirm these things https://github.com/invertase/react-native-firebase/issues/3879#issuecomment-676966635



    use 8.3.2 version or higher
    verify you have a firebase.json in your project - empty if it needs to be (separate issue logged)
    your firebase.json is well-formed JSON, parsing errors will cause silent failure (separate issue logged)
    have the correct keys set for disabling the auto disabler, etc like this perhaps:

{
  "react-native": {
    "crashlytics_disable_auto_disabler": true,
    "crashlytics_debug_enabled": true
  }
}

    run npx react-native-clean-project to make sure you are squeaky clean for your build
    build it and make sure the dSYMS are uploaded
    crash it and then restart the app
    wait a little bit and see ? crossed_fingers

For everyone that has confirmed all those things, we get a report of success.

I followed your suggestion step by step:

  • [x] use 8.3.2 version or higher
    Yes, I use 8.4.2 version
  • [x] verify you have a firebase.json in your project - empty if it needs to be (separate issue logged)
    Yes, code below is my firebase.json file's content
{
  "react-native": {
    "crashlytics_disable_auto_disabler": true,
    "crashlytics_debug_enabled": true
  }
}
  • [x] your firebase.json is well-formed JSON, parsing errors will cause silent failure (separate issue logged)
    Of course. I just copied-pasted from your suggestoin
  • [x] have the correct keys set for disabling the auto disabler, etc like this perhaps:
    Of course. I just copied-pasted from your suggestoin
  • [x] run npx react-native-clean-project to make sure you are squeaky clean for your build
    Clean node_modules, pod dir, build dir. I also did Product -> Clean before build.
  • [x] build it and make sure the dSYMS are uploaded
    Ran ./upload-symbols -gsp ../../GoogleService-Info.debug.plist -p ios ../../../../../AppName.app.dSYM/
    image
  • [x] crash it and then restart the app
  • [x] wait a little bit and see ? 🤞
    I've waited 15 minutes. Still no crash report appeared.
    image

Log appeared on console after my build finished and ran the app.

[Firebase/Crashlytics] Version 4.4.0
[Firebase/Crashlytics][I-CLS000000] [Crashlytics] Running on iPhone9,3, 13.7.0 (17H35)
[Firebase/Crashlytics][I-CLS000000] Root: /var/mobile/Containers/Data/Application/13ADBD41-9A35-40B2-8C5D-774013038616/Library/Caches/com.crashlytics.data/id.AppName.debug
[Firebase/Crashlytics][I-CLS000000] [Crashlytics:Crash:Reports:Event] Registered Firebase Analytics event listener
[Firebase/Crashlytics][I-CLS000000] Automatic data collection is enabled.
[Firebase/Crashlytics][I-CLS000000] Unsent reports will be uploaded at startup

Then, I tried to built again. This log appeard on console.

[Firebase/Crashlytics] Packaged report with id 'dc5d9933e4c541c8a2f6ff7c6693713a' for submission
6.30.0 - [Firebase/Crashlytics][I-CLS000000] Preparing the report for the new endpoint: 1
6.30.0 - [Firebase/Crashlytics][I-CLS000000] [Crashlytics:Crash:Reports] Submitting report
0 Flip[617:178559] 6.30.0 - [Firebase/Crashlytics][I-CLS000000] [Crashlytics:Crash:Reports:Event] Sending event.
6.30.0 - [Firebase/Crashlytics][I-CLS000000] [Crashlytics:Crash:Reports] Completed report submission with id: dc5d9933e4c541c8a2f6ff7c6693713a
6.30.0 - [Firebase/Performance][I-PRF100009] Logging network request trace - https://crashlyticsreports-pa.googleapis.com/v1/firelog/legacy/batchlog, Response code: 200, 1568.5920ms
6.30.0 - [Firebase/Performance][I-PRF100009] Logging network request trace - https://crashlyticsreports-pa.googleapis.com/v1/firelog/legacy/batchlog, Response code: 200, 1568.9490ms

Even though log Completed report submission is exist, there is still no crash report appeared on my console.

For more context, I used Crashlytics since it still owned by Fabric. I've removed all code/config (fabric ID, Fabric run script, react-native-fabric/SMXCrashlytics)

Dang, with that "Completed report submission", it seems like it all worked right? I mean, what else can we do :sweat_smile: - hopefully it is just a lag in reporting? There was one person that reported it took 15 hours once!?!

Fantastic that you grabbed those logs though, I think they show everything is actually working.

One thing I'll note (though let me say I do not think it is important here) is that npx react-native-clean-project does a lot more than you did. A whole lot more! It cleans Derived Data for iOS builds plus watchman and metro bundler caches and things. Each of those has caused problems in my experience, and given your logs above saying it submitted a report even I don't think it matters now, but it is something to keep in mind

I suspect this is caused by fabric migration.

On 6.4.0 version, crashlytics (android and ios) worked wonderfully.

on 7.* version, rnfb/crashlytics migrated to firebase/crashlytics.

And I upgraded from 6.4.0 to 8.4.2.

Maybe there is something wrong on my fabric migration. Any clue?

I am not sure, it is possible to raise this with the firebase-ios-sdk repo. They do not readily take on issues when react-native-firebase is in use, but if you did a quick reproduction with your firebase credentials plist and a minimal amount of objective-c code that showed the problem you should be able to get attention (they probably have an example you could quickly clone and try?). There are other Fabric customers that reported an inability to see reports after migrating and I don't believe anyone has reported a resolution for it yet

I've also generate new main.bundlejs. Old main.bundlejs still have code/configuration related to fabric.

It still didn't worked.

= = =

anyone has tried to abandon old firebase project, and new fresh project with no fabric migration inside?

what problem will be potentially occurred?

exactly same issue here

Hi @wddwycc,
Would you post your detailed condition?

@abdullahizzuddiin @mikehardy

migrating from 6.4.0 to 8.4.2, enabled crashlytics_disable_auto_disabler and crashlytics_debug_enabled, enabled -FIRDebugEnabled for verbose log, using crashlytics().crash to trigger crash, got:

14:35:40.571    Staging [Firebase/Crashlytics] Packaged report with id '1cb2d91439df4d3294f1ee005c341f63' for submission
14:35:40.585    Staging 6.30.0 - [Firebase/Crashlytics][I-CLS000000] Preparing the report for the new endpoint: 1
14:35:40.588    Staging 6.30.0 - [Firebase/Crashlytics][I-CLS000000] [Crashlytics:Crash:Reports] Submitting report
14:35:40.601    Staging 6.30.0 - [Firebase/Crashlytics][I-CLS000000] [Crashlytics:Crash:Reports:Event] Sending event.
14:35:40.635    Staging 6.30.0 - [Firebase/Crashlytics][I-CLS000000] [Crashlytics:Crash:Reports] Completed report submission with id: 1cb2d91439df4d3294f1ee005c341f63

The log says report completed, but nothing in my firebase dashboard
(by the way, android works perfectly)

@abdullahizzuddiin @mikehardy

This Completed report submission with id log is from firebase-ios-sdk, so I doubt the issue is relevant to firebase server. I sent a ticket to the firebase team, it takes 2 business days for them to respond, let's see

What a coincidence. I also sent a ticket to firebase support.

Thanks @wddwycc

Firebase support team has answered my ticket and they refused to check because I'm using 3rd party library --not directly using Firebase/Crashlytics

I choose my words carefully @abdullahizzuddiin

They do not readily take on issues when react-native-firebase is in use, but if you did a quick reproduction with your firebase credentials plist and a minimal amount of objective-c code that showed the problem you should be able to get attention (they probably have an example you could quickly clone and try?).

https://github.com/firebase/quickstart-ios/blob/master/crashlytics/README.md

Same here.
I spent a lots of time and no success. I followed everything that has been mention here except the part upload-symbols.

Likewise. Not uploading symbols should not prevent crashes appearing.

I did try this : https://firebase.google.com/docs/crashlytics/get-deobfuscated-reports to upload manually.
I ran this command :

ios/Pods/FirebaseCrashlytics/upload-symbols -gsp ios/MyApp/GoogleService-Info.plist -p ios ios/MyApp.app.dSYM.zip

I'm gonna wait a few hours to see if it appears, otherwise I'm lost.

Let me release the current work really quickly - it has been merged but not released. Update your crashlytics in about 30 minutes to the version I will generate and it may help. Adding -FIRDebugEnabled to your launch arguments in your build scheme in Xcode may be illuminating as well

Let me release the current work really quickly - it has been merged but not released. Update your crashlytics in about 30 minutes to the version I will generate and it may help. Adding -FIRDebugEnabled to your launch arguments in your build scheme in Xcode may be illuminating as well

Thanks for the help, I’ll check it when it’s out.

Thanks for the help, but unfortunately, it doesn't seem to work :/
Is it supposed to work in debug mode ?

My firebase.json:

{
  "react-native": {
    "crashlytics_debug_enabled": true,
    "crashlytics_auto_collection_enabled": true,
    "crashlytics_disable_auto_disabler": true
  }
}

My versions :

{
…
    "@react-native-firebase/analytics": "^7.6.2",
    "@react-native-firebase/app": "^8.4.2",
    "@react-native-firebase/crashlytics": "^8.4.4",
    "@react-native-firebase/messaging": "^7.8.6",
…
}

I've been looking so long at the Add the Firebase iOS SDK (4.3.0 or higher) or Unity Plugin (6.15.0 or higher), then build, run, and crash your app message I'm almost hypnotized.

Adding -FIRDebugEnabled to your launch arguments in your build scheme in Xcode may be illuminating as well

Definitely do this, it (along with a step you need to take in order for it to work with a debugger attached) are detailed here https://firebase.google.com/docs/crashlytics/test-implementation?platform=ios

I have to admit I find it easier to TestFlight a release build personally, but that's for ongoing testing, I understand during initial implementation debug crashes are quite useful

I found a solution !!
So I realized that on another project of mine, it was working great, so I downgraded to the same configuration as my other project, and it worked instantly in DEV, here it is :


    "@react-native-firebase/analytics": "^7.4.1",
    "@react-native-firebase/app": "^8.3.0",
    "@react-native-firebase/messaging": "^7.6.1",
    "@react-native-firebase/crashlytics": "8.3.0",

I'm just scared that I might introduce some breaking change (@mikehardy ?), otherwise it's all good for me.
Might be a good point to start to find why it's not working with the lastest ones

Interesting from exactly what to exactly what versions? Then we can bisect

From this :

    "@react-native-firebase/analytics": "^7.6.2",
    "@react-native-firebase/app": "^8.4.2",
    "@react-native-firebase/crashlytics": "^8.4.4", <--
    "@react-native-firebase/messaging": "^7.8.6",

To that :

    "@react-native-firebase/analytics": "^7.4.1",
    "@react-native-firebase/app": "^8.3.0",
    "@react-native-firebase/crashlytics": "8.3.0", <--
    "@react-native-firebase/messaging": "^7.6.1",

How did it go with 8.4.2? There are only 2 changes in Crashlytics in the version range you just mentioned, and you removed both - curious how it goes with only removing the most recent change so you still have the change from 8.4.2

I was with the 8.4.2 when I noticed the issue, I tried everything using react-native-clean-project and the right config with firebase.json. But still, no luck.
Did the same thing with 8.4.4 and same results.
And then with 8.3.0 (It was arbitrary, same as another working project) it worked instantly.

There were no code changes between 8.3.0 and 8.4.2! That was just updating SDK versions for Android and the firebase-ios-sdk pod version 🤔

https://github.com/invertase/react-native-firebase/commit/728f41863832d21230c6eb1f55385284fef03c09#diff-0fa4b9b85885f232095dc6c84a86fcce

Could you try using either version (ideally the one you have working - our v8.3.0 here) - but varying the firebase ios SDK version?

You override it like so: https://rnfirebase.io/#ios

8.3.0 used 6.28.1
8.4.2 attempts to use either 6.30.0 or 6.31.0 (but current is 6.32.0)

I wonder if that's the problem? Something underlying may have changed

I'll try that tomorrow. First I must solve the issue that I can only reproduce in production 🙌

Sure sure :-), I appreciate the help a lot by the way, any success report or failure report, and especially a change between versions can help a lot pinning down how to make this thing work reliably. It's been an infernal voyage. Good luck with your production issue.

Hi @Daavidaviid,

When you installed 8.4.2 or 8.4.4 (as you said here, did you got same log as same as me like https://github.com/invertase/react-native-firebase/issues/4229#issuecomment-689186635?

I mean, did 'Completed report submission' appeared on your xcode console?

Hi @Daavidaviid,

When you installed 8.4.2 or 8.4.4 (as you said here, did you got same log as same as me like #4229 (comment)?

I mean, did 'Completed report submission' appeared on your xcode console?

Hey, no I didn't get this issue.
It's working fine when I crash the app on purpose with crash() but with my issue, it doesn't work because the app crashes after the OS is killing it on purpose because of using too much memory.

I get the following message when I plug my device in xcode:

exceeding limit of 80% cpu over 60 seconds

Seems like it's because of this warning I've been ignoring :
https://stackoverflow.com/questions/58791035/ios-13-2-message-nehelper-sent-invalid-result-code-1-for-wi-fi-information-re

@abdullahizzuddiin @Daavidaviid @mikehardy

I tried downgrade from 8.4.2 to 8.3.0, the issue resolved instantly.

Can anyone use current (8.4.4) with pods overridden to 6.28.1 to divide the problem between react-native-firebase and firebase-ios-sdk? We've got piles of code here, and massive piles of code there and it would help focus where to find the problem if anyone that's easily reproducing problems could give the override a shot https://rnfirebase.io/#ios

@mikehardy I've given that a go and I've definitely got one crash report through but seemingly thats it, I've not dug through any debugging logs or anything, sorry can't be much more help than that, hopefully get back to it this evening

So yeah I think using 8.4.4 and the overriding pods to 6.28.1 works, I'm still not seeing the crashes but i can see them in the missing dsyms section, I think I need to tweak my fastfile line that uploads them as it must not be working quite right!

Oh bother. I really appreciate the attempt @rossjohnsonMP and pending some confirmation it sounds like we have a brand new failure mode, that is our code here may be slowly advancing (eliminating failure modes, having less surprising defaults...) and somewhere between 6.28.1 and 6.31.0 something changed underneath us. It appears there is always an opportunity to learn something new with iOS crashlytics these last couple months...

So sad for me.

I have tried to downgraded @react-native-firebase/crashlytics to 8.3.0 version and also upgraded to latest (8.4.4 version) and overrode pods to 6.28.1, but still no crash report appeared on my firebase console.

From this :

    "@react-native-firebase/analytics": "^7.6.2",
    "@react-native-firebase/app": "^8.4.2",
    "@react-native-firebase/crashlytics": "^8.4.4", <--
    "@react-native-firebase/messaging": "^7.8.6",

To that :

    "@react-native-firebase/analytics": "^7.4.1",
    "@react-native-firebase/app": "^8.3.0",
    "@react-native-firebase/crashlytics": "8.3.0", <--
    "@react-native-firebase/messaging": "^7.6.1",

On the upper package.json android works fine. IOS works only in initial setup, i can't access the crashlytics dashboard, it remain stuck in the add sdk loading.
Everything works fine with the versions listed below of the package.json

I'm not sure if this is just an issue I'm having, but in firebase i can see crashes being hidden because of missing dsyms.

After chatting to firebase they asked me to run:
dwarfdump -u < path-to-dsym >

After doing that i found that the UUID's in there did not match any of the missing crashes.

Then I downloaded the dysms from iTunesConnect and could see the UUID's of the missing crashes. So seems like something strange is going on

Ahh thank you @mikehardy, missed that first step of getting fastlane to download the dsyms then upload the ones it downloads. Ok cool, one more thing to try, cheers!

From this :

    "@react-native-firebase/analytics": "^7.6.2",
    "@react-native-firebase/app": "^8.4.2",
    "@react-native-firebase/crashlytics": "^8.4.4", <--
    "@react-native-firebase/messaging": "^7.8.6",

To that :

    "@react-native-firebase/analytics": "^7.4.1",
    "@react-native-firebase/app": "^8.3.0",
    "@react-native-firebase/crashlytics": "8.3.0", <--
    "@react-native-firebase/messaging": "^7.6.1",

This worked for me, after uploading dSYMS to crashlytics I can see the crashes on iOS again. Cheers mate.

Okay - thanks for the report @Raymond-Cox - really sorry that a revert is needed at the moment. Our best guess at the moment is that if you used the most update version of the react-native-firebase version, combined with a pod override to 6.28.1 you will also enjoy success. It's a still a pending item to discover what happened in the pods, and more confirmation of a pod downgrade working for people would help upgrade that from hypothesis to evidence-backed theory

@mikehardy I am willing to explore the override to help build evidence. Real quick, is this how you do the pod override?

require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
platform :ios, '10.0'

$FirebaseSDKVersion = '6.28.1' <----------

target 'vaultzap57' do
....

@mikehardy I am willing to explore the override to help build evidence. Real quick, is this how you do the pod override?

require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
platform :ios, '10.0'

$FirebaseSDKVersion = '6.28.1' <----------

target 'vaultzap57' do
....

Yep that looks correct. It's on the rnfirebase.io front page also (for comparison)

@mikehardy Thanks for the confirmation, I'll create new builds with newest rnFirebase libraries and report back once I verify.

@mikehardy I waited until this morning, still didn't get any new crash reports in Crashlytics after doing the override.

:thinking: okay then, hypothesis that the underlying firebase-ios-sdk had a problem is busted. A further confirmation that hypothesis would be wrong is using the same package.json values to downgrade react-native-firebase but then override the pod there to 6.30 (or 6.32.2 as that is current now). That would isolate the problem between the version ranges in package.json that people have been posting here the last couple days. (and would also mean that we have some work to do here to fix it, obviously)

Okay, creating builds with this config

"@react-native-firebase/analytics": "^7.4.1",
"@react-native-firebase/app": "^8.3.0",
"@react-native-firebase/crashlytics": "8.3.0",
"@react-native-firebase/messaging": "^7.6.1",

and

$FirebaseSDKVersion = '6.32.2'

Will report back when I find something out.

@mikehardy Interesting development, I got crash reports in crashlytics instantly with the above configuration.

@Raymond-Cox I wouldn't trust the instantaneousness :-) but I really appreciate the testing. For everyone else following along, there's a config above that gets you the maximum number of bugfixes (read as: most up to date version you can use) while still getting ios crash reports.

And whatever the difference between 8.3.0 and 8.4.4 is, we've got a problem.

There are some people that like changes in a batch so they don't see a lot of versions. I've been trying to release one version per "fix" (or regression, apparently), here is why: each version of crashlytics has one change only:

https://github.com/invertase/react-native-firebase/blob/master/packages/crashlytics/CHANGELOG.md

:detective: which one is it!?! :detective:

I too have issues with crashlytics. After keep updating I am not seeing non-fatal errors at all on dashboard. I want to try @Raymond-Cox config. Can some one please tell how to update specific FirebaseSDKVersion = '6.32.2' I have 6.30.0. I tried updating the package. json but pods still using the 6.30.0.

My package.json:
"@react-native-firebase/analytics": "^7.6.1",
"@react-native-firebase/app": "^8.4.1",
"@react-native-firebase/crashlytics": "^8.4.2",
"@react-native-firebase/perf": "^7.4.2",

Pod file:

  • RNFBAnalytics (7.6.2):

    • Firebase/Analytics (~> 6.30.0)

    • React

    • RNFBApp

    • RNFBApp (8.4.2):

    • Firebase/CoreOnly (~> 6.30.0)

    • React

    • RNFBCrashlytics (8.4.4):

    • Firebase/Crashlytics (~> 6.30.0)

    • React

    • RNFBApp

    • RNFBPerf (7.4.3):

    • Firebase/Performance (~> 6.30.0)

    • React

    • RNFBApp

@sbatikeri I pulled your Podfile from the other issue you opened.

Podfile (Not Podfile.lock)

platform :ios, '9.0'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

$FirebaseSDKVersion = '6.32.2'  // <------ Add here

target 'Track' do

I also think in package.json you need to take the carat (^) symbol off for crashlytics to keep it specifically at 8.3.0

Package.json

"@react-native-firebase/crashlytics": "8.3.0",

Afterwards You'll probably need to delete your package.lock file just to be safe, and do a fresh start on node modules, Pods, and such.

People suggest doing so by running this command npx react-native-clean-project, but it never works for me. I wrote this small script to achieve nearly the same thing for iOS.

rm -rf node_modules && npm install && cd ios && rm -rf Podfile.lock && rm -rf Pods && pod install --repo-update && cd ../

Hope it helps mate.

@Raymond-Cox side note: I'm unaware of npx react-native-clean-project failures but have success making PR to that repo and obviously love recommending it. If you have any info on what is failing for you and why there, would be best to make it work as it's a standard rec for me

@mikehardy I'll set aside some time in the near future to open an issue on their repo with details on what's failing with it. Honestly it's probably some file misconfigured in this project, I've cleaned up/fixed tons of the react-native standard files since I've joined this organization. Every time I perform some React-Native upgrades I find lines in their files that don't exist in ours whatsoever, and vice-versa :)

That sounds...fun 😄 . I did just (re-)learn that clean-project doesn't run on windows so there is that.

For anyone else following - it does appear the problem is in this library and while crashlytics module 8.3.0 works something in the 5 PRs from that version to current is broken, and the last PR is fine since updated firebase-ios-sdk works, so there's only 4 PRs that could be it.

Of those, 2 are about the manual crash style which may cause issues when testing this library but shouldn't break other crash reports. 1 is for optin/optout (maybe that is it?) and 1 is for including crashlytics without analytics (maybe that is it for project setup where crashlytics thinks you aren't integrated?).

Each is likely testable separately but I'm still otherwise occupied with regards to build test cycles now that Xcode 12 / ios14 is out 😞

@Raymond-Cox thanks for quick response. I tried what you said. App updated with 6.32.2 but I am getting runtime error. I trying all options even npx react-native-clean-project

error: bundling failed: Error: Unable to resolve module @react-native-community/toolbar-android from node_modules/react-native-vector-icons/lib/toolbar-android.js: @react-native-community/toolbar-android could not be found within the project.

@sbatikeri you have an unrelated issue. You need to check the react-native-vector-icons issue tracker for issues related to it. Looks like you need version 7.1.0 over there, or to install @react-native-community/toolbar-android directly

https://github.com/oblador/react-native-vector-icons/issues?q=is%3Aissue+is%3Aopen+unable+to+resolve+toolbar-android

https://github.com/oblador/react-native-vector-icons/issues/1203#issuecomment-692510588

marking these off topic

@sbatikeri you have an unrelated issue. You need to check the react-native-vector-icons issue tracker for issues related to it. Looks like you need version 7.1.0 over there, or to install @react-native-community/toolbar-android directly

https://github.com/oblador/react-native-vector-icons/issues?q=is%3Aissue+is%3Aopen+unable+to+resolve+toolbar-android

oblador/react-native-vector-icons#1203 (comment)

marking these off topic

@react-native-community/toolbar-android

Yes, installing directly fixed runtime issue but still I am not seeing the non-fatals on dashbaord.

@Raymond-Cox I did update but still not seeing ios non-fatal exceptions on dashboard.
From:
"@react-native-firebase/analytics": "^7.6.1",
"@react-native-firebase/app": "^8.4.1",
"@react-native-firebase/crashlytics": "^8.4.2",

To:
"@react-native-firebase/analytics": "^7.4.1",
"@react-native-firebase/app": "^8.3.0",
"@react-native-firebase/crashlytics": "8.3.0",

Podfile.lock

  • Firebase/Analytics (6.32.2):

    • Firebase/Core

    • Firebase/Core (6.32.2):

    • Firebase/CoreOnly

    • FirebaseAnalytics (= 6.8.2)

    • Firebase/CoreOnly (6.32.2):

    • FirebaseCore (= 6.10.2)

    • Firebase/Crashlytics (6.32.2):

    • Firebase/CoreOnly

    • FirebaseCrashlytics (~> 4.6.0)

    • Firebase/Performance (6.32.2):

@mikehardy do we going to release any fix soon?

@sbatikeri I don't recall you proposing a PR with a fix? There are explicit mentions above about what needs to be tested to find the problem, then we'll need a fix. I look forward to a PR, I have not had time myself

Okay, creating builds with this config

"@react-native-firebase/analytics": "^7.4.1",
"@react-native-firebase/app": "^8.3.0",
"@react-native-firebase/crashlytics": "8.3.0",
"@react-native-firebase/messaging": "^7.6.1",

and

$FirebaseSDKVersion = '6.32.2'

Will report back when I find something out.

I did that and works, but I've felt a little bad downgrading a lot of dependencies, I hope that this works correctly with the latest version soon

@MiguelGrability you don't have to hope! You can do this:

or anyone else following - it does appear the problem is in this library and while crashlytics module 8.3.0 works something in the 5 PRs from that version to current is broken, and the last PR is fine since updated firebase-ios-sdk works, so there's only 4 PRs that could be it.

Of those, 2 are about the manual crash style which may cause issues when testing this library but shouldn't break other crash reports. 1 is for optin/optout (maybe that is it?) and 1 is for including crashlytics without analytics (maybe that is it for project setup where crashlytics thinks you aren't integrated?).

Each is likely testable separately

And advance the issue by discovering the exact change, helping everyone out :pray:

After a large amount of pain and confusion I too can confirm that downgrading from:

"@react-native-firebase/crashlytics": "8.4.5"

to

"@react-native-firebase/crashlytics": "8.3.0"

as well as setting $FirebaseSDKVersion = '6.32.2' in my Podfile has allowed me to now see crash reports in the Firebase Crashlytics console. Can provide more information regarding environments etc if necessary.

We don't need more information on environments, we need someone with some time to do the version bisect from 8.3.0 to 8.4.5 - as indicated there are really just 2 or 3 changes to consider, so it should be quick work but it hasn't been taken up yet

Sorry this is continuing to sit out there and cause trouble for other developers but I'm out of time to drive it at the moment between apple-auth, this library, device-info, and my work project. We need help if someone has time :pray:

I did some test with later version, and it stop sending crash report from crashlytics 8.3.2, i've checked the difference between 8.3.0 and 8.3.2. I think this is the issue https://github.com/invertase/react-native-firebase/commit/6b136c3972eb25ad37b4d6230e1d6e139c094f86 , using assert(NO) i was able to recive crash report in the dashboard. Checking the 8.4.5 version and found the RCT_EXPORT_METHOD(crash) in the RNFBCrashlyticsModule.m now use @throw NSInternalInconsistencyException; . So this is not what we are looking, i'll continue testing the library 8.3.2 > X < 8.4.5

@babeone it would be interesting to know if general crashes (as opposed to the "test crash" feature) still worked, as that was a specific area of change here. I'm surprised that caused a problem as it was pretty thoroughly researched and tested, but programming is always surprising. Thank you thank you for investigating, the answer should be in there somewhere...

@mikehardy Yes, i've tried with 8.3.3 and it's the same as the 8.3.2, with assert(NO) i was able to recive the test crash. When i have time i'll try to crash the app without the crash function.

Relevant comment from @JellyLu on the commit that changed crash style and may be the root cause here, pending testing/confirmation

https://github.com/invertase/react-native-firebase/commit/2cbab5cf91f4e8542c30a237637d071c14bbcde5#commitcomment-43192535

@throw NSInternalInconsistencyException; can crash the app, but firebase console can't get the report. report an issue here.

I try to throw NSInternalInconsistencyException as bellow two ways in AppDelegate.m after the app loading 30 seconds,

way one:

 @throw NSInternalInconsistencyException;

way two:

NSException* myException = [NSException
        exceptionWithName: NSInternalInconsistencyException
        reason:@"V8.4.9 NSInternalInconsistencyException"
        userInfo:nil];
@throw myException;

if I use way one, firebase console will NOT collect the crash,
if I use way two, firebase console will collect the crash.

Could you please help to double check with this?

Hey guys, I've been silently tracking this issue and just wondering about the status of it. Looking at master https://github.com/invertase/react-native-firebase/commit/2dcaad59c27b90b1f2b3ef6b31e46d3eac8a5e2e has been merged which appears to fix this issue - is this correct or is there more to it than meets the eye?

@se1exin we can always use more confirmation but it is my understanding that with the correct firebase.json settings and the most recent release, crashes should report on ios in debug and release - in other words, it's supposed to all be working now

Thanks for the update @mikehardy - for what it's worth, I have updated my react-native-firebase/crashlytics to 8.4.11 and can confirm am now receiving manual crash()es in the firebase console for both iOS and Android.

Updating all worked for me.

    "@react-native-firebase/analytics": "^7.6.9",
    "@react-native-firebase/app": "^8.4.7",
    "@react-native-firebase/crashlytics": "^8.4.12",
    "@react-native-firebase/firestore": "^7.9.1",
    "@react-native-firebase/messaging": "^7.9.2",
    "@react-native-firebase/perf": "^7.4.10",

react-native-firebase/crashlytics to 8.4.11 solved! Thx you guys!

Should check the peerDependence version of each module.

    "@react-native-firebase/analytics": "7.5.1",
    "@react-native-firebase/app": "8.4.0",
    "@react-native-firebase/crashlytics": "8.4.0",
    "@react-native-firebase/firestore": "7.6.1",

@7772 or move to v10+ where we moved to "One.True.Version" and they will no longer be versioned independently, eliminating all confusion

Looks like this is solved; closing.

Was this page helpful?
0 / 5 - 0 ratings