React-native-firebase: firebase.crashlytics().log('Something')

Created on 27 Oct 2018  路  18Comments  路  Source: invertase/react-native-firebase


Issue


I integrate the crashlytics, try to log message but I don't see any message from reports in console firebase.

  • How can I test this method?
  • Could you write the guideline to use the methods: recordError, setBoolValue... in the document?
    This my code bellow:
  <TouchableOpacity
    onPress={() => {
      firebase.crashlytics().log('TEST CRASH LOG');
      firebase.crashlytics().crash();
    }}
  >
Crashlytics

All 18 comments

I have same this issues. Please help me to check this issues.

I am in the same situation, I followed the steps to use Crashlytics and when performing the crash test never arrives the information. In Android opens the console Crashlytics, but always with 0 crash (although they create new). In IOS never happens to the console Crashlytics by many crashes that are generated.
I have other modules installed and work properly, not that because it does not work.

I'm also not seeing the crash events in Firestore. RNFirebase version 0.5.1-rc2.
I did just uninstall RNFabric, but it builds fines and executes the crash() as expected so I don't believe its a config issue on my end.

I have the same behaviour.
The package was easy to install, I made a button to make my application crash and it works as expected. But as you can see on the screenshot, nothing is logged even though it shows on the graph that crashes are happening.

@nromptea42 I just logged an issue for that exact thing #1668

In my case it was because my project used to be on Fabric and I guess I must have misconfigured something between Fabric and Firebase. Once I created a new project directly in Firebase and connected to it, everything worked great.

Also, double check that you are running your app in a way that crashes won't be consumed prematurely (in release mode, without Xcode attached, etc.)

Same issue here, and I've not used Fabric before.

Its been 3 days without a log in the Crashlytics console; attempted in release mode without Xcode attached, as suggested

Same issue here, my project used to be on Fabric and after migrating to Firebase iOS crashes are not showing up in Crashlytics console. I reached to Firebase support but they replied react-native-firebase is third party library and their support doesn't cover it.

Hello 馃憢, this issue has been automatically marked as stale because it has not had activity for quite some time. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. Thank you for your contributions.

Any update?

Are you guys looking in to this? This has been an issue for a very long time. Multiple issue threads on this..

This may only apply to ex-Fabric users, but I fixed it by shutting down my Fabric account, deleting Crashlytics from Firebase, then following the Firebase's instructions page on Installing Crashlytics for Android. Now I get stack traces on crashes in Firebase. Hope that helps someone!

Hello 馃憢, this issue has been automatically marked as stale because it has not had activity for quite some time. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. Thank you for your contributions.

I have the same issue, forget the log, im not even seeing the crash even though the app DOES crash. I tried crashing it natively via java in android and via obj c in ios and it works. But causing a crash in React-native with firebase.crashlytics().crash(); does not seem to log to the dashboard in firebase crashlytics.

it does crash though
-on android
screenshot_1548911092

-on ios i get this screen
crash-ios

For anyone still interested in this and similar issue(s). My projects used to be on Fabric and after migrating (linking) to Firebase, crashes were not showing up in Firebase Crashlytics console. I tried everything, even firebase support, but only thing that helped me was the following:

  • I completely deleted Fabric projects (was I afraid? sure!)
  • I unlinked projects in Firebase project settings

After this steps crashes started to show up in Firebase console.

What is the solution?

firebase.crashlytics.log("test crash")

When I test the crash with this code, I got undefined TypeError.

What is the solution?

firebase.crashlytics.log("test crash")

When I test the crash with this code, I got undefined TypeError.

You are missing a parenthesis. It should be firebase.crashlytics().log("test crash");

Based on the testing that I have done with firebase.crashlytics().crash() it would appear that there has been a change in the core library that prevents firebase.crashlytics().crash() from working with firebase.crashlytics().log(). From the testing, it appears that you can use any of the setValue options from crashlytics and also you can use firebase.analytics() events with firebase.crashlytics().crash(). I have a PR on docs that I will improve some more to include these findings. If anyone would like to verify my findings I would appreciate it.

Hey all, Crashlytics has recently had a major overhaul in https://github.com/invertase/react-native-firebase/pull/1958 - this will land as part of v6.

As this issue no longer applies (JS stack traces/Errors now supported, .crash() now crashes and reports correctly etc) I will close and lock this issue.

[[The full changelog can be viewed here](https://github.com/invertase/react-native-firebase/blob/master/CHANGELOG.md#crashlytics)]

If you have any feedback/queries relating to the PR above please ask in the #crashlytics discord channel or create an issue with [v6] in the title.

Thanks for reporting and thanks for your patience 馃挍


Loving react-native-firebase and the support we provide? Please consider supporting us with any of the below:

Was this page helpful?
0 / 5 - 0 ratings