Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React native crashlytics not working on ios #6203

Closed
eranda-intervest opened this issue Apr 19, 2022 · 19 comments · Fixed by #6234
Closed

React native crashlytics not working on ios #6203

eranda-intervest opened this issue Apr 19, 2022 · 19 comments · Fixed by #6234

Comments

@eranda-intervest
Copy link

Hi i have updated React native crashlytics to latest and running a test crash on ios emulator
its not working and crash is not working also
"@react-native-firebase/analytics": "^14.7.0",
"@react-native-firebase/app": "^14.7.0",
"@react-native-firebase/crashlytics": "^14.7.0",
"@react-native-firebase/messaging": "^14.7.0",
"@react-native-firebase/perf": "^14.7.0",

debug logs says as below
022-04-19 15:48:05.733 Db Wapp Staging[90125:12dba9] [com.apple.defaults:User Defaults] found no value for key crashlytics_debug_enabled in CFPrefsSearchListSource<0x600001b42500> (Domain: io.invertase.firebase, Container: (null))
2022-04-19 15:48:05.733 Df Wapp Staging[90125:12dba9] +[RNFBSharedUtils getConfigBooleanValue:key:defaultValue:] [Line 157] RNFBCrashlyticsInit crashlytics_debug_enabled via RNFBMeta: 0
2022-04-19 15:48:05.733 Df Wapp Staging[90125:12dba9] +[RNFBSharedUtils getConfigBooleanValue:key:defaultValue:] [Line 160] RNFBCrashlyticsInit crashlytics_debug_enabled final value: 0
2022-04-19 15:48:05.734 Df Wapp Staging[90125:12dba9] +[RNFBCrashlyticsInitProvider isCrashlyticsCollectionEnabled] [Line 49] RNFBCrashlyticsInit isCrashlyticsCollectionEnabled after checking crashlytics_debug_enabled: 0
2022-04-19 15:48:05.734 I Wapp Staging[90125:12dba9] [com.facebook.react.log:native] Crashlytics - INFO: crashlytics collection is not enabled, not crashing.

Originally posted by @eranda-intervest in #6202

@eranda-intervest eranda-intervest changed the title Hi i have updated React native crashlytics to latest and running a test crash on ios emulator React native crashlytics to latest and running a test crash on ios emulator Apr 19, 2022
@eranda-intervest eranda-intervest changed the title React native crashlytics to latest and running a test crash on ios emulator React native crashlytics not working on ios Apr 19, 2022
@mikehardy
Copy link
Collaborator

Hi there! So, it's not enabled, it will not work. You will like:
https://invertase.io/blog/react-native-firebase-crashlytics-configuration

@eranda-intervest
Copy link
Author

eranda-intervest commented Apr 19, 2022

Hi there! So, it's not enabled, it will not work. You will like: https://invertase.io/blog/react-native-firebase-crashlytics-configuration

How to enable this. all the mention configurations are done. is there any thing need to be added specifically to enable
@mikehardy

@mikehardy
Copy link
Collaborator

If it's iOS only, perhaps you did not pod install after changing firebase.json? We use ruby as a cocoapods install hook to put the firebase.json settings in to your Info.plist for the app
Otherwise, not sure. Definitely works for me 🤔

@eranda-intervest
Copy link
Author

