EddyVerbruggen / nativescript-plugin-firebase

:fire: NativeScript plugin for Firebase
https://firebase.google.com
MIT License
1.01k stars 448 forks source link

Crashlytics is not logging anything on iOS #1754

Open dpdragnev opened 3 years ago

dpdragnev commented 3 years ago

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.

kriefsacha commented 3 years ago

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

dnepromell commented 3 years ago

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

kriefsacha commented 3 years ago

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

deindesignpl commented 3 years ago

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

henrychavez commented 2 years ago

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

vko85 commented 2 years ago

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