chargebee / chargebee-react-native

MIT License
8 stars 15 forks source link

Chargebee.retrieveProductIdentifiers crash even within try-catch block #174

Closed charity-detalytics closed 6 months ago

charity-detalytics commented 7 months ago

Chargebee.retrieveProducts with specific identifiers work perfectly, but Chargebee.retrieveProductIdentifiers crashes even in try-catch block with message "Signal 6 was raised".

 const test = async () => {
    try {
      console.log('>>>>>test>>>> configure')
      await Chargebee.configure({
        site: 'secret',
        publishableApiKey: 'secret',
        androidSdkKey: 'secret',
        iOsSdkKey: 'secret',
      })
      console.log('>>>>>test>>>> configure done')
      console.log('>>>>>test>>>> start')
      const results = await Chargebee.retrieveProductIdentifiers({
        limit: 10,
      })
      // const results = await Chargebee.retrieveProducts(['specific_product_id']) // working
      console.log('>>>>>test>>>> end', results)
    } catch (err) {
      console.log('>>>test err', err)
    }
  }

IMG_81549959FE9F-1

Environment: iPhone Xs iOS 16.6 React Native 0.72.7

cb-haripriyan commented 6 months ago

@charity-detalytics Thanks for raising. We will look into this and update you. cc: @cb-pravinrajmohan

cb-pravinrajmohan commented 6 months ago

Hello @charity-detalytics, we've examined the issue you reported using the provided code, replicating the exact React and iOS environment. The try-catch block appears to be functioning correctly, and no crashes were observed. Could you kindly provide additional context to help us recreate the issue if it persists? If the issue doesn't persist anymore, we can mark this matter as closed.

charity-detalytics commented 6 months ago

Please give some time, I will create a production repo!

charity-detalytics commented 6 months ago

Just upgraded to latest version and it works now.

cb-pravinrajmohan commented 6 months ago

Thanks for updating, we are glad to hear that the latest version resolved the issue for you. Closing this issue now. If you have any more questions or run into issues, don't hesitate to reopen or create a new one. Happy coding!