2022-04-19 21:24:15.884 Df Wapp Staging[27554:17e70d] [Firebase/Crashlytics] Version 8.14.0
2022-04-19 21:24:15.902 Db Wapp Staging[27554:17e70d] [com.apple.defaults:User Defaults] found no value for key crashlytics_debug_enabled in CFPrefsSearchListSource<0x60000303da80> (Domain: io.invertase.firebase, Container: (null))
2022-04-19 21:24:15.903 Df Wapp Staging[27554:17e70d] +[RNFBSharedUtils getConfigBooleanValue:key:defaultValue:] [Line 157] RNFBCrashlyticsInit crashlytics_debug_enabled via RNFBMeta: 0
2022-04-19 21:24:15.903 Df Wapp Staging[27554:17e70d] +[RNFBSharedUtils getConfigBooleanValue:key:defaultValue:] [Line 160] RNFBCrashlyticsInit crashlytics_debug_enabled final value: 0
2022-04-19 21:24:15.904 Df Wapp Staging[27554:17e70d] +[RNFBCrashlyticsInitProvider isCrashlyticsCollectionEnabled] [Line 49] RNFBCrashlyticsInit isCrashlyticsCollectionEnabled after checking crashlytics_debug_enabled: 0
2022-04-19 21:24:15.906 Df Wapp Staging[27554:17e70d] +[RNFBCrashlyticsInitProvider configureWithApp:] [Line 101] RNFBCrashlyticsInit initialization successful
2022-04-19 21:24:15.956 Db Wapp Staging[27554:17e726] 8.14.0 - [Firebase/Crashlytics][I-CLS000000] [Crashlytics] Running on iOS Simulator (iPhone), 15.4.0 (21E230)
2022-04-19 21:24:15.960 Db Wapp Staging[27554:17e726] 8.14.0 - [Firebase/Crashlytics][I-CLS000000] [Crashlytics:Settings] Settings expired because build instance changed
2022-04-19 21:24:15.960 Df Wapp Staging[27554:17e726] 8.14.0 - [Firebase/Crashlytics][I-CLS000000] Found legacy data collection key in app's Info.plist: firebase_crashlytics_collection_enabled
2022-04-19 21:24:15.961 Df Wapp Staging[27554:17e726] 8.14.0 - [Firebase/Crashlytics][I-CLS000000] Please update your Info.plist to use the new data collection key: FirebaseCrashlyticsCollectionEnabled
2022-04-19 21:24:15.961 Df Wapp Staging[27554:17e726] 8.14.0 - [Firebase/Crashlytics][I-CLS000000] The legacy data collection Info.plist value could be overridden by calling: [Fabric with:...]
2022-04-19 21:24:15.962 Df Wapp Staging[27554:17e726] 8.14.0 - [Firebase/Crashlytics][I-CLS000000] The new value can be overridden by calling: [[FIRCrashlytics crashlytics] setCrashlyticsCollectionEnabled:]
2022-04-19 21:24:17.190 Db Wapp Staging[27554:17e736] [com.apple.defaults:User Defaults] found no value for key crashlytics_debug_enabled in CFPrefsSearchListSource<0x60000303da80> (Domain: io.invertase.firebase, Container: (null))
2022-04-19 21:24:17.190 Df Wapp Staging[27554:17e736] +[RNFBSharedUtils getConfigBooleanValue:key:defaultValue:] [Line 157] RNFBCrashlyticsInit crashlytics_debug_enabled via RNFBMeta: 0
2022-04-19 21:24:17.191 Df Wapp Staging[27554:17e736] +[RNFBSharedUtils getConfigBooleanValue:key:defaultValue:] [Line 160] RNFBCrashlyticsInit crashlytics_debug_enabled final value: 0
2022-04-19 21:24:17.191 Df Wapp Staging[27554:17e736] +[RNFBCrashlyticsInitProvider isCrashlyticsCollectionEnabled] [Line 49] RNFBCrashlyticsInit isCrashlyticsCollectionEnabled after checking crashlytics_debug_enabled: 0
2022-04-19 21:24:17.191 Db Wapp Staging[27554:17e736] [com.apple.defaults:User Defaults] found no value for key crashlytics_is_error_generation_on_js_crash_enabled in CFPrefsSearchListSource<0x60000303da80> (Domain: io.invertase.firebase, Container: (null))
2022-04-19 21:24:17.191 Df Wapp Staging[27554:17e736] +[RNFBSharedUtils getConfigBooleanValue:key:defaultValue:] [Line 157] RNFBCrashlyticsInit crashlytics_is_error_generation_on_js_crash_enabled via RNFBMeta: 1
2022-04-19 21:24:17.191 Df Wapp Staging[27554:17e736] +[RNFBSharedUtils getConfigBooleanValue:key:defaultValue:] [Line 160] RNFBCrashlyticsInit crashlytics_is_error_generation_on_js_crash_enabled final value: 1
2022-04-19 21:24:17.191 Db Wapp Staging[27554:17e736] [com.apple.defaults:User Defaults] found no value for key crashlytics_javascript_exception_handler_chaining_enabled in CFPrefsSearchListSource<0x60000303da80> (Domain: io.invertase.firebase, Container: (null))
2022-04-19 21:24:17.191 Df Wapp Staging[27554:17e736] +[RNFBSharedUtils getConfigBooleanValue:key:defaultValue:] [Line 157] RNFBCrashlyticsInit crashlytics_javascript_exception_handler_chaining_enabled via RNFBMeta: 1
2022-04-19 21:24:17.191 Df Wapp Staging[27554:17e736] +[RNFBSharedUtils getConfigBooleanValue:key:defaultValue:] [Line 160] RNFBCrashlyticsInit crashlytics_javascript_exception_handler_chaining_enabled final value: 1
2022-04-19 21:24:17.192 I Wapp Staging[27554:17e736] [com.facebook.react.log:javascript] Require cycle: app/Entrypoint.js -> app/navigation/index.js -> app/navigation/stackNavigators/index.js -> app/navigation/stackNavigators/authStack.js -> app/screens/account/deviceSetup/index.js -> app/components/index.js -> app/components/textFieldUI/index.js -> app/utils/stringUtils.js -> app/helpers/FirebaseCrashlytics.js -> app/Entrypoint.js
2022-04-19 21:24:17.767 Db Wapp Staging[27554:17e726] [com.apple.defaults:User Defaults] CFPrefsPlistSource<0x60000303db00> (Domain: io.invertase.firebase, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null), Contents Need Refresh: No) skipping setting already-present value for key crashlytics_auto_collection_enabled
2022-04-19 21:24:17.797 Df Wapp Staging[27554:17e72f] 8.14.0 - [Firebase/Crashlytics][I-CLS000000] WARNING: FIRCLSLog has been used before (or concurrently with) Crashlytics initialization and cannot be recorded. The message was:
2022-04-19 21:24:18.002 Df Wapp Staging[27554:17e72f] 8.14.0 - [Firebase/Crashlytics][I-CLS000000] WARNING: FIRCLSLog has been used before (or concurrently with) Crashlytics initialization and cannot be recorded. The message was:
2022-04-19 21:24:18.002 Df Wapp Staging[27554:17e72f] 8.14.0 - [Firebase/Crashlytics][I-CLS000000] WARNING: FIRCLSLog has been used before (or concurrently with) Crashlytics initialization and cannot be recorded. The message was:
2022-04-19 21:24:18.201 Df Wapp Staging[27554:17e7a0] 8.14.0 - [Firebase/Crashlytics][I-CLS000000] WARNING: FIRCLSLog has been used before (or concurrently with) Crashlytics initialization and cannot be recorded. The message was:
2022-04-19 21:24:18.201 Df Wapp Staging[27554:17e7a0] 8.14.0 - [Firebase/Crashlytics][I-CLS000000] WARNING: FIRCLSLog has been used before (or concurrently with) Crashlytics initialization and cannot be recorded. The message was:
2022-04-19 21:24:19.147 Df Wapp Staging[27554:17e75b] 8.14.0 - [Firebase/Crashlytics][I-CLS000000] WARNING: FIRCLSLog has been used before (or concurrently with) Crashlytics initialization and cannot be recorded. The message was:
2022-04-19 21:24:19.151 Df Wapp Staging[27554:17e75b] 8.14.0 - [Firebase/Crashlytics][I-CLS000000] WARNING: FIRCLSLog has been used before (or concurrently with) Crashlytics initialization and cannot be recorded. The message was:
2022-04-19 21:24:19.152 Df Wapp Staging[27554:17e75b] 8.14.0 - [Firebase/Crashlytics][I-CLS000000]

