EddyVerbruggen / nativescript-plugin-firebase

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

Crashlytics issue- Not visible in firebase dashboard. #1733

Open ppyoosuf opened 3 years ago

ppyoosuf commented 3 years ago

I just tried to send the crashLog to firebase in android as mentioned in doc. But it's not visible in firebase dashboard. Did I miss anything

"nativescript-plugin-firebase": "^10.0.0",

import { crashlytics } from "nativescript-plugin-firebase";

crashlytics.sendCrashLog(new java.lang.Exception('Crash Testing'));
soscler commented 3 years ago

I've noticed it also. Even tho I added firebase.init({crashlyticsCollectionEnabled: true}) during the initialization I still don't see the crashlytics on the dashboard.

lukas-eschstruth commented 3 years ago

Having a similar problem: I tried integrating Crahslytics (using @nativescript/firebase@10.6.3) into an existing Nativescript 7 project and the first crashes (caused by crashlytics.crash()) showed up for iOS in the dashboard. But after that I didn't receive any more reports neither from crashlytics.crash() nor from crashlytics.sendCrashlog(...). I waited over 24 hours, crashed the apps multiple times, closed and reopened it, nothing helped. On Android the Crashlytics Dashboard is stuck at the "connection" screen and never shows any reports although I installed the app in the emulator and on a real device and tried all the steps I tried for iOS.

The same pattern happened when I tried this with a new clean project that I created with tns create.

kriefsacha commented 3 years ago

@ppyoosuf @soscler @lukas-eschstruth one of you found a solution ? a work around ?

lukas-eschstruth commented 3 years ago

@kriefsacha I tried this again today and everything seems to be working fine now. I receive non critical reports sent by sendCrashlog() and if there is no debugger attached I also see crashes (e.g: crashlytics.crash()). The only thing I changed for iOS was change <key>firebase_crashlytics_collection_enabled</key> to <key>firebaseCrashlyticsCollectionEnabled</key> in the Info.plist because the Firbase Debugging warned me about it (https://firebase.google.com/docs/crashlytics/force-a-crash?platform=ios#enable_debug_logging).

Android also "magically" works now. Honestly I'm a little lost and have no real explanation as to why it is working now for our project.

kriefsacha commented 3 years ago

For me it don't "magically" work and we don't find any info...

lukas-eschstruth commented 3 years ago

What I also did for testing purposes was to initially make the Crashlytics Collection enabled on startup:

iOS in Info.plist: `firebaseCrashlyticsCollectionEnabled

true` Android in AndroidManifest.xml: ` ` And I also initialized the plugin with: `firebase.init({ iOSEmulatorFlush: true, crashlyticsCollectionEnabled: true, }) ` Only after I received the first reports I set these values to false again and enabled the collection manually after user consent with `crashlytics.setCrashlyticsCollectionEnabled(value)`. Maybe this is needed for the initial connection? But it's just a guess and as I said unfortunately I have no real explanation.
kriefsacha commented 3 years ago

Yeah we tried this too... nothing works

nc-kfl commented 3 years ago

Anything new in regards to this issue? We can seems to get logs logged with sendCrashlog() to show up in the dashboard on firebase.

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