Skip to content
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

Crash in FIRInstanceIDCheckinService.m on iOS 13 when app is a new install #3842

Closed
kevinchau opened this issue Sep 13, 2019 · 20 comments
Closed

Comments

@kevinchau
Copy link

kevinchau commented Sep 13, 2019

[REQUIRED] Step 2: Describe your environment

  • Xcode version: 11 GM
  • Firebase SDK version: 6.8.1

Installing Firebase (6.8.1)
Installing FirebaseABTesting (3.1.1)
Installing FirebaseAnalytics (6.1.1)
Installing FirebaseAnalyticsInterop (1.4.0)
Installing FirebaseCore (6.2.3)
Installing FirebaseCoreDiagnostics (1.0.1)
Installing FirebaseCoreDiagnosticsInterop (1.0.0)
Installing FirebaseInstanceID (4.2.5)
Installing FirebaseMessaging (4.1.4)
Installing FirebaseRemoteConfig (4.4.0)
Installing Google-Mobile-Ads-SDK (7.49.0)
Installing GoogleAppMeasurement (6.1.1)
Installing GoogleDataTransport (1.2.0)
Installing GoogleDataTransportCCTSupport (1.0.4)
Installing GoogleMobileAdsMediationFacebook (5.5.0.0)
Installing GoogleUtilities (6.2.5)

[REQUIRED] Step 3: Describe the problem

Crashes on Launch

image

image

Relevant Code:

// TODO(you): code here to reproduce the problem
@google-oss-bot

This comment has been minimized.

@kevinchau
Copy link
Author

This only happens on the new iPhone 11 sims. I'm able to run my app just fine on XR 13.1

(lldb) bt
* thread #9, queue = 'com.google.GoogleConfigService.FIRRemoteConfig', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)
    frame #0: 0x0000000111e43db0 libdispatch.dylib`__DISPATCH_WAIT_FOR_QUEUE__ + 439
    frame #1: 0x0000000111e4379c libdispatch.dylib`_dispatch_sync_f_slow + 231
    frame #2: 0x00000001100ad30f HK`-[FIRRemoteConfig configValueForKey:namespace:] + 254
    frame #3: 0x0000000110022fac HK`-[FPRRemoteConfigFlags sessionSamplingRate] + 58
    frame #4: 0x0000000110022695 HK`-[FPRConfigurations sessionsSamplingPercentage] + 217
    frame #5: 0x000000011001c332 HK`-[FPRSessionManager isGaugeCollectionEnabledForSessionId:] + 59
    frame #6: 0x000000011001c1d5 HK`-[FPRSessionManager updateSessionId:] + 280
    frame #7: 0x000000011001bf1e HK`-[FPRSessionManager initWithNotificationCenter:] + 116
    frame #8: 0x000000011001be80 HK`__35+[FPRSessionManager sharedInstance]_block_invoke + 82
    frame #9: 0x0000000111e34d64 libdispatch.dylib`_dispatch_client_callout + 8
    frame #10: 0x0000000111e362b3 libdispatch.dylib`_dispatch_once_callout + 66
    frame #11: 0x000000011001be2b HK`+[FPRSessionManager sharedInstance] + 45
    frame #12: 0x000000011002d732 HK`-[FPRNetworkTrace start] + 216
    frame #13: 0x00000001100345d6 HK`__InstrumentDataTaskWithRequestCompletionHandler_block_invoke + 371
    frame #14: 0x000000011003454e HK`__InstrumentDataTaskWithRequestCompletionHandler_block_invoke + 235
  * frame #15: 0x000000010fd4902d HK`-[FIRInstanceIDCheckinService checkinWithExistingCheckin:completion:](self=0x0000600001750650, _cmd="checkinWithExistingCheckin:completion:", existingCheckin=0x0000000000000000, completion=0x000000010fd44cd0) at FIRInstanceIDCheckinService.m:189:32
    frame #16: 0x000000010fd44c52 HK`-[FIRInstanceIDAuthService fetchCheckinInfoWithHandler:](self=0x00006000000d0240, _cmd="fetchCheckinInfoWithHandler:", handler=0x000000010fd39ba0) at FIRInstanceIDAuthService.m:188:3
    frame #17: 0x000000010fd3983c HK`-[FIRInstanceID tokenWithAuthorizedEntity:scope:options:handler:](self=0x000060000316e580, _cmd="tokenWithAuthorizedEntity:scope:options:handler:", authorizedEntity=@"125335965097", scope=@"*", options=0x0000000000000000, handler=0x00000001100bc5e7) at FIRInstanceID.m:324:3
    frame #18: 0x00000001100bc558 HK`-[RCNConfigFetch refreshInstanceIDTokenAndFetchCheckInInfoWithCompletionHandler:] + 410
    frame #19: 0x00000001100bc10c HK`__74-[RCNConfigFetch fetchAllConfigsWithExpirationDuration:completionHandler:]_block_invoke + 297
    frame #20: 0x0000000111e33df0 libdispatch.dylib`_dispatch_call_block_and_release + 12
    frame #21: 0x0000000111e34d64 libdispatch.dylib`_dispatch_client_callout + 8
    frame #22: 0x0000000111e3b60b libdispatch.dylib`_dispatch_lane_serial_drain + 788
    frame #23: 0x0000000111e3c19b libdispatch.dylib`_dispatch_lane_invoke + 422
    frame #24: 0x0000000111e47a59 libdispatch.dylib`_dispatch_workloop_worker_thread + 722
    frame #25: 0x00007fff5141c611 libsystem_pthread.dylib`_pthread_wqthread + 421
    frame #26: 0x00007fff5141c3fd libsystem_pthread.dylib`start_wqthread + 13