@eranda-intervest
Copy link
Author

eranda-intervest commented Apr 19, 2022

Can you please share the configuration details. infoplist file where keys should added and what are the keys and appdelegate.m file configs also @mikehardy

@mikehardy
Copy link
Collaborator

You should check our e2e app, which serves as an example.
https://github.com/invertase/react-native-firebase/blob/main/tests/firebase.json

I'm sorry I won't have time to respond on this further. Our e2e tests app (which has a README for running it) actually has two crash buttons where you can test it. And I wrote a whole blog on how to configure it, plus added those log messages so you could positively confirm it is working. It is working

You can pull the ios simulator logs from our e2e ios actions (they are uploaded as test artifacts) and see it even I believe

@mikehardy
Copy link
Collaborator

The ios reference docs have the information if you really want to do it manually though - https://firebase.google.com/docs/crashlytics/get-started?platform=ios

@eranda-intervest
Copy link
Author

how to enable this
2022-04-19 22:40:54.447 I Wapp Staging[36495:194ad5] [com.facebook.react.log:native] Crashlytics - INFO: crashlytics collection is not enabled, not crashing.

@mikehardy
Copy link
Collaborator

The critical piece of missing information was my execution environment is typically macOS 11 still (as is our CI environment) and I will bet $1 that yours is macOS 12.3+ yes? They removed the python binary in that "feature release" (nice one!) and only python3 was available. Finally tracked it down after reproducing this conclusively in unrelated work. I'm posting a PR for this now. What a hassle! Sorry for the trouble @eranda-intervest

