adaptyteam / AdaptySDK-React-Native

React Native SDK for growing in-app subscriptions
https://docs.adapty.io/docs/quickstart
MIT License
128 stars 12 forks source link

Getting Unknown Adapty Error on iOS in v1.4.0 #36

Closed amberv0 closed 1 year ago

amberv0 commented 1 year ago

Hello! After updating the SDK I started getting that "Unknown Adapty Error" where I used to have something that was much more useful (e.g. when trying to restore a purchase when there is nothing).

I see that the error type has been changed, but I didn't see any breaking changes, so I assume it's a bug.

Only talking about iOS here.

divanc commented 1 year ago

Hey!

First of all, I really suggest you to update to v1.4.1, it is a minor release and it fixes android build problems

Let me dive into this problem for a while...

divanc commented 1 year ago

'Unknown Adapty Error' is a localized description. Can you please confirm that adaptyCode is also 'unknown' and code is 0? @amberv0

amberv0 commented 1 year ago

Yes I'm sure it is, because I had some logic based on that adaptyCode.

By the way, after the change of error object type, I no longer see other fields in Sentry... :( Not sure if it's possible to do something about this

amberv0 commented 1 year ago

Just checked in our production app that not proceeding with subscription (when Apple asks for TouchID to pay in the native sheet) also results in the unknown error instead of returning the correct "cancelled" status

divanc commented 1 year ago

Hey, @amberv0! Sorry for such a long wait! I've figured out what you've meant when I was making v2 and in v2 it is totally fixed! Please check out this part of migration guide and what's new to see how it looks in v2!