@paulb777
Copy link
Member

@kevinchau Thanks for the report. Please confirm what's installed. Symbols from FirebasePerformance show up in the backtrace, but FirebasePerformance is the list of pods above.

@kevinchau
Copy link
Author

@paulb777 Thanks, here are the Firebase pods that I have:

  pod 'Firebase/RemoteConfig'
  pod 'Firebase/Core'
  pod 'Firebase/Messaging'
  pod 'Firebase/AdMob'
  pod 'Firebase/Performance'
  pod 'Fabric', '~> 1.9.0'
  pod 'Crashlytics', '~> 3.12.0'
  pod 'Firebase/InAppMessagingDisplay'

@kevinchau
Copy link
Author

kevinchau commented Sep 13, 2019

This actually crashes on every device with iOS 13 - if I delete the app, and re-install it, it will crash on first run and subsequent runs.

But if updating from iOS 12 and an older version of the app, it will run

@morganchen12
Copy link
Contributor

@kevinchau can you run bt all in the debugger after reproing the crash and share the result? The screenshot you posted and the stack trace in this comment don't match. I suspect the crash may be caused by NSURLSession misuse.

@kevinchau
Copy link
Author

kevinchau commented Sep 13, 2019

@morganchen12 no problem, here you are:

thread #1, queue = 'com.google.FirebaseInstanceID.Keychain'
    frame #0: 0x00007fff5137222a libsystem_kernel.dylib`mach_msg_trap + 10
    frame #1: 0x00007fff5137276c libsystem_kernel.dylib`mach_msg + 60
    frame #2: 0x0000000104e6b2a8 libdispatch.dylib`_dispatch_mach_send_and_wait_for_reply + 575
    frame #3: 0x0000000104e6b6ce libdispatch.dylib`dispatch_mach_send_with_result_and_wait_for_reply + 50
    frame #4: 0x00007fff5145824a libxpc.dylib`xpc_connection_send_message_with_reply_sync + 219
    frame #5: 0x00007fff2ba76966 Security`securityd_message_with_reply_sync + 94
    frame #6: 0x00007fff2ba77243 Security`securityd_send_sync_and_do + 68
    frame #7: 0x00007fff2baeea43 Security`__SecItemCopyMatching_block_invoke_2 + 210
    frame #8: 0x00007fff2baeddf8 Security`__SecItemAuthDoQuery_block_invoke + 316
    frame #9: 0x00007fff2baec5dc Security`SecItemAuthDo + 119
    frame #10: 0x00007fff2baece01 Security`SecItemAuthDoQuery + 535
    frame #11: 0x00007fff2baee96b Security`__SecItemCopyMatching_block_invoke + 93
    frame #12: 0x00007fff2baeadac Security`SecOSStatusWith + 39
    frame #13: 0x00007fff2baed22f Security`SecItemCopyMatching + 359
    frame #14: 0x0000000102d6a947 HK`__39-[FIRInstanceIDKeychain itemWithQuery:]_block_invoke(.block_descriptor=0x00007ffeecff5d18) at FIRInstanceIDKeychain.m:57:9
    frame #15: 0x0000000104e52d64 libdispatch.dylib`_dispatch_client_callout + 8
    frame #16: 0x0000000104e61e8b libdispatch.dylib`_dispatch_sync_invoke_and_complete_recurse + 137
    frame #17: 0x0000000104e617e6 libdispatch.dylib`_dispatch_sync_f_slow + 305
    frame #18: 0x0000000102d6a8c0 HK`-[FIRInstanceIDKeychain itemWithQuery:](self=0x00006000039d0d70, _cmd="itemWithQuery:", keychainQuery=7 key/value pairs) at FIRInstanceIDKeychain.m:55:3
    frame #19: 0x0000000102d60581 HK`-[FIRInstanceIDAuthKeychain itemsMatchingService:account:](self=0x0000600003bb8860, _cmd="itemsMatchingService:account:", service=@"125335965097:*", account=@"com.likelylabs.hkbroadcast") at FIRInstanceIDAuthKeyChain.m:93:25
    frame #20: 0x0000000102d60ceb HK`-[FIRInstanceIDAuthKeychain dataForService:account:](self=0x0000600003bb8860, _cmd="dataForService:account:", service=@"125335965097:*", account=@"com.likelylabs.hkbroadcast") at FIRInstanceIDAuthKeyChain.m:142:30
    frame #21: 0x0000000102d7b2e7 HK`-[FIRInstanceIDTokenStore tokenInfoWithAuthorizedEntity:scope:](self=0x00006000039c0ef0, _cmd="tokenInfoWithAuthorizedEntity:scope:", authorizedEntity=@"125335965097", scope=@"*") at FIRInstanceIDTokenStore.m:59:18
    frame #22: 0x0000000102d716be HK`-[FIRInstanceIDStore tokenInfoWithAuthorizedEntity:scope:](self=0x0000600003b891a0, _cmd="tokenInfoWithAuthorizedEntity:scope:", authorizedEntity=@"125335965097", scope=@"*") at FIRInstanceIDStore.m:191:34
    frame #23: 0x0000000102d774a8 HK`-[FIRInstanceIDTokenManager cachedTokenInfoWithAuthorizedEntity:scope:](self=0x00006000035a10e0, _cmd="cachedTokenInfoWithAuthorizedEntity:scope:", authorizedEntity=@"125335965097", scope=@"*") at FIRInstanceIDTokenManager.m:141:10
    frame #24: 0x0000000102d56d50 HK`-[FIRInstanceID cachedTokenIfAvailable](self=0x0000600001fcaf40, _cmd="cachedTokenIfAvailable") at FIRInstanceID.m:241:7
    frame #25: 0x0000000102d5bbfc HK`-[FIRInstanceID didCompleteConfigure](self=0x0000600001fcaf40, _cmd="didCompleteConfigure") at FIRInstanceID.m:714:27
    frame #26: 0x0000000102d5b884 HK`-[FIRInstanceID configureInstanceIDWithOptions:app:](self=0x0000600001fcaf40, _cmd="configureInstanceIDWithOptions:app:", options=0x0000600003532190, firApp=0x0000600003559950) at FIRInstanceID.m:681:5
    frame #27: 0x0000000102d5b660 HK`+[FIRInstanceID configureWithApp:](self=FIRInstanceID, _cmd="configureWithApp:", app=0x0000600003559950) at FIRInstanceID.m:663:3
    frame #28: 0x0000000102d171f3 HK`+[FIRApp sendNotificationsToSDKs:](self=FIRApp, _cmd="sendNotificationsToSDKs:", app=0x0000600003559950) at FIRApp.m:436:7
    frame #29: 0x0000000102d1574c HK`+[FIRApp configureWithName:options:](self=FIRApp, _cmd="configureWithName:options:", name=@"__FIRAPP_DEFAULT", options=0x0000600003559920) at FIRApp.m:195:5
    frame #30: 0x0000000102d1514f HK`+[FIRApp configureWithOptions:](self=FIRApp, _cmd="configureWithOptions:", options=0x0000600003559920) at FIRApp.m:139:3
    frame #31: 0x0000000102d15088 HK`+[FIRApp configure](self=FIRApp, _cmd="configure") at FIRApp.m:125:3
    frame #32: 0x0000000102cc4ae5 HK`AppDelegate.application(application=0x00007f8c04f014f0, launchOptions=nil, self=0x0000600003bc3a80) at AppDelegate.swift:25:21
    frame #33: 0x0000000102cc5b54 HK`@objc AppDelegate.application(_:didFinishLaunchingWithOptions:) at <compiler-generated>:0
    frame #34: 0x00007fff4715994f UIKitCore`-[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 232
    frame #35: 0x00007fff4715b2e7 UIKitCore`-[UIApplication _callInitializationDelegatesWithActions:forCanvas:payload:fromOriginatingProcess:] + 3980
    frame #36: 0x00007fff47160c05 UIKitCore`-[UIApplication _runWithMainScene:transitionContext:completion:] + 1281
    frame #37: 0x00007fff468b58b1 UIKitCore`-[_UISceneLifecycleMultiplexer completeApplicationLaunchWithFBSScene:transitionContext:] + 122
    frame #38: 0x00007fff46d96cd5 UIKitCore`_UIScenePerformActionsWithLifecycleActionMask + 83
    frame #39: 0x00007fff468b63c3 UIKitCore`__101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke + 198
    frame #40: 0x00007fff468b5e84 UIKitCore`-[_UISceneLifecycleMultiplexer _performBlock:withApplicationOfDeactivationReasons:fromReasons:] + 474
    frame #41: 0x00007fff468b61f3 UIKitCore`-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 821
    frame #42: 0x00007fff468b5a85 UIKitCore`-[_UISceneLifecycleMultiplexer uiScene:transitionedFromState:withTransitionContext:] + 345
    frame #43: 0x00007fff468b9e70 UIKitCore`__186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke_2 + 159
    frame #44: 0x00007fff46cbdf8b UIKitCore`+[BSAnimationSettings(UIKit) tryAnimatingWithSettings:actions:completion:] + 865
    frame #45: 0x00007fff46db51cf UIKitCore`_UISceneSettingsDiffActionPerformChangesWithTransitionContext + 240
    frame #46: 0x00007fff468b9b9e UIKitCore`__186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke + 153
    frame #47: 0x00007fff46db50d2 UIKitCore`_UISceneSettingsDiffActionPerformActionsWithDelayForTransitionContext + 84
    frame #48: 0x00007fff468b9a0c UIKitCore`-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:] + 381
    frame #49: 0x00007fff46717c96 UIKitCore`__64-[UIScene scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke + 657
    frame #50: 0x00007fff4671681b UIKitCore`-[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:] + 248
    frame #51: 0x00007fff467179c0 UIKitCore`-[UIScene scene:didUpdateWithDiff:transitionContext:completion:] + 210
    frame #52: 0x00007fff4715f262 UIKitCore`-[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 535
    frame #53: 0x00007fff46cdf774 UIKitCore`-[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 361
    frame #54: 0x00007fff362e1d43 FrontBoardServices`-[FBSSceneImpl _callOutQueue_agent_didCreateWithTransitionContext:completion:] + 442
    frame #55: 0x00007fff3630a00c FrontBoardServices`__86-[FBSWorkspaceScenesClient sceneID:createWithParameters:transitionContext:completion:]_block_invoke.154 + 102
    frame #56: 0x00007fff362ecd21 FrontBoardServices`-[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 220
    frame #57: 0x00007fff36309c9d FrontBoardServices`__86-[FBSWorkspaceScenesClient sceneID:createWithParameters:transitionContext:completion:]_block_invoke + 355
    frame #58: 0x0000000104e52d64 libdispatch.dylib`_dispatch_client_callout + 8
    frame #59: 0x0000000104e55cd5 libdispatch.dylib`_dispatch_block_invoke_direct + 300
    frame #60: 0x00007fff3633108a FrontBoardServices`__FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 30
    frame #61: 0x00007fff36330d78 FrontBoardServices`-[FBSSerialQueue _queue_performNextIfPossible] + 441
    frame #62: 0x00007fff36331287 FrontBoardServices`-[FBSSerialQueue _performNextFromRunLoopSource] + 22
    frame #63: 0x00007fff23afbac1 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
    frame #64: 0x00007fff23afb9ec CoreFoundation`__CFRunLoopDoSource0 + 76
    frame #65: 0x00007fff23afb1c4 CoreFoundation`__CFRunLoopDoSources0 + 180
    frame #66: 0x00007fff23af5ecf CoreFoundation`__CFRunLoopRun + 1263
    frame #67: 0x00007fff23af56b6 CoreFoundation`CFRunLoopRunSpecific + 438
    frame #68: 0x00007fff3815cbb0 GraphicsServices`GSEventRunModal + 65
    frame #69: 0x00007fff47162a67 UIKitCore`UIApplicationMain + 1621
    frame #70: 0x0000000102cc6e4b HK`main at AppDelegate.swift:18:7
    frame #71: 0x00007fff5123bcf5 libdyld.dylib`start + 1
  thread #2, queue = 'io.answers.EventQueue (QOS: BACKGROUND)'
    frame #0: 0x0000000102ffbabf HK`-[ANSSettings initWithDictionary:]
    frame #1: 0x00000001030057f9 HK`__56-[ANSAnswersController initWithBetaToken:rootDirectory:]_block_invoke + 304
    frame #2: 0x00007fff25654583 Foundation`__NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 7
    frame #3: 0x00007fff2565447b Foundation`-[NSBlockOperation main] + 98
    frame #4: 0x00007fff25657408 Foundation`__NSOPERATION_IS_INVOKING_MAIN__ + 17
    frame #5: 0x00007fff2565367b Foundation`-[NSOperation start] + 731
    frame #6: 0x00007fff25657d62 Foundation`__NSOPERATIONQUEUE_IS_STARTING_AN_OPERATION__ + 17
    frame #7: 0x00007fff2565786c Foundation`__NSOQSchedule_f + 182
    frame #8: 0x0000000104e613ff libdispatch.dylib`_dispatch_block_async_invoke2 + 83
    frame #9: 0x0000000104e52d64 libdispatch.dylib`_dispatch_client_callout + 8
    frame #10: 0x0000000104e556d6 libdispatch.dylib`_dispatch_continuation_pop + 552
    frame #11: 0x0000000104e54ae1 libdispatch.dylib`_dispatch_async_redirect_invoke + 849
    frame #12: 0x0000000104e6429a libdispatch.dylib`_dispatch_root_queue_drain + 351
    frame #13: 0x0000000104e64ba4 libdispatch.dylib`_dispatch_worker_thread2 + 132
    frame #14: 0x00007fff5141c6b3 libsystem_pthread.dylib`_pthread_wqthread + 583
    frame #15: 0x00007fff5141c3fd libsystem_pthread.dylib`start_wqthread + 13
  thread #3, queue = 'com.google.perf.FPREventsQueue'
    frame #0: 0x00007fff513ed066 libsystem_malloc.dylib`nanov2_allocate_from_block + 300
    frame #1: 0x00007fff513ec34d libsystem_malloc.dylib`nanov2_allocate + 130
    frame #2: 0x00007fff513ec7dc libsystem_malloc.dylib`nanov2_calloc + 81
    frame #3: 0x00007fff513f0468 libsystem_malloc.dylib`malloc_zone_calloc + 99
    frame #4: 0x00007fff513f0b3f libsystem_malloc.dylib`calloc + 24
    frame #5: 0x00007fff23b9db3b CoreFoundation`__NSMS1 + 107
    frame #6: 0x00007fff23b99f1d CoreFoundation`+[NSMethodSignature signatureWithObjCTypes:] + 461
    frame #7: 0x00007fff258079c0 Foundation`setProtocolMetdataWithMethods + 313
    frame #8: 0x00007fff25804c51 Foundation`setProtocolMetadata + 214
    frame #9: 0x00007fff25804c05 Foundation`setProtocolMetadata + 138
    frame #10: 0x00007fff25804aee Foundation`-[NSXPCInterface setProtocol:] + 293
    frame #11: 0x00007fff258046ca Foundation`+[NSXPCInterface interfaceWithProtocol:] + 44
    frame #12: 0x00007fff24efa81b CoreTelephony`___ZN12_GLOBAL__N_119sGetRemoteInterfaceEv_block_invoke + 31
    frame #13: 0x0000000104e52d64 libdispatch.dylib`_dispatch_client_callout + 8
    frame #14: 0x0000000104e542b3 libdispatch.dylib`_dispatch_once_callout + 66
    frame #15: 0x00007fff24efa2dc CoreTelephony`-[CoreTelephonyClientMux _connect_sync] + 516
    frame #16: 0x00007fff24efa648 CoreTelephony`-[CoreTelephonyClientMux _ensureConnectionSetup_sync:] + 33
    frame #17: 0x00007fff24ef921d CoreTelephony`-[CoreTelephonyClientMux initWithSink:] + 254
    frame #18: 0x00007fff24ef90e7 CoreTelephony`-[CoreTelephonyClientMux init] + 47
    frame #19: 0x00007fff24eff4f0 CoreTelephony`__40+[CoreTelephonyClient sharedMultiplexer]_block_invoke + 16
    frame #20: 0x0000000104e52d64 libdispatch.dylib`_dispatch_client_callout + 8
    frame #21: 0x0000000104e542b3 libdispatch.dylib`_dispatch_once_callout + 66
    frame #22: 0x00007fff24eff4dd CoreTelephony`+[CoreTelephonyClient sharedMultiplexer] + 45
    frame #23: 0x00007fff24eff52a CoreTelephony`-[CoreTelephonyClient initWithQueue:] + 37
    frame #24: 0x00007fff24ef153e CoreTelephony`-[CTTelephonyNetworkInfo init] + 62
    frame #25: 0x000000010304649c HK`__FPRNetworkInfo_block_invoke + 41
    frame #26: 0x0000000104e52d64 libdispatch.dylib`_dispatch_client_callout + 8
    frame #27: 0x0000000104e542b3 libdispatch.dylib`_dispatch_once_callout + 66
    frame #28: 0x0000000103046470 HK`FPRNetworkInfo + 45
    frame #29: 0x000000010304289b HK`__42-[FPRClient startWithConfiguration:error:]_block_invoke + 704
    frame #30: 0x0000000104e51df0 libdispatch.dylib`_dispatch_call_block_and_release + 12
    frame #31: 0x0000000104e52d64 libdispatch.dylib`_dispatch_client_callout + 8
    frame #32: 0x0000000104e597b5 libdispatch.dylib`_dispatch_lane_serial_drain + 1214
    frame #33: 0x0000000104e5a19b libdispatch.dylib`_dispatch_lane_invoke + 422
    frame #34: 0x0000000104e65a59 libdispatch.dylib`_dispatch_workloop_worker_thread + 722
    frame #35: 0x00007fff5141c611 libsystem_pthread.dylib`_pthread_wqthread + 421
    frame #36: 0x00007fff5141c3fd libsystem_pthread.dylib`start_wqthread + 13
* thread #4, queue = 'com.google.GoogleConfigService.FIRRemoteConfig', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)
    frame #0: 0x0000000104e61db0 libdispatch.dylib`__DISPATCH_WAIT_FOR_QUEUE__ + 439
    frame #1: 0x0000000104e6179c libdispatch.dylib`_dispatch_sync_f_slow + 231
    frame #2: 0x00000001030cb2bf HK`-[FIRRemoteConfig configValueForKey:namespace:] + 254
    frame #3: 0x0000000103040f5c HK`-[FPRRemoteConfigFlags sessionSamplingRate] + 58
    frame #4: 0x0000000103040645 HK`-[FPRConfigurations sessionsSamplingPercentage] + 217
    frame #5: 0x000000010303a2e2 HK`-[FPRSessionManager isGaugeCollectionEnabledForSessionId:] + 59
    frame #6: 0x000000010303a185 HK`-[FPRSessionManager updateSessionId:] + 280
    frame #7: 0x0000000103039ece HK`-[FPRSessionManager initWithNotificationCenter:] + 116
    frame #8: 0x0000000103039e30 HK`__35+[FPRSessionManager sharedInstance]_block_invoke + 82
    frame #9: 0x0000000104e52d64 libdispatch.dylib`_dispatch_client_callout + 8
    frame #10: 0x0000000104e542b3 libdispatch.dylib`_dispatch_once_callout + 66
    frame #11: 0x0000000103039ddb HK`+[FPRSessionManager sharedInstance] + 45
    frame #12: 0x000000010304b6e2 HK`-[FPRNetworkTrace start] + 216
    frame #13: 0x0000000103052586 HK`__InstrumentDataTaskWithRequestCompletionHandler_block_invoke + 371
    frame #14: 0x00000001030524fe HK`__InstrumentDataTaskWithRequestCompletionHandler_block_invoke + 235
  * frame #15: 0x0000000102d66fdd HK`-[FIRInstanceIDCheckinService checkinWithExistingCheckin:completion:](self=0x00006000039d0da0, _cmd="checkinWithExistingCheckin:completion:", existingCheckin=0x0000000000000000, completion=0x0000000102d62c80) at FIRInstanceIDCheckinService.m:189:32
    frame #16: 0x0000000102d62c02 HK`-[FIRInstanceIDAuthService fetchCheckinInfoWithHandler:](self=0x0000600002e68540, _cmd="fetchCheckinInfoWithHandler:", handler=0x0000000102d57b50) at FIRInstanceIDAuthService.m:188:3
    frame #17: 0x0000000102d577ec HK`-[FIRInstanceID tokenWithAuthorizedEntity:scope:options:handler:](self=0x0000600001fcaf40, _cmd="tokenWithAuthorizedEntity:scope:options:handler:", authorizedEntity=@"125335965097", scope=@"*", options=0x0000000000000000, handler=0x00000001030da597) at FIRInstanceID.m:324:3
    frame #18: 0x00000001030da508 HK`-[RCNConfigFetch refreshInstanceIDTokenAndFetchCheckInInfoWithCompletionHandler:] + 410
    frame #19: 0x00000001030da0bc HK`__74-[RCNConfigFetch fetchAllConfigsWithExpirationDuration:completionHandler:]_block_invoke + 297
    frame #20: 0x0000000104e51df0 libdispatch.dylib`_dispatch_call_block_and_release + 12
    frame #21: 0x0000000104e52d64 libdispatch.dylib`_dispatch_client_callout + 8
    frame #22: 0x0000000104e5960b libdispatch.dylib`_dispatch_lane_serial_drain + 788
    frame #23: 0x0000000104e5a19b libdispatch.dylib`_dispatch_lane_invoke + 422
    frame #24: 0x0000000104e65a59 libdispatch.dylib`_dispatch_workloop_worker_thread + 722
    frame #25: 0x00007fff5141c611 libsystem_pthread.dylib`_pthread_wqthread + 421
    frame #26: 0x00007fff5141c3fd libsystem_pthread.dylib`start_wqthread + 13
  thread #5, queue = 'com.apple.root.default-qos'
    frame #0: 0x00007fff513749de libsystem_kernel.dylib`__ulock_wait + 10
    frame #1: 0x0000000104e536c8 libdispatch.dylib`_dlock_wait + 44
    frame #2: 0x0000000104e53527 libdispatch.dylib`_dispatch_thread_event_wait_slow + 36
    frame #3: 0x0000000104e61d3f libdispatch.dylib`__DISPATCH_WAIT_FOR_QUEUE__ + 326
    frame #4: 0x0000000104e6179c libdispatch.dylib`_dispatch_sync_f_slow + 231
    frame #5: 0x0000000102d2047a HK`__44+[FIRIAMActionURLFollower actionURLFollower]_block_invoke(.block_descriptor=0x00000001035d6a98) at FIRIAMActionURLFollower.m:72:7
    frame #6: 0x0000000104e52d64 libdispatch.dylib`_dispatch_client_callout + 8
    frame #7: 0x0000000104e542b3 libdispatch.dylib`_dispatch_once_callout + 66
    frame #8: 0x0000000102d1feb4 HK`+[FIRIAMActionURLFollower actionURLFollower] [inlined] _dispatch_once(predicate=0x0000000103834f60, block=0x0000000102d1fee0) at once.h:84:3
    frame #9: 0x0000000102d1fe99 HK`+[FIRIAMActionURLFollower actionURLFollower](self=FIRIAMActionURLFollower, _cmd="actionURLFollower") at FIRIAMActionURLFollower.m:39
    frame #10: 0x0000000102d42234 HK`-[FIRIAMRuntimeManager internalStartRuntimeWithSDKSettings:](self=0x00006000015d2200, _cmd="internalStartRuntimeWithSDKSettings:", settings=0x00006000010c1030) at FIRIAMRuntimeManager.m:338:45
    frame #11: 0x0000000102d414ab HK`__52-[FIRIAMRuntimeManager startRuntimeWithSDKSettings:]_block_invoke(.block_descriptor=0x00006000035322e0) at FIRIAMRuntimeManager.m:239:5
    frame #12: 0x0000000104e51df0 libdispatch.dylib`_dispatch_call_block_and_release + 12
    frame #13: 0x0000000104e52d64 libdispatch.dylib`_dispatch_client_callout + 8
    frame #14: 0x0000000104e5520b libdispatch.dylib`_dispatch_queue_override_invoke + 1022
    frame #15: 0x0000000104e6429a libdispatch.dylib`_dispatch_root_queue_drain + 351
    frame #16: 0x0000000104e64ba4 libdispatch.dylib`_dispatch_worker_thread2 + 132
    frame #17: 0x00007fff5141c6b3 libsystem_pthread.dylib`_pthread_wqthread + 583
    frame #18: 0x00007fff5141c3fd libsystem_pthread.dylib`start_wqthread + 13
  thread #6, name = 'com.apple.uikit.eventfetch-thread'
    frame #0: 0x00007fff5137222a libsystem_kernel.dylib`mach_msg_trap + 10
    frame #1: 0x00007fff5137276c libsystem_kernel.dylib`mach_msg + 60
    frame #2: 0x00007fff23afb345 CoreFoundation`__CFRunLoopServiceMachPort + 197
    frame #3: 0x00007fff23af6067 CoreFoundation`__CFRunLoopRun + 1671
    frame #4: 0x00007fff23af56b6 CoreFoundation`CFRunLoopRunSpecific + 438
    frame #5: 0x00007fff2566d0df Foundation`-[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 211
    frame #6: 0x00007fff2566d352 Foundation`-[NSRunLoop(NSRunLoop) runUntilDate:] + 72
    frame #7: 0x00007fff47203324 UIKitCore`-[UIEventFetcher threadMain] + 138
    frame #8: 0x00007fff256830ed Foundation`__NSThread__start__ + 1047
    frame #9: 0x00007fff5141d2eb libsystem_pthread.dylib`_pthread_body + 126
    frame #10: 0x00007fff51420249 libsystem_pthread.dylib`_pthread_start + 66
    frame #11: 0x00007fff5141c40d libsystem_pthread.dylib`thread_start + 13
  thread #7
    frame #0: 0x00007fff51373bfe libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #1: 0x00007fff5141c6e6 libsystem_pthread.dylib`_pthread_wqthread + 634
    frame #2: 0x00007fff5141c3fd libsystem_pthread.dylib`start_wqthread + 13
  thread #8, queue = 'com.google.fira.worker'
    frame #0: 0x00007fff51375f62 libsystem_kernel.dylib`fsync + 10
    frame #1: 0x00007fff504bdf1f libsqlite3.dylib`unixSync + 191
    frame #2: 0x00007fff504ce2e4 libsqlite3.dylib`syncJournal + 484
    frame #3: 0x00007fff50495a9d libsqlite3.dylib`sqlite3PagerCommitPhaseOne + 1245
    frame #4: 0x00007fff50495ecf libsqlite3.dylib`sqlite3BtreeCommitPhaseOne + 127
    frame #5: 0x00007fff504da4c2 libsqlite3.dylib`sqlite3VdbeHalt + 3298
    frame #6: 0x00007fff504edab3 libsqlite3.dylib`sqlite3VdbeExec + 57443
    frame #7: 0x00007fff504918fe libsqlite3.dylib`sqlite3_step + 1086
    frame #8: 0x000000010313082b HK`-[APMSqliteStore executeSQLStatement:error:] + 98
    frame #9: 0x00000001031307ad HK`-[APMSqliteStore executeSQL:error:] + 163
    frame #10: 0x000000010312dc3c HK`-[APMSqliteStore validateTableWithName:requiredColumnNames:addOnColumns:error:] + 878
    frame #11: 0x000000010312d52e HK`-[APMSqliteStore ensureTableWithName:createSQL:requiredColumnNames:addOnColumns:error:] + 403
    frame #12: 0x000000010312c53a HK`-[APMSqliteStore ensureTableWithName:elementaryColumnInfo:addOnColumnInfo:error:] + 2132
    frame #13: 0x000000010312cfe7 HK`-[APMSqliteStore ensureTableWithName:elementaryColumnInfo:addOnColumnInfo:modifyColumnInfo:error:] + 118
    frame #14: 0x00000001030fac3e HK`-[APMDatabase ensureAllTables] + 7532
    frame #15: 0x00000001030f8c78 HK`-[APMDatabase initializeDatabaseResourcesWithContext:databasePath:] + 136
    frame #16: 0x00000001030ed9df HK`-[APMDatabase initWithDatabaseName:persistedConfig:] + 157
    frame #17: 0x00000001030ffd19 HK`__47-[APMMeasurement startMeasurementOnWorkerQueue]_block_invoke + 1084
    frame #18: 0x0000000104e52d64 libdispatch.dylib`_dispatch_client_callout + 8
    frame #19: 0x0000000104e542b3 libdispatch.dylib`_dispatch_once_callout + 66
    frame #20: 0x00000001030ff8bd HK`-[APMMeasurement startMeasurementOnWorkerQueue] + 304
    frame #21: 0x00000001030ff475 HK`-[APMMeasurement setEnabledOnWorkerQueue:] + 234
    frame #22: 0x000000010311ab13 HK`__51-[APMScheduler scheduleOnWorkerQueueBlockID:block:]_block_invoke + 29
    frame #23: 0x0000000104e51df0 libdispatch.dylib`_dispatch_call_block_and_release + 12
    frame #24: 0x0000000104e52d64 libdispatch.dylib`_dispatch_client_callout + 8
    frame #25: 0x0000000104e5960b libdispatch.dylib`_dispatch_lane_serial_drain + 788
    frame #26: 0x0000000104e5a19b libdispatch.dylib`_dispatch_lane_invoke + 422
    frame #27: 0x0000000104e65a59 libdispatch.dylib`_dispatch_workloop_worker_thread + 722
    frame #28: 0x00007fff5141c611 libsystem_pthread.dylib`_pthread_wqthread + 421
    frame #29: 0x00007fff5141c3fd libsystem_pthread.dylib`start_wqthread + 13
  thread #9, queue = 'com.twitter.crashlytics.ios.binary-images'
    frame #0: 0x00007fff5137318e libsystem_kernel.dylib`__open_nocancel + 10
    frame #1: 0x00007fff512b6b19 libsystem_c.dylib`__opendir2 + 49
    frame #2: 0x00007fff23aaad73 CoreFoundation`_CFIterateDirectory + 83
    frame #3: 0x00007fff23a7a8ec CoreFoundation`_CFBundleGetBundleVersionForURL + 380
    frame #4: 0x00007fff23a747c6 CoreFoundation`_CFBundleCreate + 310
    frame #5: 0x00007fff255c906a Foundation`-[NSBundle _cfBundle] + 55
    frame #6: 0x00007fff255cbab3 Foundation`-[NSBundle infoDictionary] + 17
    frame #7: 0x00007fff255cb1b3 Foundation`-[NSBundle bundleIdentifier] + 22
    frame #8: 0x0000000102fd5f38 HK`__CLSBinaryImageChanged_block_invoke + 364
    frame #9: 0x0000000104e51df0 libdispatch.dylib`_dispatch_call_block_and_release + 12
    frame #10: 0x0000000104e52d64 libdispatch.dylib`_dispatch_client_callout + 8
    frame #11: 0x0000000104e5960b libdispatch.dylib`_dispatch_lane_serial_drain + 788
    frame #12: 0x0000000104e5a19b libdispatch.dylib`_dispatch_lane_invoke + 422
    frame #13: 0x0000000104e65a59 libdispatch.dylib`_dispatch_workloop_worker_thread + 722
    frame #14: 0x00007fff5141c611 libsystem_pthread.dylib`_pthread_wqthread + 421
    frame #15: 0x00007fff5141c3fd libsystem_pthread.dylib`start_wqthread + 13
  thread #10
    frame #0: 0x00007fff5141c3f0 libsystem_pthread.dylib`start_wqthread
  thread #11
    frame #0: 0x00007fff5141c3f0 libsystem_pthread.dylib`start_wqthread
  thread #12
    frame #0: 0x00007fff5141c3f0 libsystem_pthread.dylib`start_wqthread
  thread #13
    frame #0: 0x00007fff5141c3f0 libsystem_pthread.dylib`start_wqthread

