adjust / cordova_sdk

This is the Cordova SDK of
http://www.adjust.com
Other
37 stars 43 forks source link

Error on IOs : +[NSString adjJoin:]: unrecognized selector sent to class 0x7fff86500530 #155

Closed Metroslim closed 2 years ago

Metroslim commented 2 years ago

Hello,

My environment is: Ionic 5 + Capacitor 2 + Angular 10 IOs target 12.0

I've added: @awesome-cordova-plugins/adjust@5.38.0 com.adjust.sdk@4.29.1

I've followed instruction and implmented it like in your capacitor example:

` const adjustConfig: AdjustConfig = new AdjustConfig(environment.ADJUST_KEY, AdjustEnvironment.Sandbox);

adjustConfig.setLogLevel(AdjustLogLevel.Verbose);
this.adjust.create(adjustConfig);

`

Nothing fancy.

It's compiling and it's working on Android. But when trying to run it in an IOs device the App crash on this.adjust.create with the following message: To Native Cordova -> Adjust create Adjust93399632 ["options": [[{"delayStart":0,"logLevel":"VERBOSE","defaultTracker":null,"urlStrategy":null,"externalDeviceId":null,"sendInBackground":null,"shouldLaunchDeeplink":null,"eventBufferingEnabled":null,"userAgent":null,"isDeviceKnown":null,"needsCost":null,"secretId":null,"info1":null,"info2":null,"info3":null,"info4":null,"processName":null,"preinstallTrackingEnabled":null,"preinstallFilePath":null,"oaidReadingEnabled":null,"allowiAdInfoReading":null,"allowIdfaReading":null,"allowAdServicesInfoReading":null,"attributionCallback":null,"eventTrackingSucceededCallback":null,"eventTrackingFailedCallback":null,"sessionTrackingSucceededCallback":null,"sessionTrackingFailedCallback":null,"deferredDeeplinkCallback":null,"conversionValueUpdatedCallback":null,"appToken":"XXXXXXXXX","environment":"sandbox","sdkPrefix":"cordova4.29.1"}]]] 2022-01-27 16:44:33.552538+0100 App[22715:427606] [Adjust]w: SANDBOX: Adjust is running in Sandbox mode. Use this setting for testing. Don't forget to set the environment toproduction` before publishing 2022-01-27 16:44:33.553253+0100 App[22715:427606] +[NSString adjJoin:]: unrecognized selector sent to class 0x7fff86500530 2022-01-27 16:44:33.563092+0100 App[22715:427606] Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[NSString adjJoin:]: unrecognized selector sent to class 0x7fff86500530' First throw call stack: ( 0 CoreFoundation 0x00007fff203feba4 exceptionPreprocess + 242 1 libobjc.A.dylib 0x00007fff201a1be7 objc_exception_throw + 48 2 CoreFoundation 0x00007fff2040d72a CFExceptionProem + 0 3 CoreFoundation 0x00007fff204030ac forwarding + 1433 4 CoreFoundation 0x00007fff204051d8 _CF_forwarding_prep_0 + 120 5 CordovaPlugins 0x0000000104d4bcb8 +[ADJUtil checkForDirectoryPresenceInPath:forFolder:] + 113 6 CordovaPlugins 0x0000000104d4bb59 +[ADJUtil getFilePathInAppSupportDir:] + 143 7 CordovaPlugins 0x0000000104d4abdb +[ADJUtil readObject:objectName:class:syncObject:] + 134 8 CordovaPlugins 0x0000000104d3117b -[ADJActivityHandler readAttribution] + 100 9 CordovaPlugins 0x0000000104d25569 -[ADJActivityHandler initWithConfig:savedPreLaunch:] + 844 10 CordovaPlugins 0x0000000104d22d0b -[Adjust appDidLaunch:] + 192 11 CordovaPlugins 0x0000000104d2165e +[Adjust appDidLaunch:] + 97 12 CordovaPlugins 0x0000000104beef5d -[AdjustCordova create:] + 6045 13 Capacitor 0x00000001047878fa $s9Capacitor9CAPBridgeC19handleCordovaJSCall4callyAA0E0C_tF + 3050 14 Capacitor 0x0000000104792677 $s9Capacitor17CAPBridgeDelegatePAAE21userContentController_10didReceive6bridgeySo06WKUsereF0C_So15WKScriptMessageCAA0B0CtF + 6791 15 Capacitor 0x000000010479ecbc $s9Capacitor23CAPBridgeViewControllerC011userContentD0_10didReceiveySo06WKUserfD0C_So15WKScriptMessageCtF + 204 16 Capacitor 0x000000010479ed27 $s9Capacitor23CAPBridgeViewControllerC011userContentD0_10didReceiveySo06WKUserfD0C_So15WKScriptMessageCtFTo + 71 17 WebKit 0x00007fff29848013 _ZN28ScriptMessageHandlerDelegate14didPostMessageERN6WebKit12WebPageProxyEONS0_13FrameInfoDataERN3API12ContentWorldERN7WebCore21SerializedScriptValueE + 239 18 WebKit 0x00007fff29ab9818 _ZN6WebKit29WebUserContentControllerProxy14didPostMessageEN3WTF16ObjectIdentifierINS_26WebPageProxyIdentifierTypeEEEONS_13FrameInfoDataEyRKN3IPC14ArrayReferenceIhLm18446744073709551615EEEONS1_17CompletionHandlerIFvSB_RKNS1_6StringEEEE + 594 19 WebKit 0x00007fff29d742be _ZN3IPC18handleMessageAsyncIN8Messages29WebUserContentControllerProxy14DidPostMessageEN6WebKit29WebUserContentControllerProxyEMS5_FvN3WTF16ObjectIdentifierINS4_26WebPageProxyIdentifierTypeEEEONS4_13FrameInfoDataEyRKNS_14ArrayReferenceIhLm18446744073709551615EEEONS6_17CompletionHandlerIFvSF_RKNS6_6StringEEEEEEEvRNS_10ConnectionERNS_7DecoderEPT0T1 + 3663 20 WebKit 0x00007fff29d7345c _ZN6WebKit29WebUserContentControllerProxy17didReceiveMessageERN3IPC10ConnectionERNS1_7DecoderE + 64 21 WebKit 0x00007fff295e41bb _ZN3IPC18MessageReceiverMap15dispatchMessageERNS_10ConnectionERNS_7DecoderE + 199 22 WebKit 0x00007fff299df0b5 _ZN6WebKit15WebProcessProxy17didReceiveMessageERN3IPC10ConnectionERNS1_7DecoderE + 31 23 WebKit 0x00007fff295c0770 _ZN3IPC10Connection15dispatchMessageENSt3110unique_ptrINS_7DecoderENS1_14default_deleteIS3_EEEE + 658 24 WebKit 0x00007fff295bfea4 _ZN3IPC10Connection24dispatchIncomingMessagesEv + 408 25 JavaScriptCore 0x00007fff3371281f _ZN3WTF7RunLoop11performWorkEv + 303 26 JavaScriptCore 0x00007fff3371380a _ZN3WTF7RunLoop11performWorkEPv + 26 27 CoreFoundation 0x00007fff2036ce15 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17 28 CoreFoundation 0x00007fff2036cd0d CFRunLoopDoSource0 + 180 29 CoreFoundation 0x00007fff2036c1e2 CFRunLoopDoSources0 + 242 30 CoreFoundation 0x00007fff20366941 CFRunLoopRun + 875 31 CoreFoundation 0x00007fff203660f3 CFRunLoopRunSpecific + 567 32 GraphicsServices 0x00007fff2c995cd3 GSEventRunModal + 139 33 UIKitCore 0x00007fff25059f42 -[UIApplication _run] + 928 34 UIKitCore 0x00007fff2505eb5e UIApplicationMain + 101 35 App 0x0000000103f6df1f main + 63 36 dyld 0x0000000104345ee9 start_sim + 10 37 ??? 0x00000001125884fe 0x0 + 4602758398 ) libc++abi: terminating with uncaught exception of type NSException

`

I've tried a lots of thing sbut I'm still facing this issue and don't know where to look at except in IOs implementation: ADJUtil checkForDirectoryPresenceInPath:forFolder

but I'm not an IOs developer so it's king of tricky.

Thanks for your help.

uerceg commented 2 years ago

Hi @Metroslim,

Sounds like a duplicate of the https://github.com/adjust/cordova_sdk/issues/151. Can you try suggested solution from there and let us know it worked for you?

Metroslim commented 2 years ago

Well, @uerceg thank you. It is indeed a duplicate. I'm sorry for that, I feel stupid, I didn't take a closed look at the closed issue. Maybe this crucial point should be in the readme somewhere. Anyway thank again.

uerceg commented 2 years ago

No worries, all good. šŸ‘ And I do agree that it's a good idea to add this information in the README since indeed it's starting to pop up more and more for Capacitor users. Thanks for the advice. Cheers.