chargebee / chargebee-react-native

MIT License
8 stars 14 forks source link

Getting an error while retrieving all product identifiers #126

Closed Jigs6720 closed 1 year ago

Jigs6720 commented 1 year ago

Error: Invalid catalog version at Object.promiseMethodWrapper [as retrieveProductIdentifiers] (NativeModules.js:105:51) at Function. (Chargebee.ts:68:33) at Generator.next () at asyncGeneratorStep (asyncToGenerator.js:3:16) at _next (asyncToGenerator.js:25:9) at asyncToGenerator.js:32:7 at tryCallTwo (core.js:45:5) at doResolve (core.js:200:13) at new Promise (core.js:66:3) at Function. (asyncToGenerator.js:21:12)

following is the code: const queryParams = new Map(); queryParams.set("limit", "1"); try { const result = await Chargebee.retrieveProductIdentifiers(queryParams); console.log(result); } catch (error) { console.log(error); }

cb-haripriyan commented 1 year ago

@Jigs6720 This usually happens when the SDK configuration is not complete/valid.

Can you confirm that the SDKs are properly configured as detailed here?

Jigs6720 commented 1 year ago

@cb-haripriyan yes it is configure properly. i am still getting this error.

cb-haripriyan commented 1 year ago

@Jigs6720 Can you share the domain you are trying on? And also can you share the response of the configure method?

Jigs6720 commented 1 year ago

@cb-haripriyan
this is the configure method Chargebee.configure({ site: "xxxxx-uk-test", publishableApiKey: "xxxxx", });

cb-haripriyan commented 1 year ago

@Jigs6720 Can you check the response of this method? I see in our system that the error "SDK Key is empty" is being returned.

The configure method takes in 4 parameters, including the Android and iOS SDK Keys. Your implementation seems to missing that.

Can you check the configuration section here? The section outlines how to link your app and generate the SDK keys, before we can use them.

Jigs6720 commented 1 year ago

@cb-haripriyan so is iosSdkKey and androidSdk Key is mandatory fields?

cb-saisrikant commented 1 year ago

@Jigs6720 Glad to connect with you! Yes SDK key is mandatory. Please note that you need to connect your app to Chargebee and generate the SDK key which is same as the App id. Please refer to this link to understand how to connect your app to Chargebee. We will be happy to get on a call and help you if needed. Please let us know. Thanks

Jigs6720 commented 1 year ago

@cb-saisrikant Thank you for this clarification.

cb-haripriyan commented 1 year ago

Closing this issue since it was related to incomplete configuration.

Please create a new issue if you face any other issues.