flurry / flurry-ios-sdk

Flurry iOS SDK CocoaPods
Apache License 2.0
155 stars 65 forks source link

App Crash with 10.3.0 #195

Closed kamalk2 closed 4 years ago

kamalk2 commented 4 years ago

Describe the bug The app crashes at launch after upgrading to Flurry 10.3.0

This Bug is About Please choose the closest item by replacing [ ] with [x].

Platform Please choose the platform(s) that you are having the issue by replacing [ ] with [x].

Environment Please tell us the versions of Flurry SDK, XCode, and iOS you are using.

To Reproduce Steps to reproduce the behavior:

  1. Install Flurry SDK 10.3.0 with cocoapods
  2. Follow the integration steps from Flurry Docs
  3. Launch the app

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Are you using Flurry Push/Messaging? No (iOS) Are you using CocoaPods or manual binary integration? Yes. Cocoapods

Add any other context about the problem here. Crash does not occur with 10.2.0 of the SDK. I removed Flurry completely from my project and tried installing it and also tried an update from 10.2.0 to 10.3.0 using CocoaPods. In the Debug navigator of XCode, the follow thread is shown: Thread 16 Queue : FlurryStreamFrameLogWriter (serial)

The debug console has the following logs from Flurry: 2020-04-15 09:51:18.634239+0530: MyApp[8579:95972] Flurry: startSession called for the first time 2020-04-15 09:51:18.634563+0530: MyApp[8579:96379] -[FlurryStreamCoreBuffer streamMessage:]: msg = <FlurryStreamCCPAOptOut: 0x600002d29880, type = 174, json = { "fl.frame.version" : 1, "fl.ccpa.optout" : false }> 2020-04-15 09:51:18.635046+0530: MyApp[8579:96379] -[FlurrySessionInitInfoSource onqueue_streamSessionInfo]: session init info: <FlurrySessionInitInfo: 0x600002dd7c40, type = 141, json = { "fl.background.session.metrics" : true, "fl.frame.version" : 1, "fl.play.service.availability" : -1, "fl.agent.version" : 263, "fl.apikey" : "MY_APP_KEY", "fl.agent.report.key" : 1, "fl.agent.platform" : 2 }> 2020-04-15 09:51:18.635571+0530: MyApp[8579:96379] -[FlurryStreamCoreBuffer streamMessage:]: msg = <FlurrySessionInitInfo: 0x600002d29a40, type = 141, json = { "fl.background.session.metrics" : true, "fl.frame.version" : 1, "fl.play.service.availability" : -1, "fl.agent.version" : 263, "fl.apikey" : "MY_APP_KEY", "fl.agent.report.key" : 1, "fl.agent.platform" : 2 }> 2020-04-15 09:51:18.636679+0530: MyApp[8579:96396] -[FlurryStreamFrameIterator open:error:]:97: setting state to 1 2020-04-15 09:51:18.637306+0530: MyApp[8579:96398] -[FlurryStreamCoreBuffer streamMessage:]: msg = <FlurryStreamAppInfo: 0x600001cb01e0, type = 133, json = { "fl.bundle.id" : "io.ShopInbox.ShopInbox", "fl.app.version.code" : "513", "fl.app.version" : "2.9.4", "fl.frame.version" : 1, "fl.build.environment" : 1 }> 2020-04-15 09:51:18.637926+0530: MyApp[8579:96399] -[FlurryStreamCoreBuffer streamMessage:]: msg = <FlurryStreamDeviceProperties: 0x600001cb40c0, type = 139, json = { "fl.frame.version" : 1, "fl.device.properties" : { "bnd.ver" : "513", "device.arch" : "arm64", "scr.height" : "812", "device.os.version" : "13.4", "scr.width" : "375", "device.model.1" : "x86_64" } }> 2020-04-15 09:51:18.638212+0530: MyApp[8579:96401] -[FlurryTimeZoneInfoSource onqueue_fetchAndSendTimeZone]: Got New TimeZone Info [Asia/Kolkata] 2020-04-15 09:51:18.638704+0530: MyApp[8579:96378] -[FlurryStreamCoreBuffer streamMessage:]: msg = <FlurryStreamReporting: 0x600001cb0300, type = 164, json = { "fl.continue.session.millis" : 10000, "fl.initial.timestamp" : 1586923262602, "fl.frame.version" : 1, "fl.session.event" : "SESSION_START", "fl.session.timestamp" : 1586924478634, "fl.session.state" : 0 }> 2020-04-15 09:51:18.640652+0530: MyApp[8579:96397] -[FlurryStreamCoreBuffer streamMessage:]: msg = <FlurryStreamReportedIdentifers: 0x600001b9eee0, type = 140, json = { "fl.frame.version" : 1, "fl.ad.tracking" : true, "fl.reported.id" : { "VendorId" : "D650FDB8-FF07-4307-9B42-0051214B80C7", "iOSInstallationId" : "4UhytmkRQ7mfB8ogBlFECw==", "iOSAdvertisingId" : "00000000-0000-0000-0000-000000000000" } }> 2020-04-15 09:51:18.641258+0530: MyApp[8579:96406] -[FlurryStreamCoreBuffer streamMessage:]: msg = <FlurryStreamDynamicSessionInfo: 0x600002d2da00, type = 143, json = { "fl.sdk.version.code" : "10.3.0", "fl.frame.version" : 1, "fl.background.enabled" : false }> 2020-04-15 09:51:18.643637+0530: MyApp[8579:96396] -[FlurryStreamFrameIterator close]:104: setting state to 3 2020-04-15 09:51:18.643701+0530: MyApp[8579:96401] -[FlurryStreamCoreBuffer streamMessage:]: msg = <FlurryStreamTimeZoneInfo: 0x600002ddf600, type = 162, json = { "fl.timezone.value" : "Asia\/Kolkata", "fl.frame.version" : 1 }> 2020-04-15 09:51:18.635859+0530: MyApp[8579:95972] Flurry: Start session called with apiKey[MY_APP_KEY] 2020-04-15 09:51:18.648659+0530: MyApp[8579:95972] Flurry: Starting session on Agent Version [Flurry_iOS_263_10.3.0] 2020-04-15 09:51:18.651479+0530: MyApp[8579:96400] -[FlurryLocaleInfoDataProvider onqueue_fetchAndSendLocaleWithCountry:language:]: Got New Locale language [en] country [US] 2020-04-15 09:51:18.652995+0530: MyApp[8579:96393] +[FlurryCrashContext setupContext]: allocated 4 KB (1 pages) for ctx at 0x7fcfcf083000 (ctx size 80 bytes) 2020-04-15 09:51:18.660796+0530: MyApp[8579:96402] -[FlurryStreamCoreBuffer streamMessage:]: msg = <FlurryStreamLocaleInfo: 0x600001b99720, type = 148, json = { "fl.country" : "US", "fl.language" : "en", "fl.frame.version" : 1 }> 2020-04-15 09:51:18.661264+0530: MyApp[8579:96400] +[FlurryCrashContext openContextFile]: Context file opened at /Users/MyName/Library/Developer/CoreSimulator/Devices/86C68BE8-F3E8-4F2F-8B26-5EE27A8A3BCE/data/Containers/Data/Application/F64312D4-4C1B-4107-84F2-B8B0098C94E2/Library/Application Support/FlurryFiles/.flurryCrashContext.archive 2020-04-15 09:51:18.665982+0530: MyApp[8579:96393] FlurryDataSender: posting session via FlurryURLSessionTask! 2020-04-15 09:51:18.677693+0530: MyApp[8579:96393] -[FlurryBackgroundTaskTracker startBackgroundTaskTrackingIfNeeded]: start background task 2020-04-15 09:51:18.677772+0530: MyApp[8579:96400] -[FlurryStreamCoreBuffer streamMessage:]: msg = <FlurryStreamSessionDeviceProperties: 0x6000013b8b60, type = 153, json = { "fl.frame.version" : 1, "fl.session.property" : { "battery.remaining.start" : { "value" : "-1" }, "disk.size.used" : { "value" : "60303212544" }, "carrier.mnc" : { "value" : "unavailable" }, "boot.time" : { "value" : "1586918808" }, "carrier.mcc" : { "value" : "unavailable" }, "memory.available.start" : { "value" : "79241216" }, "cpu.load.start" : { "value" : "60.4" }, "disk.size.total" : { "value" : "121123069952" }, "disk.size.available" : { "value" : "60819857408" }, "memory.used.inactive.start" : { "value" : "1870721024" }, "memory.total" : { "value" : "5823668224" }, "memory.used.wired.start" : { "value" : "1941172224" }, "battery.charging.start" : { "value" : "0" }, "carrier.name" : { "value" : "unavailable" }, "memory.used.active.start" : { "value" : "1932533760" } } }> 2020-04-15 09:51:18.680529+0530: MyApp[8579:96404] -[FlurryStreamTransferManager onqueue_processRemoveFile:]: #streaming File Removed : .flurryCommitedFrameLog_263.archive_1586924478.660822 2020-04-15 09:51:19.531492+0530: MyApp[8579:96404] -[FlurryStreamCoreBuffer streamMessage:]: msg = <FlurryStreamEvent: 0x600001692480, type = 134, json = { "fl.event.type" : "CUSTOM_EVENT", "fl.event.id" : 1, "fl.timed.event.duration" : 0, "fl.event.timed" : false, "fl.event.uptime" : 5671224, "fl.timed.event.starting" : false, "fl.event.user.parameters" : { }, "fl.event.name" : "QXBwIE9wZW5lZA==", "fl.frame.version" : 1, "fl.event.flurry.parameters" : { }, "fl.event.timestamp" : 1586924479530 }> 2020-04-15 09:51:19.825965+0530: MyApp[8579:96399] -[FlurryStreamCoreBuffer streamMessage:]: msg = <FlurryStreamAppState: 0x600002d10ac0, type = 132, json = { "fl.frame.version" : 1, "fl.app.previous.state" : -1, "fl.app.current.state" : 1 }> 2020-04-15 09:51:19.826500+0530: MyApp[8579:96401] -[FlurryStreamCoreBuffer streamMessage:]: msg = <FlurryStreamAppOrientation: 0x600002d10180, type = 156, json = { "fl.app.orientation" : 1, "fl.frame.version" : 1 }> (lldb)

rajkaur01 commented 4 years ago

@kamalk2 Thank you for using Flurry Analytics. Can you share a crash log?

conscientiousness commented 4 years ago

The app crashes at launch after upgrading SDK from 10.2.0 to 10.3.0. It's only happens on iPad with iOS12.

Fatal Exception: NSUnknownKeyException [<UIStatusBar_Modern 0x103c05730> valueForUndefinedKey:]: this class is not key value coding-compliant for the key foregroundView.

Fatal Exception: NSUnknownKeyException
0  CoreFoundation                 0x1ae2eb518 __exceptionPreprocess
1  libobjc.A.dylib                0x1ad4c69f8 objc_exception_throw
2  CoreFoundation                 0x1ae208ec0 -[NSObject(NSKindOfAdditions) isNSSet__]
3  Foundation                     0x1aecd3a38 -[NSObject(NSKeyValueCoding) valueForUndefinedKey:]
4  Foundation                     0x1aec47f3c -[NSObject(NSKeyValueCoding) valueForKey:]
5  Flurry_iOS_SDK                 0x1033ea810 -[FlurrySignalConnectionTypeDataProvider onmainqueue_getSignalBarRealObject] + 268 (FlurrySignalConnectionTypeDataProvider.m:268)
6  Flurry_iOS_SDK                 0x1033e9fc4 __67-[FlurrySignalConnectionTypeDataProvider onqueue_getSignalStrength]_block_invoke + 206 (FlurrySignalConnectionTypeDataProvider.m:206)
7  libdispatch.dylib              0x1add2c7d4 _dispatch_client_callout
8  libdispatch.dylib              0x1adcdace8 _dispatch_async_and_wait_invoke
9  libdispatch.dylib              0x1add2c7d4 _dispatch_client_callout
10 libdispatch.dylib              0x1adcda004 _dispatch_main_queue_callback_4CF$VARIANT$mp
11 CoreFoundation                 0x1ae27cec0 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
12 CoreFoundation                 0x1ae277df8 __CFRunLoopRun
13 CoreFoundation                 0x1ae277354 CFRunLoopRunSpecific
14 GraphicsServices               0x1b047779c GSEventRunModal
15 UIKitCore                      0x1da473b68 UIApplicationMain
16 Anime                          0x10233373c main + 25 (UIStoryboard+Helper.swift:25)
17 libdyld.dylib                  0x1add3d8e0 start
Skelzor commented 4 years ago

I can confirm the crash on iPad with iOS 12.4 when Flurry starts with the exact same crash log like conscientiousness is receiving.

rajkaur01 commented 4 years ago

@Skelzor @conscientiousness @kamalk2 Thank you for using Flurry Analytics. We have identified the issue and are releasing a patch to fix the issue. The patch will be released tomorrow.

hoangha052 commented 4 years ago

I'm crash too. Please fix it

rajkaur01 commented 4 years ago

@Skelzor @conscientiousness @kamalk2 @hoangha052 We have faced a slight delay in getting our patch out. We now expect to have a patch for this issue released by 04/23.

adamcichy commented 4 years ago

@rajkaur01 any news on the patch ETA?

rajkaur01 commented 4 years ago

@Skelzor @conscientiousness @kamalk2 @hoangha052 @adamcichy Patch v10.3.1 has been released this morning which contains this fix.

samsonjs commented 4 years ago

@rajkaur01 We still have this crash using 10.3.1 (via Carthage) on an iPad Pro (10.5-inch) running iOS 12.3.1 (16F203).

Fatal Exception: NSUnknownKeyException
[<UIStatusBar_Modern 0x102521630> valueForUndefinedKey:]: this class is not key value coding-compliant for the key foregroundView.

FlurrySignalConnectionTypeDataProvider.m - Line 247
-[FlurrySignalConnectionTypeDataProvider onmainqueue_getSignalBarRealObject] + 247

FlurrySignalConnectionTypeDataProvider.m - Line 193
__67-[FlurrySignalConnectionTypeDataProvider onqueue_getSignalStrength]_block_invoke + 193
rajkaur01 commented 4 years ago

@samsonjs Thank you for using Flurry Analytics. We are currently investigating this issue and will get back to you shortly. Stay tuned.

flurrydev commented 4 years ago

@samsonjs A patched Carthage beta release has been published. You can pull in the corrected files with the following tag:

github "flurry/flurry-ios-sdk" "10.3.1.rc2.carthage"

samsonjs commented 4 years ago

Thanks for the quick response!

nabeelahmed87 commented 4 years ago

when it will be fixed in Pod . My app has more than 1.5 million users and we are facing that crash. My SDK version of flurry is 10.3.1.

hantao-flurrydev commented 4 years ago

Hi @nabeelahmed87, sorry for the inconvenience caused by this crash. After fixing and releasing last patch, v10.3.1 Flurry iOS SDK binary removed all signal strength related code that might potentially causes crash previously, and has been well tested by importing sdk binary from Cocoapods. So just want to make sure that you did clean up the previous sdk binary reference from pod cache, so that you will see "fl.agent.version" : 264 for v10.3.1. Also it will be helpful if you could provide us with some available crash logs.

nabeelahmed87 commented 4 years ago

Thanks I will do that and will let you know after shipping the app

On 03-Jun-2020, at 11:54 PM, hantao-flurrydev notifications@github.com wrote:

Hi @nabeelahmed87 https://github.com/nabeelahmed87, sorry for the inconvenience from this crash. After fixing and releasing last patch, v10.3.1 Flurry iOS SDK binary removed all signal strength related code that might potentially causes crash previously, and I have well tested by importing sdk binary from Cocoapods. So just want to make sure that you did pod clean or pod cache clean --all to remove previous reference of Flurry sdk and pod update to get v10.3.1 patch.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/flurry/flurry-ios-sdk/issues/195#issuecomment-638394251, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAYEHKP2A6E6YSNI5QFQD63RU2L5FANCNFSM4MIIIQ7Q.

adamcichy commented 4 years ago

@hantao-flurrydev did you release a new version with the same version numer?

hantao-flurrydev commented 4 years ago

@adamcichy no, each agent version will be matched to a binary version uniquely.

nabeelahmed87 commented 4 years ago

Hi @nabeelahmed87, sorry for the inconvenience caused by this crash. After fixing and releasing last patch, v10.3.1 Flurry iOS SDK binary removed all signal strength related code that might potentially causes crash previously, and has been well tested by importing sdk binary from Cocoapods. So just want to make sure that you did clean up the previous sdk binary reference from pod cache, so that you will see "fl.agent.version" : 264 for v10.3.1. Also it will be helpful if you could provide us with some available crash logs.

Attached is the screenshot of crash log

Screenshot 2020-06-08 at 6 30 35 PM

hantao-flurrydev commented 4 years ago

Hi @nabeelahmed87, for sdk side, we removed the method onmainqueue_getSignalBarRealObject before v10.3.1 was released. So could you allow debug log and check if the sdk binary integrated has agent version of 264 ("fl.agent.version" : 264)?

hamedh commented 4 years ago

This crash is happening for us on the latest version of Flurry SDK

Crashed: FlurrySignalConnectionTypeDataProvider
0  libobjc.A.dylib                0x19dc22980 objc_retain + 16
1  CoreFoundation                 0x19de4af7c __NSSingleObjectArrayI_new + 84
2  CoreFoundation                 0x19ddc2454 -[NSDictionary allValues] + 312
3  Flurry_iOS_SDK                 0x101ac2b3c -[FlurrySignalConnectionTypeDataProvider onqueue_getCellularSignalConnectionType] + 240
4  Flurry_iOS_SDK                 0x101ac30a0 -[FlurrySignalConnectionTypeDataProvider onqueue_connectionTypeChanged] + 28
5  Flurry_iOS_SDK                 0x101a84a64 __30-[FlurryActor wrapAsyncBlock:]_block_invoke + 236
6  libdispatch.dylib              0x19dbaa9a8 _dispatch_call_block_and_release + 24
7  libdispatch.dylib              0x19dbab524 _dispatch_client_callout + 16
8  libdispatch.dylib              0x19db88b3c _dispatch_lane_serial_drain$VARIANT$armv81 + 564
9  libdispatch.dylib              0x19db8954c _dispatch_lane_invoke$VARIANT$armv81 + 396
10 libdispatch.dylib              0x19db9284c _dispatch_workloop_worker_thread + 580
11 libsystem_pthread.dylib        0x19dbfcb74 _pthread_wqthread + 272
12 libsystem_pthread.dylib        0x19dbff740 start_wqthread + 8
hantao-flurrydev commented 4 years ago

@hamedh, please checkout this https://github.com/flurry/react-native-flurry-sdk/issues/23 and update to the latest version of sdk to resolve this issue. Sorry for the late response.

rajkaur01 commented 4 years ago

@hamedh Closing this ticket however feel free to reopen if the issue is still occurring

vikihleblya commented 2 years ago

Hello, see this crash on 12.0.1 FlurryCarthage

Stack trace the same:

libobjc.A.dylib              objc_retain
CoreFoundation               -[NSDictionary allValues]
MRMail                       -[FlurrySignalConnectionTypeDataProvider onqueue_getCellularSignalConnectionType]
MRMail                       -[FlurrySignalConnectionTypeDataProvider onqueue_connectionTypeChanged]
MRMail                       -[FlurryActor wrapAsyncBlock:]
libdispatch.dylib            _dispatch_call_block_and_release
libdispatch.dylib            _dispatch_client_callout
libdispatch.dylib            _dispatch_lane_serial_drain
libdispatch.dylib            _dispatch_lane_invoke
libdispatch.dylib            _dispatch_workloop_worker_thread
libsystem_pthread.dylib      _pthread_wqthread
libsystem_pthread.dylib      start_wqthread

Most affected OS: iOS 15.5 iOS 15.6 iOS 15.4.1