@mikehardy
Copy link
Collaborator

reported success on the other linked issue from the PR where I fixed this - it really should work now with v14.9.2, cheers

@devon2018
Copy link

devon2018 commented Oct 7, 2022

I am still experiencing this issue with the latest version of the library and using macOS 12.6, also using react native v0.70.

@mikehardy
Copy link
Collaborator

@devon2018 I'm not aware of "this issue" (which was discovered to have a root cause of python no longer installed) still existing, with current react-native-firebase, after running pod install. If you're still having a problem please open a new issue following the template (and in general in the spirit of https://stackoverflow.com/help/how-to-ask / https://stackoverflow.com/help/minimal-reproducible-example)

@banuharshavardhan
Copy link

Where do this firebase.json file located. I don't see it anywhere in my react-native project folder. Can anyone help me out?

@mikehardy
Copy link
Collaborator

@DevVibhor
Copy link

@banuharshavardhan You need to create your own firebase.json in the root of your project. For reference you can configure it from https://github.com/invertase/react-native-firebase/blob/main/tests/firebase.json and run pod install as mentioned by @mikehardy.

@thsanki
Copy link

thsanki commented Jan 8, 2025

@mikehardy can you help me i tried everything but i wont able to solve my problems of this getting same error i am using "react-native": "0.70.0",
"@react-native-firebase/app": "^18.7.1",
"@react-native-firebase/auth": "^18.7.1",
"@react-native-firebase/crashlytics": "18.7.1",
"@react-native-firebase/messaging": "^18.7.1",

Crashlytics - INFO: crashlytics collection is not enabled, not crashing.
+[RNFBSharedUtils getConfigBooleanValue:key:defaultValue:] [Line 157] RNFBCrashlyticsInit crashlytics_debug_enabled via RNFBMeta: 0
+[RNFBSharedUtils getConfigBooleanValue:key:defaultValue:] [Line 160] RNFBCrashlyticsInit crashlytics_debug_enabled final value: 0
+[RNFBCrashlyticsInitProvider isCrashlyticsCollectionEnabled] [Line 49] RNFBCrashlyticsInit isCrashlyticsCollectionEnabled after checking crashlytics_debug_enabled: 0
+[RNFBSharedUtils getConfigBooleanValue:key:defaultValue:] [Line 157] RNFBCrashlyticsInit crashlytics_debug_enabled via RNFBMeta: 0
+[RNFBSharedUtils getConfigBooleanValue:key:defaultValue:] [Line 160] RNFBCrashlyticsInit crashlytics_debug_enabled final value: 0
+[RNFBCrashlyticsInitProvider isCrashlyticsCollectionEnabled] [Line 49] RNFBCrashlyticsInit isCrashlyticsCollectionEnabled after checking crashlytics_debug_enabled: 0
+[RNFBSharedUtils getConfigBooleanValue:key:defaultValue:] [Line 157] RNFBCrashlyticsInit crashlytics_debug_enabled via RNFBMeta: 0
+[RNFBSharedUtils getConfigBooleanValue:key:defaultValue:] [Line 160] RNFBCrashlyticsInit crashlytics_debug_enabled final value: 0
+[RNFBCrashlyticsInitProvider isCrashlyticsCollectionEnabled] [Line 49] RNFBCrashlyticsInit isCrashlyticsCollectionEnabled after checking crashlytics_debug_enabled: 0

@mikehardy
Copy link
Collaborator

Please update to current versions of react-native and react-native-firebase then try again
Attempting to access support on old versions is inefficient and not something worth spending time on

@thsanki
Copy link

thsanki commented Jan 8, 2025

Please update to current versions of react-native and react-native-firebase then try again Attempting to access support on old versions is inefficient and not something worth spending time on

I have updated to the latest versions of React Native Firebase but currently it is not possible for me to update React Native because it is a working project and I don’t want to deal with additional headaches right now after updating firebase still getting that error @mikehardy

@mikehardy
Copy link
Collaborator

@thsanki best to open a new issue and fill out the template. This original issue is from 3 years ago and react-native-firebase v14. Ridiculously old. Please be very clear when opening the issue about the actual problem you're experiencing

https://stackoverflow.com/help/how-to-ask

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants