firebase-ios-sdk: Crash in -[TAGHitStore addPendingEvent:]
[REQUIRED] Step 2: Describe your environment
- Xcode version: Version 10.1 (10B61)
- Firebase SDK version: 5.16.0
- Firebase Component: GoogleTagManager
- Component version: 7.1.1
[REQUIRED] Step 3: Describe the problem
We are observing a crash happening in -[TAGHitStore addPendingEvent:].
Steps to reproduce:
We are not able to reproduce it yet.
Crashlog:
Fatal Exception: NSInvalidArgumentException
0 CoreFoundation 0x22f239eb8 __exceptionPreprocess
1 libobjc.A.dylib 0x22e433f18 objc_exception_throw
2 CoreFoundation 0x22f14ef10 -[NSOrderedSet initWithSet:copyItems:]
3 CoreFoundation 0x22f23f924 ___forwarding___
4 CoreFoundation 0x22f2416f0 _CF_forwarding_prep_0
5 Foundation 0x22fcc744c _encodeObject
6 Foundation 0x22fbd88bc -[NSKeyedArchiver _encodeArrayOfObjects:forKey:]
7 Foundation 0x22fc0639c -[NSDictionary(NSDictionary) encodeWithCoder:]
8 Foundation 0x22fcc744c _encodeObject
9 Foundation 0x22fc27e00 +[NSKeyedArchiver archivedDataWithRootObject:]
10 <Redacted> 0x100a62a80 -[TAGHitStore addPendingEvent:]
11 <Redacted> 0x100a53e30 __29-[TAGContainer processEvent:]_block_invoke
12 libdispatch.dylib 0x22ec3bb9c _dispatch_call_block_and_release
13 libdispatch.dylib 0x22ec3d134 _dispatch_client_callout
14 libdispatch.dylib 0x22ec4464c _dispatch_lane_serial_drain
15 libdispatch.dylib 0x22ec45194 _dispatch_lane_invoke
16 libdispatch.dylib 0x22ec4d480 _dispatch_workloop_worker_thread
17 libsystem_pthread.dylib 0x22ee3eb20 _pthread_wqthread
18 libsystem_pthread.dylib 0x22ee44dd4 start_wqthread
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 40 (13 by maintainers)
Google-internal change cr/297637641 adds an Analytics warning when you log an event with parameters containing a Swift value that’s not representable as an ObjC Foundation type, and is slated for the next release. Hopefully this will make it easier to debug while we continue to wait for a Tag Manager release.
Hey all. At this point I have bugged the tag manager team to the best of my ability and further agitating them will not speed up their release. The release is still in progress, but I do not have an ETA.
Fortunately, there is a workaround: this issue can be avoided by checking every Analytics event log call your app is making and ensuring that there are no Swift-only types (structs, non-
@objcclasses, and pure enums without a string or numeric raw value). This is potentially a lot of Analytics calls to check.I’ll try to add some diagnostic code to the Analytics SDK so it will emit warning logs if you’re logging events with pure Swift values.
Note that the Swift-only value check will still be included in the next Firebase release, which should be out soon as well.
Thanks everyone for your patience!
Hi everyone ! On our app,
This issue has 16437 crashes affecting 13149 usersfor the last 90 days. And this is our number 1 crash…Happy if that this crash may be fixed in a short future.
@morganchen12 : This is in the last 90 days. It represents 60% of total crashes of the same period
@allenktv Is there any update on this issue? We are still facing these crashes and is really messing up the app stability metrics.
As an additional information, we do not pass nil to Firebase as value. In all places we are passing non-optional Any as the value and string as key.
We would really appreciate it, if this issue is resolved asap.