Closed philip511 closed 10 months ago
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
Thanks for the report @philip511. Please share the Firebase version used in the app
@paulb777 Sorry! I updated my post, SDK version 10.16.0
Thanks for reporting @philip511 . It'd be quite difficult to pinpoint the bug without a reproduction.
The stack trace suggests the issue to be related to converting a Firestore "Value" to an obj-c type. Would you be able to share the document content(s) that are being read? (feel free to obfuscate the content, but keep the types and also keep empty strings and nulls)
Thanks!
Yea, I mean the document content isn't anything special. It's about 30ish keys. Mostly strings, maps, and arrays.
@philip511 please share the document data anyway, redacted if necessary.
Closing as there's been no repro.
Description
I am experiencing this crash on one specific line of code, in one specific method, within the first 2 seconds of the app openning.
This crash occurrs randomly on my users devices and never on mine so I cannot reproduce it. I just have what Firebase Crashlytics provides.
Some extra details about the code:
This query is run in ViewDidLoad on the first page the user sees when they open the app
This query is run in a background thread
This query is run concurrently with 6 other queries each on their own background thread
This crash only occurs in this specific query in this specific line
This crash usually occurs on the first iteration of FIRDocumentSnapshot but occasionally occurs after multiple iterations
Some solutions I've already tried:
I've tried allowing this query to finish before running any other queries
I've tried running this query last, after all other queries have finished
I've tried adding NULL checks to snapshot, doc, and doc.data
I've tried checking for an NSError
I've tried running it on the main thread
Crash occurs on this line when accessing doc.data
NSLog(@"Test %@", doc.data);
Reproducing the issue
I am completely unable to reproduce this issue. I just have the information that Firebase Crashlytics provides
Firebase SDK Version
10.16.0
Xcode Version
15.0.1
Installation Method
CocoaPods
Firebase Product(s)
Firestore
Targeted Platforms
iOS
Relevant Log Output
If using Swift Package Manager, the project's Package.resolved
Expand
Package.resolved
snippet```json Replace this line with the contents of your Package.resolved. ```
If using CocoaPods, the project's Podfile.lock
Expand
Podfile.lock
snippet```yml # Uncomment the next line to define a global platform for your project platform :ios, '14.0' target 'WeDivvy' do # Comment the next line if you don't want to use dynamic frameworks use_frameworks! # Pods for WeDivvy post_install do |installer| installer.generated_projects.each do |project| project.targets.each do |target| target.build_configurations.each do |config| config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '14.0' end end end end ENV['SWIFT_VERSION'] = '5' pod 'Firebase/Core' pod 'Firebase/Crashlytics' pod 'Firebase/Database' pod 'Firebase/Analytics' pod 'Firebase/Auth' pod 'Firebase/Storage' pod 'Firebase/Messaging' pod 'Firebase/Firestore' pod 'Firebase/Functions' pod 'MRProgress' pod 'InstantSearch' pod 'InstantSearchClient' pod 'SDWebImage' pod 'Mixpanel' pod 'GoogleSignIn' end ```