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

[🐛] Crashlytics not recording anything in the dashboard in ios #7661

Open
renesoaresse opened this issue Mar 1, 2024 · 9 comments
Open
Labels
Help: Needs Triage Issue needs additional investigation/triaging. Impact: Bug New bug report Type: Stale Issue has become stale - automatically added by Stale bot

Comments

@renesoaresse
Copy link

Crashlytics implementation now its not working properly
When running on ios emulator its always said following debug logs.
i have followed everything in this also but no luck - https://invertase.io/blog/react-native-firebase-crashlytics-configuration

debug logs as below

2024-03-01 15:57:25.266 Df [70950:496b75] [Firebase/Crashlytics] Version 10.15.0
2024-03-01 15:57:25.273 Db [70950:496b75] [com.apple.defaults:User Defaults] found no value for key crashlytics_debug_enabled in CFPrefsSearchListSource<0x60000300c990> (Domain: io.invertase.firebase, Container: (null))
2024-03-01 15:57:25.273 Df [70950:496b75] +[RNFBSharedUtils getConfigBooleanValue:key:defaultValue:] [Line 157] RNFBCrashlyticsInit crashlytics_debug_enabled via RNFBMeta: 0
2024-03-01 15:57:25.273 Df [70950:496b75] +[RNFBSharedUtils getConfigBooleanValue:key:defaultValue:] [Line 160] RNFBCrashlyticsInit crashlytics_debug_enabled final value: 0
2024-03-01 15:57:25.274 Df [70950:496b75] +[RNFBCrashlyticsInitProvider isCrashlyticsCollectionEnabled] [Line 49] RNFBCrashlyticsInit isCrashlyticsCollectionEnabled after checking crashlytics_debug_enabled: 0
2024-03-01 15:57:25.274 Df [70950:496b75] +[RNFBCrashlyticsInitProvider configureWithApp:] [Line 101] RNFBCrashlyticsInit initialization successful
2024-03-01 15:57:26.138 Db [70950:496bb9] [com.apple.defaults:User Defaults] found no value for key crashlytics_debug_enabled in CFPrefsSearchListSource<0x60000300c990> (Domain: io.invertase.firebase, Container: (null))
2024-03-01 15:57:26.138 Df [70950:496bb9] +[RNFBSharedUtils getConfigBooleanValue:key:defaultValue:] [Line 157] RNFBCrashlyticsInit crashlytics_debug_enabled via RNFBMeta: 0
2024-03-01 15:57:26.139 Df [70950:496bb9] +[RNFBSharedUtils getConfigBooleanValue:key:defaultValue:] [Line 160] RNFBCrashlyticsInit crashlytics_debug_enabled final value: 0
2024-03-01 15:57:26.139 Df [70950:496bb9] +[RNFBCrashlyticsInitProvider isCrashlyticsCollectionEnabled] [Line 49] RNFBCrashlyticsInit isCrashlyticsCollectionEnabled after checking crashlytics_debug_enabled: 0
2024-03-01 15:57:26.139 Db [70950:496bb9] [com.apple.defaults:User Defaults] found no value for key crashlytics_is_error_generation_on_js_crash_enabled in CFPrefsSearchListSource<0x60000300c990> (Domain: io.invertase.firebase, Container: (null))
2024-03-01 15:57:26.139 Df [70950:496bb9] +[RNFBSharedUtils getConfigBooleanValue:key:defaultValue:] [Line 157] RNFBCrashlyticsInit crashlytics_is_error_generation_on_js_crash_enabled via RNFBMeta: 1
2024-03-01 15:57:26.139 Df [70950:496bb9] +[RNFBSharedUtils getConfigBooleanValue:key:defaultValue:] [Line 160] RNFBCrashlyticsInit crashlytics_is_error_generation_on_js_crash_enabled final value: 1
2024-03-01 15:57:26.139 Db [70950:496bb9] [com.apple.defaults:User Defaults] found no value for key crashlytics_javascript_exception_handler_chaining_enabled in CFPrefsSearchListSource<0x60000300c990> (Domain: io.invertase.firebase, Container: (null))
2024-03-01 15:57:26.139 Df [70950:496bb9] +[RNFBSharedUtils getConfigBooleanValue:key:defaultValue:] [Line 157] RNFBCrashlyticsInit crashlytics_javascript_exception_handler_chaining_enabled via RNFBMeta: 1
2024-03-01 15:57:26.139 Df [70950:496bb9] +[RNFBSharedUtils getConfigBooleanValue:key:defaultValue:] [Line 160] RNFBCrashlyticsInit crashlytics_javascript_exception_handler_chaining_enabled final value: 1

Libs Version

"@react-native-firebase/analytics": "18.6.0",
"@react-native-firebase/app": "18.6.0",
"@react-native-firebase/auth": "18.6.0",
"@react-native-firebase/crashlytics": "18.6.0",
"@react-native-firebase/database": "18.6.0",
 "react": "18.2.0",
 "react-native": "0.71-stable",

firebase.json

{
  "react-native": {
    "crashlytics_debug_enabled": true,
    "crashlytics_disable_auto_disabler": true,
    "crashlytics_auto_collection_enabled": true,
    "crashlytics_is_error_generation_on_js_crash_enabled": true,
    "crashlytics_javascript_exception_handler_chaining_enabled": true
  }
}
@renesoaresse renesoaresse added Help: Needs Triage Issue needs additional investigation/triaging. Impact: Bug New bug report labels Mar 1, 2024
@mikehardy
Copy link
Collaborator

Hi there!
After changing values in firebase.json, you need to run pod install

From the log output it appears that it sees "crashlytics_debug_enabled" as false, but firebase.json has it as true so my guess is that you have not run pod install after changing firebase.json

Give that a try (pod install), then rebuild the ios app and retry and it should work

@renesoaresse
Copy link
Author

@mikehardy Thank you very much for your quick response. I did exactly that more than once. From what I understand, the lib uses something from ruby ​​to be able to add data to the project. But the same error remains.

@mikehardy
Copy link
Collaborator

Yes, ios_config.sh is installed as an xcode build task by pod install and that script puts firebase.json inside the info plist for the app in the deriveddata folder as a a base64 blob in an attribute

That is then read by the react-native-firebase code to pull your config values

Something in that chain isn't happening but you can find the plist in deriveddata and check if firebase.json is in there with correct values after decoding it , and you could alter ios_config.sh to print what it sees

You can make sure the build you make is actually what runs. Something isn't correct but Im not sure what, I just know it's possible and works for me so the code in repo should be right

@renesoaresse
Copy link
Author

renesoaresse commented Mar 4, 2024

I checked the derived data and found that in info.plist and scm.plist the data from firebase.json is not imported, like the prints below. Or am I going to the wrong .plist? Is there any way to do this import manually?

img1
img2

@Abhishek2250
Copy link

Hi, I'm also facing the same issue on iOS. It's working fine on Android though

@BouarourMohammed
Copy link

Same here.

@diegoromero93
Copy link

Same here!

@RedMaxMay
Copy link

RedMaxMay commented Apr 10, 2024

Maybe it could help.

I faced the same problem, but in my case we disabled autolinking for Firebase (on purpose, project needs) and integrated it manually. Probably because of this we accidentally skipped few scripts for IOS which could help to solve everything if autolinking is enabled.

So to fix it we added few Run Scripts for specific targets in Xcode, like that:

  1. [RNFB] Core Configuration
    This goes into run script:
    "../node_modules/@react-native-firebase/app/ios_config.sh"
    This goes into Input File:
    "$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)"

  2. [RNFB] Core Configuration
    This goes into run script:
    "../node_modules/@react-native-firebase/crashlytics/ios_config.sh"
    This goes into Input File:
    "${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${TARGET_NAME}"
    "$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)"

Screenshot 2024-04-10 at 10 23 56
Screenshot 2024-04-10 at 10 24 16

Copy link

github-actions bot commented May 8, 2024

Hello 👋, to help manage issues we automatically close stale issues.

This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?

This issue will be closed in 15 days if no further activity occurs.

Thank you for your contributions.

@github-actions github-actions bot added the Type: Stale Issue has become stale - automatically added by Stale bot label May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help: Needs Triage Issue needs additional investigation/triaging. Impact: Bug New bug report Type: Stale Issue has become stale - automatically added by Stale bot
Projects
None yet
Development

No branches or pull requests

6 participants