[🐛]🔥 My app stopped collecting info after migrating to new crashlytics SDK (iOS only)

Issue

After upgrading the entire suite of firebase to latest version, because I had a warning about my current crashlytics sdk was out of date and I will stop receiving crash reports after Nov 15. But after upgrading to latest firebase version 10.1.0 on iOS (only), my app stopped collecting data. I am on version 2.23.5 but dashboard says I am on 2.23.3 (image 1).

Latest Release

Current Version

I tried everything on this issues:

#4229
#4589

I stopped receiving crash updates on iOS too. The only crash updates I received are the one I do manually but I have nothing in production (2.23.5), I should have more than 32 events really.

Captura de Pantalla 2020-12-04 a la(s) 16 33 55

I upgraded firebase suite from:

"@react-native-firebase/app": "6.7.1"
"@react-native-firebase/crashlytics": "6.7.1"
"@react-native-firebase/database": "6.7.1"
"@react-native-firebase/messaging": "6.7.1"

to

"@react-native-firebase/app": "^10.1.0"
"@react-native-firebase/crashlytics": "^10.1.0"
"@react-native-firebase/database": "^10.1.0"
"@react-native-firebase/messaging": "^10.1.0"
"@react-native-firebase/analytics": "^10.1.1" // <- also included

I tried also deleting /Pods and Podfile.lock, reinstalling everything but nothing happens.
I did also install @react-native-firebase/analytics to track events with:

await FirebaseAnalytics().logEvent('test_tracking_dev', {
  userId: 3595,
  message: 'custom event press on purple button',
});

But I am not receving the test_tracking_dev event:

Captura de Pantalla 2020-12-04 a la(s) 16 53 05

Is there anything I need to migrate from old firebase SDK to new firebase SDK? Thanks for your time and help 🙏🏽


firebase.json for react-native-firebase v6:

{
  "react-native": {
    "messaging_android_notification_channel_id": "high-priority",
    "crashlytics_auto_collection_enabled": true,
    "crashlytics_ndk_enabled": true,
    "crashlytics_disable_auto_disabler": true
  }
}

iOS

Click To Expand

ios/Podfile:

  • I’m not using Pods
  • I’m using Pods and my Podfile looks like:
# frozen_string_literal: true

# Uncomment the next line to define a global platform for your project
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'

target 'PapinotasFamilia' do
  config = use_native_modules!

  use_react_native!(:path => config["reactNativePath"])

  target 'PapinotasFamiliaTests' do
    inherit! :complete
    # Pods for testing
  end

  # Enables Flipper.
  #
  # Note that if you have use_frameworks! enabled, Flipper will not work and
  # you should disable these next few lines.
  use_flipper!
  post_install do |installer|
    flipper_post_install(installer)
  end
end

AppDelegate.m:

#import "AppDelegate.h"
#import <React/RCTBridge.h>
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>

#ifdef FB_SONARKIT_ENABLED
#import <FlipperKit/FlipperClient.h>
#import <FlipperKitLayoutPlugin/FlipperKitLayoutPlugin.h>
#import <FlipperKitUserDefaultsPlugin/FKUserDefaultsPlugin.h>
#import <FlipperKitNetworkPlugin/FlipperKitNetworkPlugin.h>
#import <SKIOSNetworkPlugin/SKIOSNetworkAdapter.h>
#import <FlipperKitReactPlugin/FlipperKitReactPlugin.h>
static void InitializeFlipper(UIApplication *application) {
  FlipperClient *client = [FlipperClient sharedClient];
  SKDescriptorMapper *layoutDescriptorMapper = [[SKDescriptorMapper alloc] initWithDefaults];
  [client addPlugin:[[FlipperKitLayoutPlugin alloc] initWithRootNode:application withDescriptorMapper:layoutDescriptorMapper]];
  [client addPlugin:[[FKUserDefaultsPlugin alloc] initWithSuiteName:nil]];
  [client addPlugin:[FlipperKitReactPlugin new]];
  [client addPlugin:[[FlipperKitNetworkPlugin alloc] initWithNetworkAdapter:[SKIOSNetworkAdapter new]]];
  [client start];
}
#endif

#import <Firebase.h>
#import "RNNotifications.h"
#import "AppCenterReactNative.h"
#import "AppCenterReactNativeAnalytics.h"
#import "AppCenterReactNativeCrashes.h"
#import "RNSplashScreen.h"

@implementation AppDelegate

NSString *const kGCMMessageIDKey = @"gcm.message_id";

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
  [FIRApp configure];
  [FIRDatabase database].persistenceEnabled = YES;
  [RNNotifications startMonitorNotifications];

  NSLog(@"delegate is: %%@", [UNUserNotificationCenter currentNotificationCenter].delegate);

  [AppCenterReactNativeCrashes registerWithAutomaticProcessing];  // Initialize AppCenter crashes

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

  [AppCenterReactNative register];  // Initialize AppCenter 

  #ifdef FB_SONARKIT_ENABLED
    InitializeFlipper(application);
  #endif

  RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
  RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
                                                   moduleName:@"PapinotasFamilia"
                                            initialProperties:nil];                                                   
  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];
  [RNSplashScreen show];
  return YES;
}

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

