Comments (5)
Hi @mikehardy! Thanks for the quick response.
It appears that your deduction was right. I took the Crashlytics quickstart project, duplicated the crash button, and added the error attributes:
struct CrashButtonView: View {
var body: some View {
NavigationView {
VStack {
Button(action: {
let crashlyticsReference = Crashlytics.crashlytics()
crashlyticsReference.setCustomValue("value1", forKey: "some_attribute")
crashlyticsReference.setCustomValue("value", forKey: "another_attribute")
let error = NSError(domain: NSURLErrorDomain, code: -1001, userInfo: nil)
Crashlytics.crashlytics().record(error: error)
}) {
Text("Send Error 1")
}
Button(action: {
let crashlyticsReference = Crashlytics.crashlytics()
crashlyticsReference.setCustomValue("value2", forKey: "some_attribute")
let error = NSError(domain: NSURLErrorDomain, code: -1002, userInfo: nil)
Crashlytics.crashlytics().record(error: error)
}) {
Text("Send Error 2")
}
}
.navigationTitle("Crashlytics Example")
}
}
}
And, after repeating the experiment, I can see that the bug persists:
For Error 1:
![image](https://private-user-images.githubusercontent.com/30007451/339106176-e4d192e2-611f-42a2-8af8-1054460b9cd6.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE0NjIwOTEsIm5iZiI6MTcyMTQ2MTc5MSwicGF0aCI6Ii8zMDAwNzQ1MS8zMzkxMDYxNzYtZTRkMTkyZTItNjExZi00MmEyLThhZjgtMTA1NDQ2MGI5Y2Q2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzIwVDA3NDk1MVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTAwZmJjZWZhOGM5M2I3NWY4ZDM4M2UwYjljNTlmNjA2NTExOTkxZGQ4MDBiYjJjZTEzYzcyNzM2MDU2N2VhYjkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.Nu8VcNHHxcsKiq4p2l1fCXz4P3Vcg5a-dC_6QRh2UVE)
For Error 2:
![image](https://private-user-images.githubusercontent.com/30007451/339106277-31651527-4fe8-433e-b1ac-ef627af00b91.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE0NjIwOTEsIm5iZiI6MTcyMTQ2MTc5MSwicGF0aCI6Ii8zMDAwNzQ1MS8zMzkxMDYyNzctMzE2NTE1MjctNGZlOC00MzNlLWIxYWMtZWY2MjdhZjAwYjkxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzIwVDA3NDk1MVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQ5OTFjYWZiYmFlOGQ2YjQ3OTg1ZWJmYTA4OTM5MWY2MDU0ODg4YjE5MzFjM2U0YWNhY2IxMDk2Y2NkYjg2NzgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.adW5JX-v1WLCL71PONwiIPRIzvYor6a0WwQTQ_2RzM4)
Both reports have some_attribute
set to value2
, despite its being set to value1
for the first one. I will open an issue at firebase-ios-sdk and wait for their response.
Thanks again for the analysis!
from react-native-firebase.
Here is the firebase-sdk-ios issue that I created, for future reference: firebase/firebase-ios-sdk#13124
from react-native-firebase.
Reproductions like you've done are worth more than all the words I can put in a comment box, so your effort is the real motive force here, thanks for pursuing it upstream and hopefully there's a quick resolution - cheers
from react-native-firebase.
Interesting -
1- javascript implementation is here, does some basic argument validation then defers immediately to native:
react-native-firebase/packages/crashlytics/lib/index.js
Lines 76 to 90 in d849667
2- java implementation similarly does a basic validation that crashlytics is enabled at all, then delegates immediately to firebase-android-sdk:
3- objective-c also just verifies that crashlytics is enabled then sets the attribute via immediate delegate call to firebase-ios-sdk method:
By deduction: one of the attributes from report 1 or report 2 would be missing if the argument validation logic or crashlytics enabled verification logic were false, but the attributes are both set (and incorrectly mingled on iOS) so we may infer that we are definitely calling into firebase-ios-sdk with the setAttribute calls
Given there is nothing else happening in this layer of the stack, I think this points to an issue in firebase-ios-sdk
I believe the best next step is to make a similar reproduction using the Crashlytics quickstart https://github.com/firebase/quickstart-ios/tree/main/crashlytics and logging an issue in firebase-ios-sdk repo pointing at the issue there as I think that's where the fault is located
Note especially that if you run the quickstart app under Xcode there is a debugger attached which interferes with Crashlytics: https://github.com/firebase/quickstart-ios/tree/main/crashlytics#trigger-a-crash-in-crashlytics-quickstart-app - this causes a lot of confusion sometimes. You have to launch it manually, not under Xcode
Adding the setAttributes calls (and another crash button) is hopefully a trivial extension to the quickstart so the repro is fast - there is example code included in my code permalinks above
from react-native-firebase.
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.
from react-native-firebase.
Related Issues (20)
- Crashed: com.google.firebase.crashlytics.ios.exception HOT 2
- [π₯π] `NOT_FOUND` error when using modular `httpsCallable` functions HOT 3
- Execution failed for task ':react-native-firebase_analytics:generateDebugRFile'. HOT 2
- Unexpected (not set) pages in (firebase) analytics HOT 1
- Error Building React native App- Unable to Resolve @react-native-firebase/app in index.js file HOT 1
- Error: No Firebase App '[DEFAULT]' has been created - call firebase.initializeApp() HOT 5
- [π] FCM onMessage triggers when the app moves from background to foreground [iOS] HOT 2
- [π] Documentation Issue Title - Links within the npm site need to be modified. HOT 1
- [π] Error: No Firebase App '[DEFAULT]' has been created - call firebase.initializeApp() HOT 8
- [π] Android Crash "Unable to start receiver" HOT 4
- [π] IOS store submission warning for ITMS-90078: Missing Push Notification Entitlement after upgraded to Expo 51 HOT 1
- Token expiration issue. Would I need to manually handle the token refresh after expiration HOT 2
- Not getting 11 digit hash key for otp authentication HOT 2
- CI is not executing all the tests all the time HOT 1
- π₯ Android 14 Emulator Auth Error - One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED HOT 1
- [π] Android: isSignInWithEmailLink returns true but signInWithEmailLink throws an error HOT 2
- :fire: [π] iOS Crash: -[__NSCFNumber componentsSeparatedByString:]: unrecognized selector sent to instance 0x9b8e80 HOT 6
- [π] Bug Report Title - CHANGE ME HOT 1
- [π] TOO_MANY_REGISTRATIONS error with firebase/messaging ( messaging().getToken() )Β in android. HOT 2
- [π] Other Platforms - [Web] [Auth] Methods are unsupported or not existing HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-firebase.