firebase-ios-sdk: [BUG]: Crash in FIRInstanceIDAuthKeyChain.m line 79 -[FIRInstanceIDAuthKeychain itemsMatchingService:account:]

[READ] Step 1: Are you in the right place?

Yes, I think so… 😮)

[REQUIRED] Step 2: Describe your environment

  • Xcode version: Version 11.1 (11A1027)
  • Firebase SDK version: 6.10
  • Firebase Component: Analytics, Fabric, Crashlytics, Performance, RemoteConfig
  • Component version: RemoteConfig 4.4.3

[REQUIRED] Step 3: Describe the problem

Steps to reproduce:

Crash reported by Crashlytics:

iOS 13.2.0 (17B84) iPad Pro (12.9-inch, 2nd generation)

FIRInstanceIDAuthKeyChain.m line 79
-[FIRInstanceIDAuthKeychain itemsMatchingService:account:]

Stack Trace 1:

Crashed: com.google.GoogleConfigService.FIRRemoteConfig
0  CoreFoundation                 0x18467f214 <redacted> + 144
1  AppName                        0x10279c460 -[FIRInstanceIDAuthKeychain itemsMatchingService:account:] + 79 (FIRInstanceIDAuthKeyChain.m:79)
2  AppName                        0x10279ca64 -[FIRInstanceIDAuthKeychain dataForService:account:] + 142 (FIRInstanceIDAuthKeyChain.m:142)
3  AppName                        0x1027abc78 -[FIRInstanceIDTokenStore tokenInfoWithAuthorizedEntity:scope:] + 59 (FIRInstanceIDTokenStore.m:59)
4  AppName                        0x1027a61a4 -[FIRInstanceIDStore tokenInfoWithAuthorizedEntity:scope:] + 191 (FIRInstanceIDStore.m:191)
5  AppName                        0x1027a9884 -[FIRInstanceIDTokenManager cachedTokenInfoWithAuthorizedEntity:scope:] + 141 (FIRInstanceIDTokenManager.m:141)
6  AppName                        0x102797578 __65-[FIRInstanceID tokenWithAuthorizedEntity:scope:options:handler:]_block_invoke.127 + 336 (FIRInstanceID.m:336)
7  AppName                        0x10279e17c -[FIRInstanceIDAuthService notifyCheckinHandlersWithCheckin:error:] + 286 (FIRInstanceIDAuthService.m:286)
8  AppName                        0x10279db4c -[FIRInstanceIDAuthService fetchCheckinInfoWithHandler:] + 181 (FIRInstanceIDAuthService.m:181)
9  AppName                        0x1027972ac -[FIRInstanceID tokenWithAuthorizedEntity:scope:options:handler:] + 368 (FIRInstanceID.m:368)
10 AppName                        0x102821f68 -[RCNConfigFetch refreshInstanceIDTokenAndFetchCheckInInfoWithCompletionHandler:] + 230 (RCNFetch.m:230)
11 AppName                        0x102821bd8 __74-[RCNConfigFetch fetchAllConfigsWithExpirationDuration:completionHandler:]_block_invoke + 190 (RCNFetch.m:190)
12 libdispatch.dylib              0x184470610 <redacted> + 24
13 libdispatch.dylib              0x184471184 <redacted> + 16
14 libdispatch.dylib              0x18441d404 <redacted> + 608
15 libdispatch.dylib              0x18441ddf8 <redacted> + 420
16 libdispatch.dylib              0x184427314 <redacted> + 588
17 libsystem_pthread.dylib        0x1844c0f88 _pthread_wqthread + 276
18 libsystem_pthread.dylib        0x1844c3ad4 start_wqthread + 8

Steps to reproduce:

We cannot reproduce the issue, and it seems to be very rare.

Relevant Code:

Internal firebase crash, not sure if any of our code is directly related.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 21 (8 by maintainers)

Most upvoted comments

@chliangGoogle

Crashed: com.google.GoogleConfigService.FIRRemoteConfig
EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000000000010
-[FIRInstanceIDAuthKeychain itemsMatchingService:account:]

Stack trace 2:

com.apple.main-thread
0  libsystem_kernel.dylib         0x18459c8b8 __ulock_wait + 8
1  libsystem_platform.dylib       0x1844aef54 <redacted> + 224
2  libobjc.A.dylib                0x1844dfde0 objc_sync_enter + 32
3  AppName                        0x10279da38 -[FIRInstanceIDAuthService fetchCheckinInfoWithHandler:] + 169 (FIRInstanceIDAuthService.m:169)
4  AppName                        0x1027972ac -[FIRInstanceID tokenWithAuthorizedEntity:scope:options:handler:] + 368 (FIRInstanceID.m:368)
5  AppName                        0x10279a234 -[FIRInstanceID defaultTokenWithRetry:handler:] + 949 (FIRInstanceID.m:949)
6  AppName                        0x102799978 -[FIRInstanceID didCompleteConfigure] + 717 (FIRInstanceID.m:717)
7  AppName                        0x1027996cc -[FIRInstanceID configureInstanceIDWithOptions:app:] + 681 (FIRInstanceID.m:681)
8  AppName                        0x102799560 +[FIRInstanceID configureWithApp:] + 663 (FIRInstanceID.m:663)
9  AppName                        0x10278e7a0 +[FIRApp sendNotificationsToSDKs:] + 425 (FIRApp.m:425)
10 AppName                        0x10278d9ac +[FIRApp configureWithName:options:] + 195 (FIRApp.m:195)
11 AppName                        0x10278d624 +[FIRApp configureWithOptions:] + 139 (FIRApp.m:139)
12 AppName                        0x10278d5ac +[FIRApp configure] + 131 (FIRApp.m:131)
13 AppName                        0x102620368 -[AppDelegate application:didFinishLaunchingWithOptions:] + 1759 (AppDelegate.m:1759)
14 UIKitCore                      0x188802ef4 <redacted> + 340
15 UIKitCore                      0x188804d20 <redacted> + 5076
16 UIKitCore                      0x18880a554 <redacted> + 1304
17 UIKitCore                      0x187fd8cdc <redacted> + 148
18 UIKitCore                      0x18846dfc4 _UIScenePerformActionsWithLifecycleActionMask + 100
19 UIKitCore                      0x187fd97c4 <redacted> + 196
20 UIKitCore                      0x187fd921c <redacted> + 296
21 UIKitCore                      0x187fd95f0 <redacted> + 736
22 UIKitCore                      0x187fd8eac <redacted> + 336
23 UIKitCore                      0x187fdd3c8 <redacted> + 188
24 UIKitCore                      0x1883a06a4 <redacted> + 824
25 UIKitCore                      0x1884875b0 _UISceneSettingsDiffActionPerformChangesWithTransitionContext + 244
26 UIKitCore                      0x187fdd100 <redacted> + 136
27 UIKitCore                      0x1884874ac _UISceneSettingsDiffActionPerformActionsWithDelayForTransitionContext + 100
28 UIKitCore                      0x187fdcf6c <redacted> + 376
29 UIKitCore                      0x187e4eba4 <redacted> + 636
30 UIKitCore                      0x187e4d70c <redacted> + 248
31 UIKitCore                      0x187e4e8dc <redacted> + 220
32 UIKitCore                      0x1888088d4 <redacted> + 548
33 UIKitCore                      0x1883c109c <redacted> + 360
34 FrontBoardServices             0x1898a8850 <redacted> + 436
35 FrontBoardServices             0x1898cd8e8 <redacted> + 100
36 FrontBoardServices             0x1898b2fb4 <redacted> + 232
37 FrontBoardServices             0x1898cd5a4 <redacted> + 312
38 libdispatch.dylib              0x184471184 <redacted> + 16
39 libdispatch.dylib              0x184419fd8 <redacted> + 224
40 FrontBoardServices             0x1898f24c8 <redacted> + 40
41 FrontBoardServices             0x1898f2194 <redacted> + 404
42 FrontBoardServices             0x1898f26bc <redacted> + 28
43 CoreFoundation                 0x1847217c4 <redacted> + 24
44 CoreFoundation                 0x18472171c <redacted> + 80
45 CoreFoundation                 0x184720eb4 <redacted> + 180
46 CoreFoundation                 0x18471c000 <redacted> + 1080
47 CoreFoundation                 0x18471b8a0 CFRunLoopRunSpecific + 464
48 GraphicsServices               0x18e673328 GSEventRunModal + 104
49 UIKitCore                      0x18880c768 UIApplicationMain + 1936
50 AppName                        0x1027204e0 main + 225 (main.m:225)
51 libdyld.dylib                  0x1845a6360 <redacted> + 4

Stack trace 3:

com.google.FIRCoreDiagnostics
0  libsystem_kernel.dylib         0x18459c8b8 __ulock_wait + 8
1  libsystem_platform.dylib       0x1844aef54 <redacted> + 224
2  libobjc.A.dylib                0x1844dfde0 objc_sync_enter + 32
3  AppName                        0x10278db50 +[FIRApp allApps] + 224 (FIRApp.m:224)
4  AppName                        0x102791af4 -[FIRDiagnosticsData diagnosticObjects] + 47 (FIRDiagnosticsData.m:47)
5  AppName                        0x102795eb0 __42-[FIRCoreDiagnostics sendDiagnosticsData:]_block_invoke + 614 (FIRCoreDiagnostics.m:614)
6  libdispatch.dylib              0x184470610 <redacted> + 24
7  libdispatch.dylib              0x184471184 <redacted> + 16
8  libdispatch.dylib              0x18441d404 <redacted> + 608
9  libdispatch.dylib              0x18441ddf8 <redacted> + 420
10 libdispatch.dylib              0x184427314 <redacted> + 588
11 libsystem_pthread.dylib        0x1844c0f88 _pthread_wqthread + 276
12 libsystem_pthread.dylib        0x1844c3ad4 start_wqthread + 8