- (void)applicationDidBecomeActive:(UIApplication *)application{
      NSLog(@"applicationDidBecomeActive");
      [UIApplication sharedApplication].applicationIconBadgeNumber = 0;
}

- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
  NSLog(@"didRegisterForRemoteNotificationsWithDeviceToken");
  [RNNotifications didRegisterForRemoteNotificationsWithDeviceToken:deviceToken];
}

- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error {
  NSLog(@"didFailToRegisterForRemoteNotificationsWithError");
  [RNNotifications didFailToRegisterForRemoteNotificationsWithError:error];
}

@end

Environment

Click To Expand

react-native info output:

System:
    OS: macOS 10.15.7
    CPU: (8) x64 Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz
    Memory: 237.81 MB / 16.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 13.13.0 - ~/.nvm/versions/node/v13.13.0/bin/node
    Yarn: 1.22.4 - /usr/local/bin/yarn
    npm: 6.14.4 - ~/.nvm/versions/node/v13.13.0/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.10.0 - /Users/julio/.rvm/gems/ruby-2.5.0/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 14.1, DriverKit 19.0, macOS 10.15, tvOS 14.0, watchOS 7.0
    Android SDK:
      API Levels: 23, 25, 26, 27, 28, 29
      Build Tools: 25.0.2, 25.0.3, 26.0.1, 27.0.3, 28.0.0, 28.0.3, 29.0.0, 29.0.2
      System Images: android-28 | Google APIs Intel x86 Atom, android-28 | Google Play Intel x86 Atom
      Android NDK: Not Found
  IDEs:
    Android Studio: 4.0 AI-193.6911.18.40.6626763
    Xcode: 12.1/12A7403 - /usr/bin/xcodebuild
  Languages:
    Java: 1.8.0_191 - /usr/bin/javac
    Python: 2.7.16 - /usr/bin/python
  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.13.1 => 16.13.1 
    react-native: 0.63.1 => 0.63.1 
  npmGlobalPackages:
    *react-native*: Not Found
  • Platform that you’re experiencing the issue on:
    • 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:
    • 10.1.0
  • Firebase module(s) you’re using that has the issue:
    • App
    • Analytics
    • Crashlytics
  • Are you using TypeScript?
    • N

1 possible answer(s) on “[🐛]🔥 My app stopped collecting info after migrating to new crashlytics SDK (iOS only)

  1. I have enabled the debug flags in firebase.json and crashed the app many time but no success, I also have uploaded dsym file manually. Issue is not there on android.

[🐛]🔥 My app stopped collecting info after migrating to new crashlytics SDK (iOS only)

Issue

After upgrading the entire suite of firebase to latest version, because I had a warning about my current crashlytics sdk was out of date and I will stop receiving crash reports after Nov 15. But after upgrading to latest firebase version 10.1.0 on iOS (only), my app stopped collecting data. I am on version 2.23.5 but dashboard says I am on 2.23.3 (image 1).

Latest Release

Current Version

I tried everything on this issues:

#4229
#4589

I stopped receiving crash updates on iOS too. The only crash updates I received are the one I do manually but I have nothing in production (2.23.5), I should have more than 32 events really.

Captura de Pantalla 2020-12-04 a la(s) 16 33 55

I upgraded firebase suite from:

"@react-native-firebase/app": "6.7.1"
"@react-native-firebase/crashlytics": "6.7.1"
"@react-native-firebase/database": "6.7.1"
"@react-native-firebase/messaging": "6.7.1"

to

"@react-native-firebase/app": "^10.1.0"
"@react-native-firebase/crashlytics": "^10.1.0"
"@react-native-firebase/database": "^10.1.0"
"@react-native-firebase/messaging": "^10.1.0"
"@react-native-firebase/analytics": "^10.1.1" // <- also included

I tried also deleting /Pods and Podfile.lock, reinstalling everything but nothing happens.
I did also install @react-native-firebase/analytics to track events with:

await FirebaseAnalytics().logEvent('test_tracking_dev', {
  userId: 3595,
  message: 'custom event press on purple button',
});

But I am not receving the test_tracking_dev event:

Captura de Pantalla 2020-12-04 a la(s) 16 53 05

Is there anything I need to migrate from old firebase SDK to new firebase SDK? Thanks for your time and help 🙏🏽


firebase.json for react-native-firebase v6:

{
  "react-native": {
    "messaging_android_notification_channel_id": "high-priority",
    "crashlytics_auto_collection_enabled": true,
    "crashlytics_ndk_enabled": true,
    "crashlytics_disable_auto_disabler": true
  }
}

iOS

Click To Expand

ios/Podfile:

  • I’m not using Pods
  • I’m using Pods and my Podfile looks like:
# frozen_string_literal: true

# Uncomment the next line to define a global platform for your project
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'

target 'PapinotasFamilia' do
  config = use_native_modules!

  use_react_native!(:path => config["reactNativePath"])

  target 'PapinotasFamiliaTests' do
    inherit! :complete
    # Pods for testing
  end

  # Enables Flipper.
  #
  # Note that if you have use_frameworks! enabled, Flipper will not work and
  # you should disable these next few lines.
  use_flipper!
  post_install do |installer|
    flipper_post_install(installer)
  end
