AppsFlyerSDK / AppsFlyerFramework

AppsFlyer Apple SDK
https://support.appsflyer.com/hc/en-us/articles/207032066-AppsFlyer-SDK-Integration-iOS
Other
170 stars 92 forks source link

-[AFSDKSKAdNetwork willUpdateConversionValueWithName:values:] Issue #154

Closed pmanuelli closed 3 years ago

pmanuelli commented 3 years ago

Report

SDK Version

6.1.3

What did you do?

Integrated SDK version 6.1.3 and run the app in the production environment.

What did you expect to happen?

The app does not crash.

What happened instead?

The app crashes on -[AFSDKSKAdNetwork willUpdateConversionValueWithName:values:]

EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000000000000

Crashed: com.appsflyer.serial
0  libobjc.A.dylib                0x1a71ee48c objc_msgSend + 44
1  CoreFoundation                 0x192d744b0 -[__NSCFString isEqualToString:] + 248
2  XXXXXXXXXXX                    0x1032bddbc -[AFSDKSKAdNetwork willUpdateConversionValueWithName:values:] + 4369161660
3  XXXXXXXXXXX                    0x1032d586c -[AppsFlyerLib callServerWithEventName:eventValues:options:completion:] + 4369258604
4  libdispatch.dylib              0x192ac2280 _dispatch_client_callout + 16
5  libdispatch.dylib              0x192a67390 _dispatch_continuation_pop$VARIANT$mp + 412
6  libdispatch.dylib              0x192a780ac _dispatch_source_invoke$VARIANT$mp + 1308
7  libdispatch.dylib              0x192a6ac94 _dispatch_lane_serial_drain$VARIANT$mp + 300
8  libdispatch.dylib              0x192a6b8a8 _dispatch_lane_invoke$VARIANT$mp + 424
9  libdispatch.dylib              0x192a75338 _dispatch_workloop_worker_thread + 712
10 libsystem_pthread.dylib        0x1db5bf5a4 _pthread_wqthread + 272
11 libsystem_pthread.dylib        0x1db5c2874 start_wqthread + 8

Please provide any other relevant information.

The issue started at least on version 6.1.2. It crashes when we enable the new Conversion Value measurement feature, based on a tracked event.

SKAdNetworkSetting

andr-ggn commented 3 years ago

Hi Which param did you pass as eventName to logEvent? It seems that you pass not a String value

pmanuelli commented 3 years ago

Hello Andrey, thank you for your answer.

We are using non-null Strings as event names. The event used as conversion event is "conversion_value_update"

pmanuelli commented 3 years ago

More relevant information: To the users experiencing this crash, seems to happen only once. It does happen shortly after the first run of the app.

twc-rhedin commented 3 years ago

As an additional data point, we're also seeing this crash in our app. Our AppsFlyer implementation has not changed (other than updating the library) for many releases of our app. We have not yet migrated to v6.1.4.

twc-rhedin commented 3 years ago

Further information: we just updated to v6.1.4 and our automation tests are showing that the problem is likely fixed (i.e. the problem was causing our automation tests to fail immediately, and this is no longer happening, so it looks like it is at least improved and may be completely fixed)

pmanuelli commented 3 years ago

Great news @twc-rhedin! Our app with the update to v6.1.4 comes to production today or tomorrow (that depends on Apple's review time). I will let you all know if the issue is resolved with this version.

andr-ggn commented 3 years ago

@twc-rhedin Can you share additional logs from automation tests? And any useful information related to this problem. And seems like the problem was on backend side.. Cos no changes were made on SDK for SKAd feature. support@appsflyer.com

Update 1: Starting from 6.1.4 SKAd rule has separate endpoint and implementation changed. Thats why, I think, crash disappeared.

pmanuelli commented 3 years ago

In my case, the crash persists in v6.1.4.

We tested in our production environment and as soon as we enabled the Conversion Value measurement feature, the crash started again.

pmanuelli commented 3 years ago

@twc-rhedin have you tested in your production environment?

chwo commented 3 years ago

@andr-ggn We are experiencing the same issue. It started in version 6.1.3 and persists in the current version 6.1.4.

I can provide the following crash log from Crashlytics:

Abgestürzt: com.appsflyer.serial
EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000000000000
-[AFSDKSKAdNetwork willUpdateConversionValueWithName:values:]
Crashed: com.appsflyer.serial
0  libobjc.A.dylib                0x1a1d76128 lookUpImpOrForward + 76
1  libobjc.A.dylib                0x1a1d60524 _objc_msgSend_uncached + 68
2  libswiftCore.dylib             0x190d281f0 _swift_stdlib_isNSString + 68
3  libswiftCore.dylib             0x190b23b34 _isNSString(_:) + 100
4  libswiftCore.dylib             0x190b3bdac __SharedStringStorage.isEqualToString(to:) + 212
5  libswiftCore.dylib             0x190b3bf98 @objc __SharedStringStorage.isEqualToString(to:) + 28
6  AppName                        0x1008d0f8c -[AFSDKSKAdNetwork willUpdateConversionValueWithName:values:] + 4379725708
7  AppName                        0x1008e9164 -[AppsFlyerLib callServerWithEventName:eventValues:options:completion:] + 4379824484
8  libdispatch.dylib              0x18c93ddb0 _dispatch_client_callout + 20
9  libdispatch.dylib              0x18c94112c _dispatch_continuation_pop + 416
10 libdispatch.dylib              0x18c952c08 _dispatch_source_invoke + 1260
11 libdispatch.dylib              0x18c944fd8 _dispatch_lane_serial_drain + 272
12 libdispatch.dylib              0x18c945c5c _dispatch_lane_invoke + 408
13 libdispatch.dylib              0x18c94fd78 _dispatch_workloop_worker_thread + 708
14 libsystem_pthread.dylib        0x1d87f9814 _pthread_wqthread + 276
15 libsystem_pthread.dylib        0x1d880076c start_wqthread + 8
andr-ggn commented 3 years ago

The issue was caused by internal variable with __unsafe_unretained modifier. Next release will contain a fix. Thank you for participation!

andr-ggn commented 3 years ago

6.2.0 should fix an issue

af-fess commented 3 years ago

fixed in 6.2.0