onSkuDetailsResponse:0 Can't find any IAP listener. result: 0

Hi,
we are finishing transition from Cocos Creator 1.5.2 (where our game worked for more than a year) to 2.0.9. I think most of the transition is done already.

However, currently our problem is: when we build the app and run it on a mobile phone, after sdkbox.IAP.refresh() is called none of the registered 4 listeners (onRestored, onRestoreComplete, onProductRequestSuccess, onProductRequestFailure) is called and there is this message in the logcat log:
D/SDKBoxIABBillingClient: onSkuDetailsResponse:0
I/IAP: Can’t find any IAP listener. result: 0

Any idea how to solve this? I have been stuck on this problem for several days.

http://docs.sdkbox.com/en/plugins/iap/v3-js/#initialization-opportunity

do you check https://github.com/sdkbox/sdkbox-sample-iap#test-iap-for-android list ?

Thank you very much for your hints. It looks like: “Please setListener first, then init.” is what helped us to move further.

However, I wonder why it is neccessary to set the listeners before init, because in our app we reset the listeners couple of times to use different callbacks. Without proper understanding of the plugin it is difficult to solve our problem correctly.

Should we call init after each calling of setListener? Or should we use setListener only once in whole app? In such case why would removeListener even exist?
Is there somewhere more detailed documentation/explanation why and how things work in iap plugin than http://docs.sdkbox.com/en/plugins/iap/v3-js/?

I think it’s better to use only one listener, and dispatch event in the listener to others.

I wonder why you cannot (shouldn’t) change the listener.