adjust / cordova_sdk

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

TypeError: adjustConfig.hasSkad4ConversionValueUpdatedCallbackListener is not a function #181

Closed psabater closed 11 months ago

psabater commented 11 months ago

Preliminary Info

What dependencies are you using?

What are the versions of any relevant development tools you are using?

Report

What unexpected behavior are you seeing?

There's a TypeError issue on call Adjust.create method with a new AdjustConfig.

const environment = AdjustEnvironment.Sandbox;
const token = 'XXXX';
const config = new AdjustConfig(token, environment);
Adjust.create(config);
TypeError: adjustConfig.hasSkad4ConversionValueUpdatedCallbackListener is not a function
    at Object.create ((índice):3575:26)
    at callCordovaPlugin (vendor.js:1227:39)
    at vendor.js:1320:14
    at cordova (vendor.js:1577:87)
    at AdjustOriginal.create (vendor.js:658:82)

Captura de pantalla 2023-10-18 a las 11 10 51

What is the expected behavior?

Adjust it's init with the config created like version 4.32.0

uerceg commented 11 months ago

Hi @psabater,

Thank you for the report. Is your app plain Cordova app or are you using some of the frameworks on top of it (Ionic Capacitor or something else)?

psabater commented 11 months ago

Hi @uerceg, I'm using Ionic Capacitor. It seems like adjust config, on create a new class, it doesn't have hasSkad4ConversionValueUpdatedCallbackListener callback function created

uerceg commented 11 months ago

Ah, sorry, I was late to notice that you have mentioned that you are using Capacitor. It could maybe be that the issue is that TypeScript typings which are residing in awesome-cordova-plugins repo is still not updated with all the changes which v4.35.1 has introduced (PR still to be merged).

Are you pulling the TypeScript typings in your app from that repo? (using

import { Adjust, AdjustConfig, AdjustEnvironment, AdjustLogLevel } from '@awesome-cordova-plugins/adjust/ngx';

import statement in your app?)

psabater commented 11 months ago

Oh that's the problem. For that reason the class doesn't have the correct function and fails. In order to use the plugin in version 4.35.1 with typing we will have to wait for them to accept the pull request. Thank you very much!

I will close the issue and wait until it happen