-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Fatal Exception: NSInvalidArgumentException -[NSNull dataUsingEncoding:]: unrecognized selector sent to instance 0x21c34e538 #14157
Comments
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight. |
Thanks for reporting, @yeaahboy. Based on your stack trace, the |
Hmm, I was sure I mentioned the source of the issue in the title. Looks like not, sorry. FirebaseRemoteConfig RCNConfigContent.m:347 It points onto RCNConfigContent class. I can see that the crash occurs due to an attempt to access NSNull during the process of encoding something into NSData. We don't have any NSNull objects or Objective-C code in our project — the only one is Firebase. Additionally, the error states: -[RCNConfigContent handleUpdateStateForConfigNamespace:withEntries:]. RCNConfigContent is a Firebase's library object, and I can see the use of dataUsingEncoding in this class. P.S. Unfortunately the crash doesn't occur constantly. We've got only 5 cases when crash happened. But imo you are mussing NSNull checking somewhere before this line of code: |
Thanks @yeaahboy. Would you share the full stack trace including the thread with the Remote Config crash? Is there a particular Remote Config value in the console that triggers the crash? |
@paulb777 I cannot see any suspicious data in our Remote Config, probably it had some that couldn't be encoded, but now all looks fine and doesn't trigger any crashes. Here's the stack trace. |
Thanks @yeaahboy. Is your app using a custom sqlite3 implementation? Remote Config relies upon linking the system sqlite3. |
@paulb777 Nope. We are not using sqlite in our project |
Hmm. I'm not sure how an NSNull could get into the entries array. It would be very helpful to have reproducible example to investigate. |
Description
We are receiving crash reports in Crashlytics, one of which appears to originate from Firebase. It seems unlikely that our app is directly causing this issue, as it looks like the library encounters a problem while decoding a value that turns out to be NSNull. Even if a nil value is returned from the source, we believe the library should handle it gracefully during the decoding process.
Below is the stack trace for your reference:
Reproducing the issue
No response
Firebase SDK Version
11.0.0
Xcode Version
16.1
Installation Method
CocoaPods
Firebase Product(s)
Remote Config
Targeted Platforms
iOS
Relevant Log Output
If using Swift Package Manager, the project's Package.resolved
Expand
Package.resolved
snippetReplace this line with the contents of your Package.resolved.
If using CocoaPods, the project's Podfile.lock
Expand
Podfile.lock
snippetReplace this line with the contents of your Podfile.lock!
The text was updated successfully, but these errors were encountered: