Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RNIap.buySubscription error : E_DEVELOPER_ERROR #328

Closed
lc3t35 opened this issue Nov 27, 2018 · 16 comments
Closed

RNIap.buySubscription error : E_DEVELOPER_ERROR #328

lc3t35 opened this issue Nov 27, 2018 · 16 comments
Assignees
Labels
📱 iOS Related to iOS

Comments

@lc3t35
Copy link

lc3t35 commented Nov 27, 2018

Version of react-native-iap

2.3.17

Platforms you faced the error (IOS or Android or both?)

iOS 11.3.1

Expected behavior

Purchase is done without error

Actual behavior

This cryptic error is thrown :

InAppPurchase RNIap.buySubscription error : {"framesToPop":1,"code":"E_DEVELOPER_ERROR","nativeStackIOS":["0 shares 0x0000000104454944 RCTFBQuickPerformanceLoggerConfigureHooks + 705616","1 shares 0x00000001043fbbbc RCTFBQuickPerformanceLoggerConfigureHooks + 341704","2 shares 0x0000000104b15bac GMSx_AbslInternalSpinLockWake + 1429196","3 CoreFoundation 0x00000001854a2580 <redacted> + 144","4 CoreFoundation 0x0000000185381748 <redacted> + 284","5 CoreFoundation 0x000000018538656c <redacted> + 60","6 shares 0x00000001043fc4dc RCTFBQuickPerformanceLoggerConfigureHooks + 344040","7 shares 0x0000000104497888 __cxa_throw + 115096","8 shares 0x00000001044036f8 RCTFBQuickPerformanceLoggerConfigureHooks + 373252","9 shares 0x0000000104403458 RCTFBQuickPerformanceLoggerConfigureHooks + 372580","10 libdispatch.dylib 0x0000000184d8cb24 <redacted> + 24","11 libdispatch.dylib 0x0000000184d8cae4 <redacted> + 16","12 libdispatch.dylib 0x0000000184d96a38 <redacted> + 608","13 libdispatch.dylib 0x0000000184d97380 <redacted> + 336","14 libdispatch.dylib 0x0000000184d97d4c <redacted> + 340","15 libdispatch.dylib 0x0000000184da011c <redacted> + 668","16 libsystem_pthread.dylib 0x00000001850bfe70 _pthread_wqthread + 860","17 libsystem_pthread.dylib 0x00000001850bfb08 start_wqthread + 4"],"userInfo":null,"domain":"RCTErrorDomain","line":18,"column":1599,"sourceURL":"https://xxxxx.cloudfront.net/%40shares%2Fshares-app-beta%2F0.30.10%2Faab72b695e0b5c88f435d0da53e31b92-30.0.0-ios.js"}

Tested environment (Emulator? Real Device?)

Real device iPhone 7 Plus

Steps to reproduce the behavior

no idea, it looks like #201 or #287 ?

@hyochan hyochan added the 📱 iOS Related to iOS label Nov 28, 2018
@JJMoon
Copy link
Contributor

JJMoon commented Dec 4, 2018

@lc3t35 This issue looks similar to #201, #287 as you point out.
Would you share your code ?

@lc3t35
Copy link
Author

lc3t35 commented Dec 4, 2018

Sure, here is the code

try {
          const inapp = SubscriptionParams[offer].inapp.trim();
          console.log('DEBUG InAppPurchase ', inapp);
          RNIap.getSubscriptions(itemSkus)
            .then(subscriptions => {
              // https://github.com/dooboolab/react-native-iap/issues/201
              // call getSubscriptions before buySubscription
              console.log('DEBUG InAppPurchase getSubscriptions ', subscriptions);
              RNIap.buySubscription(inapp) /// CRASHES HERE
                .then(purchase => {
                  console.log(
                    'DEBUG InAppPurchase purchase transactionId  : ',
                    purchase && purchase.transactionId,
                  );
                  console.log('DEBUG InAppPurchase purchase', purchaseObject);
                })
                .catch(err => {
                  console.log('InAppPurchase RNIap.buySubscription error : ', JSON.stringify(err));
                  if (err.code === 'E_USER_CANCELLED') {
                    this.handleError(err && err.userinfo && err.userinfo.NSLocalizedDescription);
                  } else {
                    this.handleError(err && JSON.stringify(_.pick(err, 'code', 'userInfo')));
                    this.props.navigation.navigate('Assistance', {
                      error: _.pick(err, 'code', 'userInfo'),
                    });
                  }
                });
            })
            .catch(err => {
              console.log(
                'InAppPurchase handleValidateAccount RNIap.getSubscriptions error : ',
                err,
              );
            });
        } catch (err) {
          console.log('InAppPurchase RNIap.buySubscription try catch error : ', err);
        } finally {
          console.log('InAppPurchase RNIap.buySubscription finished');
        }
      });

@yasirsalim22
Copy link

I am facing the same issue. Money gets deducted from the user apple store account and still, an exception is thrown. @dooboolab

@hyochan
Copy link
Member

hyochan commented Dec 4, 2018

cc @JJMoon

@lc3t35
Copy link
Author

lc3t35 commented Dec 5, 2018

@JJMoon Please, how can we debug this in order to urgently fix the issue (my app is on the store but users are unable to proceed with payment :=( ). I'm not very familiar with iOS code but I can instrument/debug the library with your guidance to get more information.

@JJMoon
Copy link
Contributor

JJMoon commented Dec 7, 2018

@lc3t35 Is this happen all the time ? 100% ?

@lc3t35
Copy link
Author

lc3t35 commented Dec 7, 2018

yes, 100% no user was able to subscribe yet (and this error does not appear in sandbox mode for us and Apple validation testers).
Would you be available this weekend for a pair remote session ?

@lc3t35
Copy link
Author

lc3t35 commented Dec 8, 2018

@JJMoon as it is only in production mode, I need your help to issue a ticket at apple and best describe what's happening in iap code exactly, are you available today ?

@JJMoon
Copy link
Contributor

JJMoon commented Dec 8, 2018

@lc3t35 Have you got the approval on IAP products? The review of Apple ?

@lc3t35
Copy link
Author

lc3t35 commented Dec 8, 2018

@JJMoon yes, products are approved and app was successfully reviewed and pass the tests from Apple's review,and it works fine in sandbox mode.
I didn't pay enough attention to #307 , first users seems to be in that case : first purchase, card not registered), I will ask them to purchase another app to see if we are in the same case.

@lc3t35
Copy link
Author

lc3t35 commented Dec 8, 2018

@JJMoon last test we've done shows that after the user has his card activated (with the 1$ debit check), then the user can subscribe successfully.

@JJMoon
Copy link
Contributor

JJMoon commented Dec 9, 2018

@lc3t35 Sorry for late reply. Can I say that this issue is resolved ?

@lc3t35
Copy link
Author

lc3t35 commented Dec 9, 2018

The package must handle this case of error, if you prefer to continue this in #307 you can close this issue.

@hyochan
Copy link
Member

hyochan commented Dec 15, 2018

@lc3t35 Could you test our recent module which is 2.3.23 and comeback?

@JJMoon
Copy link
Contributor

JJMoon commented Dec 15, 2018

@lc3t35 I guess this issue is better to be open currently.

@lc3t35
Copy link
Author

lc3t35 commented Dec 21, 2018

After update to 2.3.23, it seems to be fixed. Thanks.

@lc3t35 lc3t35 closed this as completed Dec 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📱 iOS Related to iOS
Projects
None yet
Development

No branches or pull requests

4 participants