firebase / firebase-ios-sdk

Firebase SDK for Apple App Development
https://firebase.google.com
Apache License 2.0
5.67k stars 1.49k forks source link

GULHeartbeatDataStorage crash #8094

Closed OJDee closed 3 years ago

OJDee commented 3 years ago

[REQUIRED] Step 1: Describe your environment

[REQUIRED] Step 2: Describe the problem

Steps to reproduce:

Run app, with [FIRApp configure] in AppDelegate, crashes on every launch. If I remove the above line, it launches fine.

There have been no changes to the Firebase integration, this has just started, we have been using

Crashing log:

libc++abi.dylib: terminating with uncaught exception of type NSException *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSSingleEntryDictionaryI setObject:forKeyedSubscript:]: unrecognized selector sent to instance 0x6000010fc5e0'

0   CoreFoundation                      0x00007fff2041daf2 __exceptionPreprocess + 242
1   libobjc.A.dylib                     0x00007fff20177e78 objc_exception_throw + 48
2   CoreFoundation                      0x00007fff2042c6f7 +[NSObject(NSObject) instanceMethodSignatureForSelector:] + 0
3   CoreFoundation                      0x00007fff20422032 ___forwarding___ + 1489
4   CoreFoundation                      0x00007fff20424068 _CF_forwarding_prep_0 + 120
5   Young's On Tap                      0x00000001033101ee __50-[GULHeartbeatDateStorage setHearbeatDate:forTag:]_block_invoke + 112
6   Foundation                          0x00007fff208d383a -[NSFileCoordinator _invokeAccessor:thenCompletionHandler:] + 74
7   Foundation                          0x00007fff208d3ba7 __98-[NSFileCoordinator coordinateReadingItemAtURL:options:writingItemAtURL:options:error:byAccessor:]_block_invoke + 106
8   Foundation                          0x00007fff208d6a65 __110-[NSFileCoordinator(NSPrivate) _coordinateReadingItemAtURL:options:writingItemAtURL:options:error:byAccessor:]_block_invoke.345 + 248
9   Foundation                          0x00007fff208d5356 -[NSFileCoordinator(NSPrivate) _withAccessArbiter:invokeAccessor:orDont:andRelinquishAccessClaim:] + 528
10  Foundation                          0x00007fff208d6778 -[NSFileCoordinator(NSPrivate) _coordinateReadingItemAtURL:options:writingItemAtURL:options:error:byAccessor:] + 1106
11  Foundation                          0x00007fff208d3b1e -[NSFileCoordinator coordinateReadingItemAtURL:options:writingItemAtURL:options:error:byAccessor:] + 99
12  Young's On Tap                      0x00000001033100ed -[GULHeartbeatDateStorage setHearbeatDate:forTag:] + 308
13  Young's On Tap                      0x000000010331c9c4 -[FIRCoreDiagnostics setHeartbeatFlagIfNeededToConfig:] + 206
14  Young's On Tap                      0x000000010331c80b __42-[FIRCoreDiagnostics sendDiagnosticsData:]_block_invoke + 238
15  libdispatch.dylib                   0x00000001061e67ec _dispatch_call_block_and_release + 12
16  libdispatch.dylib                   0x00000001061e79c8 _dispatch_client_callout + 8
17  libdispatch.dylib                   0x00000001061ee296 _dispatch_lane_serial_drain + 796
18  libdispatch.dylib                   0x00000001061eef67 _dispatch_lane_invoke + 439
19  libdispatch.dylib                   0x00000001061fade2 _dispatch_workloop_worker_thread + 882
20  libsystem_pthread.dylib             0x00007fff5e73e4c0 _pthread_wqthread + 314
21  libsystem_pthread.dylib             0x00007fff5e73d493 start_wqthread + 15
ncooke3 commented 3 years ago

Hi @OJDee ,

Apologies for the trouble. This issue was reported in #8047 and a fix has since been implemented. We are still in the process of rolling this fix out for Carthage users and expect it to be published soon. Thank you for your patience.

In the meantime, you may trying versioning back to before the bug was introduced, if that's possible.

With the Carthage update releasing soon, I'm closing this issue for now but am happy to reopen it if the issue persists after the Carthage patch release.

OJDee commented 3 years ago

@ncooke3 Thanks for the pointer. Seems Google didn’t find this other issue.

When you say rollback to a previous version, since I am using Carthage, what should be in the Cartfile since currently I just have the three binary.json references mentioned in the docs.

Seems issue is 7.4.0 but is any version prior to that a fix?

Thanks

paulb777 commented 3 years ago

@OJDee 8.0.0 is now available via Carthage and has the fix included.

OJDee commented 3 years ago

@paulb777 Thanks, but how are you getting this? The release notes still state 7.4.0 and 7.11 are served via Carthage https://firebase.google.com/support/release-notes/ios

I am using: binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAnalyticsBinary.json" binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseCrashlyticsBinary.json" binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseDynamicLinksBinary.json" binary "https://dl.google.com/dl/firebase/ios/carthage/FirebasePerformanceBinary.json"

And the info.plist for all frameworks checked out state 7.4.0 still. Google Utilities has 7.2. What am I missing?

paulb777 commented 3 years ago

@OJDee Now that Carthage 0.38.0 is available we added the 8.0.0 distribution for Carthage yesterday and haven't yet got the release notes updated. We'll try to get that done today.

Thanks for the pointer.

OJDee commented 3 years ago

@paulb777 No problem, thanks for the update, have 8.0.0 up and running now