nativescript-plugin-firebase icon indicating copy to clipboard operation
nativescript-plugin-firebase copied to clipboard

Crashlytics is not logging anything on iOS

Open dpdragnev opened this issue 4 years ago • 6 comments

Hello,

I am having trouble logging crash events on iOS (have not tried Android yet). Here is my setup:

{
    "using_ios": true,
    "using_android": true,
    "analytics": true,
    "firestore": false,
    "realtimedb": false,
    "authentication": false,
    "remote_config": true,
    "performance_monitoring": true,
    "external_push_client_only": false,
    "messaging": true,
    "in_app_messaging": true,
    "crashlytics": true,
    "storage": false,
    "functions": false,
    "facebook_auth": false,
    "google_auth": false,
    "admob": false,
    "dynamic_links": true,
    "ml_kit": false
}

Here is now I initialize Firebase:

firebase.init({
        iOSEmulatorFlush: true,
        crashlyticsCollectionEnabled: true
})

Here is how I test it:

crashlytics.sendCrashLog(new NSError({
      domain: 'company.com',
      code: 500,
      userInfo: null
    }));
  crashlytics.crash();

I have enabled the Crashlytics in Firebase and have been waiting for 2 days now, but all I see is this message:

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
View the SDK docs. We’ll be listening for your app to communicate with our servers.

Am I missing a step?

Thanks.

dpdragnev avatar Dec 18 '20 18:12 dpdragnev

Yes we did try the same here, and did a new ticket about it, no one knows and no one answers..

kriefsacha avatar Dec 21 '20 08:12 kriefsacha

looks like the version of SDK was changes and the plugin have to be updated to use Firebase Crashlytics SDK 17.0.0+ https://firebase.google.com/docs/crashlytics/upgrade-sdk?hl=en&authuser=0&platform=android --Make sure you add version 17.0.0 or later (beginning November 15, 2020, this is required for your crash reports to appear in the Firebase console).--

dnepromell avatar Dec 26 '20 18:12 dnepromell

@dnepromell the the thing is we are on nativescript 6.5.1, and we didn't want to upgrade to 7+ to not change everything in the app and we have some plugins that does not work on nativescript 7+. And from what i see if we have 6 it should be version 10 of the plugin. Is there a way to do something about it ?

kriefsacha avatar Dec 27 '20 12:12 kriefsacha

That's the issue we're also facing right now, and due to number of plugins update to NS7 isn't possible. Basically Crashlytics goes silent with latest firebase 10 plugin

deindesignpl avatar Jan 05 '21 09:01 deindesignpl

@EddyVerbruggen any updates on this? I'm having the same problem in all my projects 😞

henrychavez avatar Aug 27 '21 15:08 henrychavez

On NS7 I managed to log to Crashlytics with this: import {crashlytics} from '@nativescript/firebase/crashlytics'; declare var java: any; declare var NSError: any;

if (isAndroid) { crashlytics.sendCrashLog(new java.lang.Exception('test Exception')); } else if (isIOS) { crashlytics.sendCrashLog(new NSError({ domain: 'ShiploopHttpResponseErrorDomain', code: 42, userInfo: null })); }

This should crash your app unless you have discardUncaughtJsExceptions set to true in nativescript.config

vko85 avatar Nov 19 '21 12:11 vko85