end

AppDelegate.m:

#import "AppDelegate.h"
#import <React/RCTBridge.h>
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>

#ifdef FB_SONARKIT_ENABLED
#import <FlipperKit/FlipperClient.h>
#import <FlipperKitLayoutPlugin/FlipperKitLayoutPlugin.h>
#import <FlipperKitUserDefaultsPlugin/FKUserDefaultsPlugin.h>
#import <FlipperKitNetworkPlugin/FlipperKitNetworkPlugin.h>
#import <SKIOSNetworkPlugin/SKIOSNetworkAdapter.h>
#import <FlipperKitReactPlugin/FlipperKitReactPlugin.h>
static void InitializeFlipper(UIApplication *application) {
  FlipperClient *client = [FlipperClient sharedClient];
  SKDescriptorMapper *layoutDescriptorMapper = [[SKDescriptorMapper alloc] initWithDefaults];
  [client addPlugin:[[FlipperKitLayoutPlugin alloc] initWithRootNode:application withDescriptorMapper:layoutDescriptorMapper]];
  [client addPlugin:[[FKUserDefaultsPlugin alloc] initWithSuiteName:nil]];
  [client addPlugin:[FlipperKitReactPlugin new]];
  [client addPlugin:[[FlipperKitNetworkPlugin alloc] initWithNetworkAdapter:[SKIOSNetworkAdapter new]]];
  [client start];
}
#endif

#import <Firebase.h>
#import "RNNotifications.h"
#import "AppCenterReactNative.h"
#import "AppCenterReactNativeAnalytics.h"
#import "AppCenterReactNativeCrashes.h"
#import "RNSplashScreen.h"

@implementation AppDelegate

NSString *const kGCMMessageIDKey = @"gcm.message_id";

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
  [FIRApp configure];
  [FIRDatabase database].persistenceEnabled = YES;
  [RNNotifications startMonitorNotifications];

  NSLog(@"delegate is: %%@", [UNUserNotificationCenter currentNotificationCenter].delegate);

  [AppCenterReactNativeCrashes registerWithAutomaticProcessing];  // Initialize AppCenter crashes

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

  [AppCenterReactNative register];  // Initialize AppCenter 

  #ifdef FB_SONARKIT_ENABLED
    InitializeFlipper(application);
  #endif

  RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
  RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
                                                   moduleName:@"PapinotasFamilia"
                                            initialProperties:nil];                                                   
  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];
  [RNSplashScreen show];
  return YES;
}

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

- (void)applicationDidBecomeActive:(UIApplication *)application{
      NSLog(@"applicationDidBecomeActive");
      [UIApplication sharedApplication].applicationIconBadgeNumber = 0;
}

- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
  NSLog(@"didRegisterForRemoteNotificationsWithDeviceToken");
  [RNNotifications didRegisterForRemoteNotificationsWithDeviceToken:deviceToken];
}

- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error {
  NSLog(@"didFailToRegisterForRemoteNotificationsWithError");
  [RNNotifications didFailToRegisterForRemoteNotificationsWithError:error];
}

@end

Environment

Click To Expand

react-native info output:

System:
    OS: macOS 10.15.7
    CPU: (8) x64 Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz
    Memory: 237.81 MB / 16.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 13.13.0 - ~/.nvm/versions/node/v13.13.0/bin/node
    Yarn: 1.22.4 - /usr/local/bin/yarn
    npm: 6.14.4 - ~/.nvm/versions/node/v13.13.0/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.10.0 - /Users/julio/.rvm/gems/ruby-2.5.0/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 14.1, DriverKit 19.0, macOS 10.15, tvOS 14.0, watchOS 7.0
    Android SDK:
      API Levels: 23, 25, 26, 27, 28, 29
      Build Tools: 25.0.2, 25.0.3, 26.0.1, 27.0.3, 28.0.0, 28.0.3, 29.0.0, 29.0.2
      System Images: android-28 | Google APIs Intel x86 Atom, android-28 | Google Play Intel x86 Atom
      Android NDK: Not Found
  IDEs:
    Android Studio: 4.0 AI-193.6911.18.40.6626763
    Xcode: 12.1/12A7403 - /usr/bin/xcodebuild
  Languages:
    Java: 1.8.0_191 - /usr/bin/javac
    Python: 2.7.16 - /usr/bin/python
  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.13.1 => 16.13.1 
    react-native: 0.63.1 => 0.63.1 
  npmGlobalPackages:
    *react-native*: Not Found
  • Platform that you’re experiencing the issue on:
    • 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:
    • 10.1.0
  • Firebase module(s) you’re using that has the issue:
    • App
    • Analytics
    • Crashlytics
  • Are you using TypeScript?
    • N

1 possible answer(s) on “[🐛]🔥 My app stopped collecting info after migrating to new crashlytics SDK (iOS only)

  1. I have enabled the debug flags in firebase.json and crashed the app many time but no success, I also have uploaded dsym file manually. Issue is not there on android.