-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
feat(crashlytics)!: upgrade to new Firebase Crashlytics SDK #3580
feat(crashlytics)!: upgrade to new Firebase Crashlytics SDK #3580
Conversation
bda9a8c
to
e96daba
Compare
First I just want to say this is fantastic. Thank you for taking this on But second I do want to say that using the SDK, but connected to Firebase vs legacy Fabric is (I believe) not what's going away on May 4, 2020. I refer to these as Fabric/Fabric Crashlytics, Fabric/Firebase Crashlytics and Firebase/Firebase Crashlytics. I could be wrong but the Firebase/Firebase Crashlytics beta literally just came out of beta and I can't imagine them then having a whole vital service going away about 6 days later. I think Fabric/Fabric Crashlytics is going away, but Fabric/Firebase Crashlytics is fine if I understand it correctly. All of that said, forward-porting to the future - which is Firebase/Firebase Crashlytics of course is important so this effort is huge. I just don't think it's on a such a high pressure deadline |
4821504
to
78f42bf
Compare
.../main/java/io/invertase/firebase/crashlytics/ReactNativeFirebaseCrashlyticsInitProvider.java
Show resolved
Hide resolved
public void setUserEmail(String userEmail, Promise promise) { | ||
if (ReactNativeFirebaseCrashlyticsInitProvider.isCrashlyticsCollectionEnabled()) { | ||
Crashlytics.getInstance().core.setUserEmail(userEmail); | ||
FirebaseCrashlytics.getInstance().setUserId(userId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to the init changes, are setUserName and setUserEmail going away?
If functionality is being reduced or changed there should be some migration documentation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reason for change
We adopted the method name setUserID to be consistent with other Firebase APIs and removed setUserName and setUserEmail to discourage logging PII through Crashlytics.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there should be some migration information as commented in my specific review notes, to help developers understand how to enable this in debug builds now, and the migration to setUserId vs setUserName/setUserEmail, but I want to be clear that I consider those important but small things vs most of this looking right on to me?
@Salakar / @Ehesp - do either of you two have time for a review of this? It's an important forward-port step for react-native-firebsea
// TODO(salakar): 6.x/7.x Option to disable auto init | ||
// TODO(salakar): If disabled; when the default app is initialized from JS land then init crashlytics (register a block handler somehow in RNFBApp?) | ||
if ([[RNFBJSON shared] contains:KEY_CRASHLYTICS_DEBUG_ENABLED]) { | ||
[Crashlytics sharedInstance].debugMode = [[RNFBJSON shared] getBooleanValue:KEY_CRASHLYTICS_DEBUG_ENABLED defaultValue:NO]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like the way to turn it on in debug now is -FIRDebugEnabled
in iOS, in Android unsure? https://firebase.google.com/docs/crashlytics/test-implementation-new-sdk?platform=ios#enable_debug_logging
I having issue with e2e testing. More specifically with FirebaseInstanceId delete functions. Could you give me some support ? I saw that there is SDK change on instanceId in 6.15.0.
|
Quick glance this provisionally looks ok to me, though I need to do a proper full review still which I'll do on Friday. I think there's a couple external blockers here still that I need time to sort;
|
I have try InstanceID on e2e. I don't know what the problem. But my first observation is that some methods (delete) never ends, so promise never get resolved (and test fail). |
Master now has the updated Firebase SDK, so this PR is now unblocked, would you be able to sync with master and resolve any conflicts? Thanks |
Remove setUserName/setUserEmail methods (removed from SDK)
Co-authored-by: David Buchan-Swanson <[email protected]>
5a72ffc
to
e94b376
Compare
@mikehardy PR is up to date & fix FirebaseCrashlyticsCollectionEnabled is done. |
79e6e68
to
cc4f018
Compare
cc4f018
to
65c9edd
Compare
Thanks for taking my feedback into account, for what it's worth we have a production build with those changes and it works perfectly, so I believe this is good to go :-) |
@Aure77 champion! 🏆 thank you! Good question about the spell check. @Salakar / @andersonaddo the spelling failure is from faqs-and-tips so should have been flagged there #3524 - this PR should be green or at least not blocked by that CI failure. @TPXP fantastic that you took the initiative to integrate the PR locally and report success, that helps a lot I don't think there should be anything in the way of this? Hopefully it can go in quickly before some new conflict creeps into it 🙏 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much!
IIRC, it wasn't because of a spelling mistake; I think it was because I used an acronym ("RNFB"). I figured it'd be fine. Should I push a fix? |
Nah, fix it in post. About to merge and release, can send a grammar PR after if you like :) |
@andersonaddo it is actually the string 'qa' 🤷 - seems valid in a software context |
I just integrated this in my work project with no issue, and my test crash button worked as expected in android and ios, perfect |
…e#3580) Goodbye Fabric, hello Firebase Crashlytics. BREAKING CHANGE: This is a breaking change to remove the use of the Fabric SDKs. Co-authored-by: David Buchan-Swanson <[email protected]> Co-authored-by: Mike Diarmid <[email protected]> [publish]
Description
Fabric is deprecated and will be available until May 4, 2020.
Fabric is now part of Firebase services.
Firebase has introduced a new SDK for handling Crashlytics reports. So this PR is an upgrade from upcoming deprecated Fabric SDK to new Firebase Crashlytics SDK.
Release Summary
Upgrade to new Firebase Crashlytics SDK
Checklist
Android
iOS
e2e
tests added or updated inpackages/\*\*/e2e
jest
tests added or updated inpackages/\*\*/__tests__
Test Plan