FIRRemoteConfig Crashing on iOS 13
We are getting roughly 255 crashes in production with 97% of users on iOS 13, the remaining 3% are on iOS 12. Utilizing all the latest Firebase pods versions.
- Xcode version: 11.0
- Firebase SDK version: 6.9.0
- Firebase Component: Core
- Component version: Core (6.9.0), RemoteConfig (4.4.1)
Crash log & relevant backtrace:
Crashed: com.google.GoogleConfigService.FIRRemoteConfig 0 (Missing) 0x1bd61ff34 (Missing) 1 (Missing) 0x1bd61fad8 (Missing) 2 (Missing) 0x1bd61fad8 (Missing) 3 Griddy 0x104971b38 -[FIRRemoteConfig configValueForKey:namespace:] + 378 (FIRRemoteConfig.m:378) 4 Griddy 0x104912354 -[FPRRemoteConfigFlags sessionSamplingRate] + 4301972308 5 Griddy 0x1049119b4 -[FPRConfigurations sessionsSamplingPercentage] + 4301969844 6 Griddy 0x10490c8b4 -[FPRSessionManager isGaugeCollectionEnabledForSessionId:] + 4301949108 7 Griddy 0x10490c764 -[FPRSessionManager updateSessionId:] + 4301948772 8 Griddy 0x10490c4cc -[FPRSessionManager initWithNotificationCenter:] + 4301948108 9 Griddy 0x10490c428 __35+[FPRSessionManager sharedInstance]_block_invoke + 4301947944 10 (Missing) 0x1bd6717d4 (Missing) 11 (Missing) 0x1bd614eb8 (Missing) 12 Griddy 0x10490c3cc +[FPRSessionManager sharedInstance] + 4301947852 13 Griddy 0x10491ce20 -[FPRNetworkTrace start] + 4302016032 14 Griddy 0x104923e50 __InstrumentDataTaskWithRequestCompletionHandler_block_invoke + 4302044752 15 Griddy 0x104923dcc __InstrumentDataTaskWithRequestCompletionHandler_block_invoke + 4302044620 16 Griddy 0x1048fc7c4 -[FIRInstanceIDCheckinService checkinWithExistingCheckin:completion:] + 189 (FIRInstanceIDCheckinService.m:189) 17 Griddy 0x1048f9f30 -[FIRInstanceIDAuthService fetchCheckinInfoWithHandler:] + 188 (FIRInstanceIDAuthService.m:188) 18 Griddy 0x1048f329c -[FIRInstanceID tokenWithAuthorizedEntity:scope:options:handler:] + 368 (FIRInstanceID.m:368) 19 Griddy 0x10497fc64 -[RCNConfigFetch refreshInstanceIDTokenAndFetchCheckInInfoWithCompletionHandler:] + 230 (RCNFetch.m:230) 20 Griddy 0x10497f8c8 __74-[RCNConfigFetch fetchAllConfigsWithExpirationDuration:completionHandler:]_block_invoke + 190 (RCNFetch.m:190) 21 (Missing) 0x1bd670a38 (Missing) 22 (Missing) 0x1bd6717d4 (Missing) 23 (Missing) 0x1bd61a324 (Missing) 24 (Missing) 0x1bd61ae40 (Missing) 25 (Missing) 0x1bd6234ac (Missing) 26 (Missing) 0x1bd852114 (Missing) 27 (Missing) 0x1bd854cd4 (Missing)
Thanks for the report - is there any way you could share a fully symbolicated crash log? It's tough to tell the actual crash here.
This looks very similar to #3270 as well. Is it iOS 13.0 that is crashing, 13.1, or both?
Haven't been able to trigger/replicate this crash that a lot of the users are experiencing in order to get over the crash dump logs. Crashlytics is saying 78% iOS 13.0, 21% iOS 13.1.
I had a look at #3270, it does look very similar. Our users are also reporting uninstalling and reinstalling does not fix the problem.
Hi,
We're experiencing the same issue. It appears to be happening when the app launches, the main thread is dealing with code in: func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {}
App: -[FIRRemoteConfig configValueForKey:namespace:] + 220
CRASHED THREAD (#3695 :
#0 (null) in __DISPATCH_WAIT_FOR_QUEUE__ ()
#1 (null) in _dispatch_sync_f_slow ()
#2 (null) in _dispatch_sync_f_slow ()
#3 0x0000000100b59304 in -[FIRRemoteConfig configValueForKey:namespace:] at /MyApp/Pods/FirebaseRemoteConfig/FirebaseRemoteConfig/Sources/FIRRemoteConfig.m:360
#4 (null) in -[FPRRemoteConfigFlags sessionSamplingRate] ()
#5 (null) in -[FPRConfigurations sessionsSamplingPercentage] ()
#6 (null) in -[FPRSessionManager isGaugeCollectionEnabledForSessionId:] ()
#7 (null) in -[FPRSessionManager updateSessionId:] ()
#8 (null) in -[FPRSessionManager initWithNotificationCenter:] ()
#9 (null) in __35+[FPRSessionManager sharedInstance]_block_invoke ()
#10 (null) in _dispatch_client_callout ()
#11 (null) in _dispatch_once_callout ()
#12 (null) in +[FPRSessionManager sharedInstance] ()
#13 (null) in -[FPRNetworkTrace start] ()
#14 (null) in __InstrumentDataTaskWithRequestCompletionHandler_block_invoke ()
#15 (null) in __InstrumentDataTaskWithRequestCompletionHandler_block_invoke ()
#16 0x0000000100ae5e98 in -[FIRInstanceIDCheckinService checkinWithExistingCheckin:completion:] at /MyApp/Pods/FirebaseInstanceID/Firebase/InstanceID/FIRInstanceIDCheckinService.m:189
#17 0x0000000100ae37c4 in -[FIRInstanceIDAuthService fetchCheckinInfoWithHandler:] at /MyApp/Pods/FirebaseInstanceID/Firebase/InstanceID/FIRInstanceIDAuthService.m:188
#18 0x0000000100adcd38 in -[FIRInstanceID tokenWithAuthorizedEntity:scope:options:handler:] at /MyApp/Pods/FirebaseInstanceID/Firebase/InstanceID/FIRInstanceID.m:324
#19 0x0000000100b66a10 in -[RCNConfigFetch refreshInstanceIDTokenAndFetchCheckInInfoWithCompletionHandler:] at /MyApp/Pods/FirebaseRemoteConfig/FirebaseRemoteConfig/Sources/RCNFetch.m:230
#20 0x0000000100b66680 in __74-[RCNConfigFetch fetchAllConfigsWithExpirationDuration:completionHandler:]_block_invoke at /MyApp/Pods/FirebaseRemoteConfig/FirebaseRemoteConfig/Sources/RCNFetch.m:190
#21 (null) in _dispatch_call_block_and_release ()
#22 (null) in _dispatch_client_callout ()
#23 (null) in _dispatch_lane_serial_drain ()
#24 (null) in _dispatch_lane_invoke ()
#25 (null) in _dispatch_workloop_worker_thread ()
#26 (null) in _pthread_wqthread ()
#27 (null) in start_wqthread ()
ANOTHER BACKGROUND THREAD:
#0 (null) in mach_msg_trap ()
#1 (null) in mach_msg ()
#2 (null) in _dispatch_mach_msg_send ()
#3 (null) in _dispatch_mach_send_drain ()
#4 (null) in _dispatch_mach_send_msg ()
#5 (null) in _dispatch_mach_send_and_wait_for_reply ()
#6 (null) in dispatch_mach_send_with_result_and_wait_for_reply ()
#7 (null) in xpc_connection_send_message_with_reply_sync ()
#8 (null) in __NSXPCCONNECTION_IS_WAITING_FOR_A_SYNCHRONOUS_REPLY__ ()
#9 (null) in -[NSXPCConnection _sendInvocation:orArguments:count:methodSignature:selector:withProxy:] ()
#10 (null) in -[NSXPCConnection _sendSelector:withProxy:arg1:arg2:] ()
#11 (null) in _NSXPCDistantObjectSimpleMessageSend2 ()
#12 (null) in -[CoreTelephonyClient(Subscriber) copyMobileSubscriberCountryCode:error:] ()
#13 (null) in -[CTTelephonyNetworkInfo getMobileCountryCode:andIsoCountryCode:forContext:withError:] ()
#14 (null) in -[CTTelephonyNetworkInfo updateNetworkInfoAndShouldNotifyClient:forContext:] ()
#15 (null) in -[CTTelephonyNetworkInfo initWithClient:] ()
#16 (null) in -[CTTelephonyNetworkInfo init] ()
#17 (null) in __FPRNetworkInfo_block_invoke ()
#18 (null) in _dispatch_client_callout ()
#19 (null) in _dispatch_once_callout ()
#20 (null) in FPRNetworkInfo ()
#21 (null) in __42-[FPRClient startWithConfiguration:error:]_block_invoke ()
#22 (null) in _dispatch_call_block_and_release ()
#23 (null) in _dispatch_client_callout ()
#24 (null) in _dispatch_lane_serial_drain ()
#25 (null) in _dispatch_lane_invoke ()
#26 (null) in _dispatch_workloop_worker_thread ()
#27 (null) in _pthread_wqthread ()
#28 (null) in start_wqthread ()
The app is crashing in a background thread.
iOS: 13.0 (17A577)
Podfile.lock info:
- Firebase/Core (6.8.1):
- Firebase/CoreOnly
- FirebaseAnalytics (= 6.1.1)
- Firebase/CoreOnly (6.8.1):
- FirebaseCore (= 6.2.3)
- Firebase/Performance (6.8.1):
- Firebase/CoreOnly
- FirebasePerformance (~> 3.1.4)
- Firebase/RemoteConfig (6.8.1):
- Firebase/CoreOnly
- FirebaseRemoteConfig (~> 4.4.0)
- FirebaseABTesting (3.1.1):
- FirebaseAnalyticsInterop (~> 1.3)
- FirebaseCore (~> 6.1)
- Protobuf (~> 3.8)
- FirebaseAnalytics (6.1.1):
- FirebaseCore (~> 6.2)
- FirebaseInstanceID (~> 4.2)
- GoogleAppMeasurement (= 6.1.1)
- GoogleUtilities/AppDelegateSwizzler (~> 6.0)
- GoogleUtilities/MethodSwizzler (~> 6.0)
- GoogleUtilities/Network (~> 6.0)
- "GoogleUtilities/NSData+zlib (~> 6.0)"
- nanopb (~> 0.3)
- FirebaseAnalyticsInterop (1.4.0)
- FirebaseCore (6.2.3):
- FirebaseCoreDiagnostics (~> 1.0)
- FirebaseCoreDiagnosticsInterop (~> 1.0)
- GoogleUtilities/Environment (~> 6.2)
- GoogleUtilities/Logger (~> 6.2)
- FirebaseCoreDiagnostics (1.0.1):
- FirebaseCoreDiagnosticsInterop (~> 1.0)
- GoogleDataTransportCCTSupport (~> 1.0)
- GoogleUtilities/Environment (~> 6.2)
- GoogleUtilities/Logger (~> 6.2)
- FirebaseCoreDiagnosticsInterop (1.0.0)
- FirebaseInstanceID (4.2.5):
- FirebaseCore (~> 6.0)
- GoogleUtilities/Environment (~> 6.0)
- GoogleUtilities/UserDefaults (~> 6.0)
- FirebasePerformance (3.1.4):
- FirebaseCore (~> 6.2)
- FirebaseInstanceID (~> 4.2)
- FirebaseRemoteConfig (~> 4.4)
- GoogleToolboxForMac/Logger (~> 2.1)
- "GoogleToolboxForMac/NSData+zlib (~> 2.1)"
- GoogleUtilities/Environment (~> 6.2)
- GoogleUtilities/ISASwizzler (~> 6.2)
- GoogleUtilities/MethodSwizzler (~> 6.2)
- GTMSessionFetcher/Core (~> 1.1)
- Protobuf (~> 3.9)
- FirebaseRemoteConfig (4.4.0):
- FirebaseABTesting (~> 3.1)
- FirebaseAnalyticsInterop (~> 1.4)
- FirebaseCore (~> 6.2)
- FirebaseInstanceID (~> 4.2)
- GoogleUtilities/Environment (~> 6.2)
- "GoogleUtilities/NSData+zlib (~> 6.2)"
- Protobuf (~> 3.9)
Apologies for the issues folks. We're working on getting this resolved as soon as possible. In the meantime, temporarily removing Firebase Performance from the project should resolve the issue if you need to ship an update. We'll keep this thread up to date with information on when a fix is found and ready.
Is this happening all the time at startup? (We are not able to repro). This issue was known to be fixed in the Perf SDK. Some folks had lingering pods that were again showing the issue. Can you confirm this is not the case for you? E.g. https://github.com/firebase/firebase-ios-sdk/issues/3842
We deploy builds from TravisCI which compile and ship builds from a clean VM slate which install the pods during that time so it doesn't look like there could be lingering pods that were removed but not completely "removed"
@md-griddy @leandromperez Can you confirm this crash is happening on the version of your app that is using the latest version of the Perf SDK? Ideally the latest version should not face this crash.
Yes, for sure our last two releases were on 3.1.4 and 3.1.2 Perf SDKs
Users are experiencing immediate crash upon app startup
@md-griddy After some debugging, we might have figured out the root cause of this issue and we will be rolling out a fix to the SDK in the upcoming release. ETA: October 8 2019.
@md-griddy After some debugging, we might have figured out the root cause of this issue and we will be rolling out a fix to the SDK in the upcoming release. ETA: October 8 2019.
Awesome, thank you!
Firebase 6.10.0 was released a few moments ago that should contain a fix for this issue. Please update and re-open the issue if it still persists.
We're having the same crash even after updating to 6.10.0.
@tomerciucran Is it the same backtrace as above?
@paulb777 Yes.
@tomerciucran Were you able to get this crash during development time or in production?
If in production, is the volume of crash similar to earlier?
@visumickey In development. We have Firebase version 5.20.2 currently in production.
@tomerciucran That is nice you were able to catch in development. Few more questions:
- Is this happening during app start up or later?
- Is this consistent?
- Can you provide us a sample app where this is happening?
@visumickey Sorry for the late response.
- It is happening on app launch.
- It is consistent.
- Unfortunately no resources at the moment to provide a sample app for this.
This is only tangentially related, but as a react-native-firebase maintainer, releasing a crash fix in the same semver as releasing breaking changes to MLKit makes it difficult to message to users what the compatibility matrix of versions is. This should be in 6.xx and the MLKit breaking stuff should have gone in a 7.0. This adds downstream support and documentation burden.
@mikehardy MLKit is still in beta and I would recommend expectations be set for ongoing breaking changes.