Not sure if this helps, but including it anyway:

image

@kevinchau kevinchau changed the title Crash in FIRInstanceIDCheckinService.m on iPhone 11/pro/max sim Crash in FIRInstanceIDCheckinService.m on iOS 13 when app is a new install Sep 13, 2019
@morganchen12
Copy link
Contributor

@chliangGoogle looks like a keychain-related crash in InstanceID. Does this look like a regression?

@kevinchau
Copy link
Author

Just a note, I'm able build and run using the iOS 12 SDK on Xcode 10.3. It works fine there.

@charlotteliang
Copy link
Contributor

charlotteliang commented Sep 13, 2019

@kevinchau Is it only happening on real devices? I can't reproduce on simulators using Xcode 11 GM

@kevinchau
Copy link
Author

@chliangGoogle both. It's only happening on new installs though.

@charlotteliang
Copy link
Contributor

@morganchen12 FCM with InstanceID works without crash, unlikely a regression. Seems like a complication with the new remote config and perf, I will do more testing on that.

@charlotteliang
Copy link
Contributor

charlotteliang commented Sep 13, 2019

@kevinchau I'm not able to reproduce yet, can you share with me your sample code? especially the way you call remote config during app start?

@charlotteliang
Copy link
Contributor

I'm not sure this is a InstanceID issue, from the stack trace, looks like issues are happening inside remote config thread, although @kevinchau manually highlighted the IID thread.

I only see errors occur inside RC call here:

  • thread Fix source reference #4, queue = 'com.google.GoogleConfigService.FIRRemoteConfig', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)

@kevinchau
Copy link
Author

@chliangGoogle I can send you some code samples, I'd prefer not posting it to the public.

@charlotteliang
Copy link
Contributor

SG, feel free to DM me.

@dmandar
Copy link
Contributor

dmandar commented Sep 13, 2019

@kevinchau is it possible to repro without the Perf SDK?

@kevinchau
Copy link
Author

@chliangGoogle looks like Github doesn't have DM feature anymore, have an email?

@kevinchau
Copy link
Author

I can't repro it anymore - I was having a build issue with Xcode 11 and had to Pod deintegrate and reinstall. It appears to have went away.

Thanks for the help, and sorry it was not an bug on your end.

@paulb777
Copy link
Member

Glad it's gone.

Might have been a variation of #3344 if you had old pods before deintegrating.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy