AppLovin / AppLovin-MAX-Unity-Plugin

111 stars 31 forks source link

Runtime Crash in Unity 2019.3.x #26

Closed vkimone closed 3 years ago

vkimone commented 4 years ago

Does Unity 2019.3.x not support? When the SDK is integrated, the following runtime crash occurs.

  1. Initialize the MAX SDK with the SDK key.
  2. Runtime Crash occurs when the MAX SDK loads a banner. (No Problem in Unity 2019.2.x)

objc[5500]: Class ALTaskProcessVASTWrapperResponse is implemented in both /private/var/containers/Bundle/Application/B192E70A-C579-4C6F-9D56-93F6CC4509B0/skincare.app/skincare (0x104c47f08) and /private/var/containers/Bundle/Application/B192E70A-C579-4C6F-9D56-93F6CC4509B0/skincare.app/Frameworks/UnityFramework.framework/UnityFramework (0x1077fa308). One of the two will be used. Which one is undefined.

objc[5500]: Class ALMutableVASTContext is implemented in both /private/var/containers/Bundle/Application/B192E70A-C579-4C6F-9D56-93F6CC4509B0/skincare.app/skincare (0x104c47eb8) and /private/var/containers/Bundle/Application/B192E70A-C579-4C6F-9D56-93F6CC4509B0/skincare.app/Frameworks/UnityFramework.framework/UnityFramework (0x1077fa2b8). One of the two will be used. Which one is undefined.

objc[5500]: Class ALWKWebViewButton is implemented in both /private/var/containers/Bundle/Application/B192E70A-C579-4C6F-9D56-93F6CC4509B0/skincare.app/skincare (0x104c47fd0) and /private/var/containers/Bundle/Application/B192E70A-C579-4C6F-9D56-93F6CC4509B0/skincare.app/Frameworks/UnityFramework.framework/UnityFramework (0x1077fa3d0). One of the two will be used. Which one is undefined.

objc[5500]: Class ALTaskReportAppLovinReward is implemented in both /private/var/containers/Bundle/Application/B192E70A-C579-4C6F-9D56-93F6CC4509B0/skincare.app/skincare (0x104c48020) and /private/var/containers/Bundle/Application/B192E70A-C579-4C6F-9D56-93F6CC4509B0/skincare.app/Frameworks/UnityFramework.framework/UnityFramework (0x1077fa420). One of the two will be used. Which one is undefined.

objc[5500]: Class ALSdkConfiguration is implemented in both /private/var/containers/Bundle/Application/B192E70A-C579-4C6F-9D56-93F6CC4509B0/skincare.app/skincare (0x104c48070) and /private/var/containers/Bundle/Application/B192E70A-C579-4C6F-9D56-93F6CC4509B0/skincare.app/Frameworks/UnityFramework.framework/UnityFramework (0x1077fa470). One of the two will be used. Which one is undefined.

objc[5500]: Class ALFullScreenAdTracker is implemented in both /private/var/containers/Bundle/Application/B192E70A-C579-4C6F-9D56-93F6CC4509B0/skincare.app/skincare (0x104c480c0) and /private/var/containers/Bundle/Application/B192E70A-C579-4C6F-9D56-93F6CC4509B0/skincare.app/Frameworks/UnityFramework.framework/UnityFramework (0x1077fa4c0). One of the two will be used. Which one is undefined.

objc[5500]: Class ALTaskValidateAppLovinReward is implemented in both /private/var/containers/Bundle/Application/B192E70A-C579-4C6F-9D56-93F6CC4509B0/skincare.app/skincare (0x104c48110) and /private/var/containers/Bundle/Application/B192E70A-C579-4C6F-9D56-93F6CC4509B0/skincare.app/Frameworks/UnityFramework.framework/UnityFramework (0x1077fa510). One of the two will be used. Which one is undefined.

2020-05-28 20:15:21.093446+0900 skincare[5500:1973428] Built from '2019.3/release' branch, Version '2019.3.13f1 (d4ddf0d95db9)', Build type 'Release', Scripting Backend 'il2cpp'

-> applicationDidFinishLaunching()

-> applicationDidBecomeActive()

GfxDevice: creating device client; threaded=1

Initializing Metal device caps: Apple A10 GPU

Initialize engine version: 2019.3.13f1 (d4ddf0d95db9)

2020-05-28 20:15:21.642904+0900 skincare[5500:1973428] Unbalanced calls to begin/end appearance transitions for <SplashScreenController: 0x1053665a0>.

UnloadTime: 0.307625 ms

2020-05-28 20:15:23.702638+0900 skincare[5500:1973428] [AppLovinSdk] DEBUG [ALSdk] Setting plugin version: Max-Unity-2.4.11

2020-05-28 20:15:23.850388+0900 skincare[5500:1973428] [Process] kill() returned unexpected error 1

2020-05-28 20:15:23.850428+0900 skincare[5500:1973428] [Process] kill() returned unexpected error 1

2020-05-28 20:15:23.853054+0900 skincare[5500:1973428] [Process] kill() returned unexpected error 1

2020-05-28 20:15:23.876148+0900 skincare[5500:1973428] [Process] kill() returned unexpected error 1

2020-05-28 20:15:23.893460+0900 skincare[5500:1973428] [Process] kill() returned unexpected error 1

2020-05-28 20:15:23.893548+0900 skincare[5500:1973428] [Process] kill() returned unexpected error 1

2020-05-28 20:15:23.913094+0900 skincare[5500:1973428] [Process] kill() returned unexpected error 1

2020-05-28 20:15:24.054596+0900 skincare[5500:1973620] [AppLovinSdk] DEBUG [AppLovinSdk]

========================================

AppLovin SDK

Version: 6.12.7

Plugin Version: Max-Unity-2.4.11

SafeDK Version:

OS: iOS 13.3.1

IDFA: <Enable verbose logging to see the IDFA to use for test devices - https://monetization-support.applovin.com/hc/en-us/articles/236114328-How-can-I-expose-verbose-logging-for-the-SDK>

SDK Key: -Vv3dDqWyaSywLUC5zwkuzoiwqPhd6nRlmBJELyUtUuwxZEkXENNKBXkM5Eq0ET3HdghieQGRRDnuy62W2UaBi

Model: iPhone9,4

Locale: en_KR

Simulator: 0

Bundle ID: com.lila.skincare

Has AppLovinSDKResources: true

Test Mode On: false

Verbose Logging On: false

Mediation Provider: max

TG: 93

LTG: 7

ARU: (null)

HUC: (null)

DNS: (null)

========================================

[AppLovin MAX] Invoking event: System.Action`1[MaxSdkBase+SdkConfiguration]. Param: MaxSdkBase+SdkConfiguration

MaxSdkCallbacks:InvokeEvent(Action`1, T)

MaxSdkCallbacks:ForwardEvent(String)

(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)

MAX SDK Initialized

HomeScreen:b__16_0(SdkConfiguration)

System.Action`1:Invoke(T)

MaxSdkCallbacks:ForwardEvent(String)

(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)

2020-05-28 20:15:24.081597+0900 skincare[5500:1973428] [AppLovinSdk] [MAUnityAdManager] Creating [MAAdFormat: BANNER] with ad unit identifier "41d31ae0a8818a24" and position: "TopCenter"

2020-05-28 20:15:24.083234+0900 skincare[5500:1973428] [AppLovinSdk] [MAUnityAdManager] Setting [MAAdFormat: BANNER] with ad unit identifier "41d31ae0a8818a24" to color: "#FF000000"

2020-05-28 20:15:24.107082+0900 skincare[5500:1973712] [BoringSSL] boringssl_metrics_log_metric_block_invoke(131) Failed to log metrics

2020-05-28 20:15:24.107161+0900 skincare[5500:1973712] [BoringSSL] boringssl_metrics_log_metric_block_invoke(133) Error Domain=NSOSStatusErrorDomain Code=-50 "Unsupported xpc type" UserInfo={NSDescription=Unsupported xpc type}

2020-05-28 20:15:24.530088+0900 skincare[5500:1973428] [AppLovinSdk] ERROR [ALSdk] Developer passed nil instead of ALAd instance - please check object types!

2020-05-28 20:15:24.537866+0900 skincare[5500:1973428] [AppLovinSdk] ERROR [ALSdk] Called with an invalid object type from: (

0 skincare 0x0000000104b2a630 +[ALUtils assertValidAd:] + 280

1 skincare 0x0000000104ab0b94 -[ALAdView render:overPlacement:] + 68

2 skincare 0x0000000104b06e6c __64-[ALAppLovinMediationAdapterAdViewDelegate adService:didLoadAd:]_block_invoke + 832

3 skincare 0x0000000104b06ac4 -[ALAppLovinMediationAdapterAdViewDelegate adService:didLoadAd:] + 204

4 UnityFramework 0x0000000106939080 -[ALAdZoneTrackerProxy adService:didLoadAd:] + 216

5 UnityFramework 0x0000000106960da8 -[ALTaskProcessAdResponse adService:didLoadAd:] + 140

6 UnityFramework 0x000000010697b858 __46-[ALTaskCacheAd callbackAdLoadSuccessIfNeeded]_block_invoke + 156

7 Foundation 0x00000001a03d33a0 7B1733B1-74C9-3A33-8A58-853B0A029826 + 1131424

8 Foundation 0x00000001a02dd0c8 7B1733B1-74C9-3A33-8A58-853B0A029826 + 123080

9 Foundation 0x00000001a03d5628 7B1733B1-74C9-3A33-8A58-853B0A029826 + 1140264

10 Foundation 0x00000001a02dcd60 7B1733B1-74C9-3A33-8A58-853B0A029826 + 122208

11 Foundation 0x00000001a03d6020 7B1733B1-74C9-3A33-8A58-853B0A029826 + 1142816

12 Foundation 0x00000001a03d5aec 7B1733B1-74C9-3A33-8A58-853B0A029826 + 1141484

13 libdispatch.dylib 0x000000019fc8d7dc B9D95EAB-9269-367D-B2F4-C2B45821A32D + 59356

14 libdispatch.dylib 0x000000019fcdb184 B9D95EAB-9269-367D-B2F4-C2B45821A32D + 377220

15 libdispatch.dylib 0x000000019fc8d190 B9D95EAB-9269-367D-B2F4-C2B45821A32D + 57744

16 CoreFoundation 0x000000019ff8c5e4 7519E999-1053-3367-B9D5-8844F6D3BDC6 + 693732

17 CoreFoundation 0x000000019ff875d8 7519E999-1053-3367-B9D5-8844F6D3BDC6 + 673240

18 CoreFoundation 0x000000019ff86adc CFRunLoopRunSpecific + 464

19 GraphicsServices 0x00000001a9f27328 GSEventRunModal + 104

20 UIKitCore 0x00000001a409463c UIApplicationMain + 1936

21 UnityFramework 0x000000010681927c -[UnityFramework runUIApplicationMainWithArgc:argv:] + 108

22 skincare 0x0000000104a807d8 main + 68

23 libdyld.dylib 0x000000019fe10360 7B531A15-3E73-3185-90E2-B88D9476DA5E + 4960

)

2020-05-28 20:15:24.543251+0900 skincare[5500:1973428] Uncaught exception: NSInvalidArgumentException: Passed an object of type other than ALAd: ALAdServerAd.

(

0 CoreFoundation 0x00000001a000ea5c 7519E999-1053-3367-B9D5-8844F6D3BDC6 + 1227356

1 libobjc.A.dylib 0x000000019fd35fa4 objc_exception_throw + 56

2 CoreFoundation 0x000000019ff041c0 7519E999-1053-3367-B9D5-8844F6D3BDC6 + 135616

3 skincare 0x0000000104b2a6b0 +[ALUtils assertValidAd:] + 408

4 skincare 0x0000000104ab0b94 -[ALAdView render:overPlacement:] + 68

5 skincare 0x0000000104b06e6c __64-[ALAppLovinMediationAdapterAdViewDelegate adService:didLoadAd:]_block_invoke + 832

6 skincare 0x0000000104b06ac4 -[ALAppLovinMediationAdapterAdViewDelegate adService:didLoadAd:] + 204

7 UnityFramework 0x0000000106939080 -[ALAdZoneTrackerProxy adService:didLoadAd:] + 216

8 UnityFramework 0x0000000106960da8 -[ALTaskProcessAdResponse adService:didLoadAd:] + 140

9 UnityFramework 0x000000010697b858 __46-[ALTaskCacheAd callbackAdLoadSuccessIfNeeded]_block_invoke + 156

10 Foundation 0x00000001a03d33a0 7B1733B1-74C9-3A33-8A58-853B0A029826 + 1131424

11 Foundation 0x00000001a02dd0c8 7B1733B1-74C9-3A33-8A58-853B0A029826 + 123080

12 Foundation 0x00000001a03d5628 7B1733B1-74C9-3A33-8A58-853B0A029826 + 1140264

13 Foundation 0x00000001a02dcd60 7B1733B1-74C9-3A33-8A58-853B0A029826 + 122208

14 Foundation 0x00000001a03d6020 7B1733B1-74C9-3A33-8A58-853B0A029826 + 1142816

15 Foundation 0x00000001a03d5aec 7B1733B1-74C9-3A33-8A58-853B0A029826 + 1141484

16 libdispatch.dylib 0x000000019fc8d7dc B9D95EAB-9269-367D-B2F4-C2B45821A32D + 59356

17 libdispatch.dylib 0x000000019fcdb184 B9D95EAB-9269-367D-B2F4-C2B45821A32D + 377220

18 libdispatch.dylib 0x000000019fc8d190 B9D95EAB-9269-367D-B2F4-C2B45821A32D + 57744

19 CoreFoundation 0x000000019ff8c5e4 7519E999-1053-3367-B9D5-8844F6D3BDC6 + 693732

20 CoreFoundation 0x000000019ff875d8 7519E999-1053-3367-B9D5-8844F6D3BDC6 + 673240

21 CoreFoundation 0x000000019ff86adc CFRunLoopRunSpecific + 464

22 GraphicsServices 0x00000001a9f27328 GSEventRunModal + 104

23 UIKitCore 0x00000001a409463c UIApplicationMain + 1936

24 UnityFramework 0x000000010681927c -[UnityFramework runUIApplicationMainWithArgc:argv:] + 108

25 skincare 0x0000000104a807d8 main + 68

26 libdyld.dylib 0x000000019fe10360 7B531A15-3E73-3185-90E2-B88D9476DA5E + 4960

)

2020-05-28 20:15:24.543858+0900 skincare[5500:1973428] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Passed an object of type other than ALAd: ALAdServerAd.'

*** First throw call stack:

(0x1a000ea48 0x19fd35fa4 0x19ff041c0 0x104b2a6b0 0x104ab0b94 0x104b06e6c 0x104b06ac4 0x106939080 0x106960da8 0x10697b858 0x1a03d33a0 0x1a02dd0c8 0x1a03d5628 0x1a02dcd60 0x1a03d6020 0x1a03d5aec 0x19fc8d7dc 0x19fcdb184 0x19fc8d190 0x19ff8c5e4 0x19ff875d8 0x19ff86adc 0x1a9f27328 0x1a409463c 0x10681927c 0x104a807d8 0x19fe10360)

libc++abi.dylib: terminating with uncaught exception of type NSException

(lldb)

Lorenzo45 commented 4 years ago

Thanks for bringing this up! Looking into it.

Update: I found out this is an issue with the Unity Jar Resolver causing our SDK to be duplicated. Still working on a solution. Relevant issue: https://github.com/googlesamples/unity-jar-resolver/issues/282

thomasmso commented 4 years ago

Hey @vkimone, do you mind going into the exported Xcode project -> Unity-iPhone target -> Build Settings -> Other Linker Flags and removing the $(inherited) flag? Example of how to find that flag is below:

image

Let us know if that works for you. Also, please check that you are not getting a black screen when launching your app the second time. Thanks.

vkimone commented 4 years ago

@thomasmso, as you said, I removed the $(inherited) flag, but unfortunately, I got the same error.

xcode-crash

thomasmso commented 4 years ago

@vkimone - Do you mind sending over the contents of your Podfile?

vkimone commented 4 years ago

@thomasmso - you can download the xcode project as the following link. Download

thomasmso commented 4 years ago

Requested access

vkimone commented 4 years ago

Requested access

Can't access the file yet?

thomasmso commented 4 years ago

Got it - this seems to be a general bug with CocoaPods when there are two targets. We will add back a workaround into the Unity Plugin for it. Do you mind deleting the OTHER_LDFLAGS entry in the following file:

image

thomasmso commented 3 years ago

@vkimone - Has the issue been resolved?

vkimone commented 3 years ago

yes, the issue has been resolved. thanks for your help.