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

[Android] [3.0.0-rc.10] requestSubscription() error DF-DFERH-01 #530

Closed
m-ochyra opened this issue Jun 17, 2019 · 23 comments · Fixed by #537
Closed

[Android] [3.0.0-rc.10] requestSubscription() error DF-DFERH-01 #530

m-ochyra opened this issue Jun 17, 2019 · 23 comments · Fixed by #537
Labels
🤖 android Related to android 🙏 help wanted Extra attention is needed

Comments

@m-ochyra
Copy link
Contributor

m-ochyra commented Jun 17, 2019

Version of react-native-iap

3.0.0-rc.10

Version of react-native

0.59.9

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

Android

Expected behavior

Buy subscription

Actual behavior

Play Store error: DF-DFERH-01

Tested environment (Emulator? Real Device?)

Nexus 5X Android 8.1.0
Emulator x86 Android 9

Steps to reproduce the behavior

  • update react-native-iap from version 2.5.5 to 3.0.0-rc.10
  • change RNIap.buySubscription(productId) (works fine on version 2.5.5) to RNIap.requestSubscription(productId)
@sameer-kumar-jain
Copy link

I was having similar issue. Doc says you should call "requestSubscription" which was failing for me so just give requestPurchase a try with subscription SKU and it worked like a treat. Hope this help. Thanks

@hyochan
Copy link
Owner

hyochan commented Jun 17, 2019

@SameerJain This isn’t a good idea since billingFlow will distinguish the sub or inapp.

DF-DFERH-01 error is matter of cache in android device. Please figure this out by solution and try again.

@hyochan hyochan added 🤖 android Related to android 🙏 help wanted Extra attention is needed labels Jun 17, 2019
@sameer-kumar-jain
Copy link

@hyochan Well, In that case I think there is a bug in the library itself. I tried all the solutions. I am working on this from last 3 days, well almost. At the end this is the only thing worked. I am really not sure how it works internally but if I look at the logcat it seems the flow is correct and I get correct json. Google billing also show this is a subscription with all correct info like billing period, trial period with localized price and warning that it will be recurring. As soon I use requestSubscription it show me that error again. I am attaching images for both api method

requestSubscription
image

requestPurchase
image

Hope this help in.
Thanks

@hyochan
Copy link
Owner

hyochan commented Jun 17, 2019

I'm concerned that this may happen due to the migration of billing library in android from 1.x ==> 2.0.1.

@hyochan
Copy link
Owner

hyochan commented Jun 17, 2019

Another question, have you guys fetched product by getSubscriptions(skus) instead getProducts?

@hyochan
Copy link
Owner

hyochan commented Jun 17, 2019

#526 has a similar issue and @rborn has resolved this. @rborn I hope you can share your experience in this thread too.

@rborn
Copy link
Contributor

rborn commented Jun 17, 2019

@hyochan @SameerJain I didn't solve the DF-DFERH-01 error sadly 😔

I just solved the getSubscriptions part...

@rborn
Copy link
Contributor

rborn commented Jun 17, 2019

@hyochan I think @SameerJain is right, it works with requestPurchase and yes I used getSubscriptions(skus)

@hyochan
Copy link
Owner

hyochan commented Jun 17, 2019

Ok. Let me go over this issue on the weekend.

@sameer-kumar-jain
Copy link

sameer-kumar-jain commented Jun 17, 2019 via email

@rborn
Copy link
Contributor

rborn commented Jun 17, 2019

@hyochan just one more thing - for me await RNIap.getAvailablePurchases(); doesn't seem to return anything anymore, it just stays there. I was using it to validate the receipt.
I think I can workaround using getPurchaseHistory but it's missing some data from the receipt.

@alexbazilev
Copy link

Confirm the problem with 3.0.0.rc-10 on real device.

const itemSkus = [
          'android.test.purchased',
          'android.test.canceled',
          'android.test.item_unavailable'
        ]
await RNIap.getProducts(itemSkus)
RNIap.requestPurchase('android.test.purchased')

Works perfect (except getAvailablePurchases freeze).

While

const itemSubs = [
          'android.test.purchased',
          'android.test.canceled',
          'android.test.item_unavailable'
        ]
await RNIap.getSubscriptions(itemSubs)
RNIap.requestSubscription('android.test.purchased')

returns Error DF-DFERH-01. However, getSubscriptions returns an array of correct subscriptions (including static test subscriptions and subscriptions really existing in Play Console). But none of them work when calling requestSubscription.

RNIap.getAvailablePurchases() doesn't return anything at all (not even empty array, just freezes) in both cases.

@hyochan
Copy link
Owner

hyochan commented Jun 18, 2019

@hyochan just one more thing - for me await RNIap.getAvailablePurchases(); doesn't seem to return anything anymore, it just stays there. I was using it to validate the receipt.
I think I can workaround using getPurchaseHistory but it's missing some data from the receipt.

Sorry for this. This is resolved in 3.0.0-rc.12.

Let's focus on Error DF-DFERH-01 for now and I can't generate this in my env.

@hyochan
Copy link
Owner

hyochan commented Jun 18, 2019

Please try 3.0.0-rc.13. I think this will fix the issue. Feel free to reopen when it doesn't.

@rborn
Copy link
Contributor

rborn commented Jun 18, 2019

@hyochan I will test in ~1h and report back ❤️

@rborn
Copy link
Contributor

rborn commented Jun 18, 2019

@hyochan did you upgrade to android X ? I have this now (just installed rc14)

Task :app:processDebugManifest FAILED
/Work/clients/current/emjoy/app/emjoy/android/app/src/debug/AndroidManifest.xml:22:18-91 Error:
	Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91
	is also present at [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory).
	Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:7:5-138 to override.


@rborn
Copy link
Contributor

rborn commented Jun 18, 2019

Ok, updated to RNIap to rc 14, updated RN to 0.59.9, some other module and managed to get over the androidX issue.

However there are 2 problems, is not compiling (I'll make a PR for that ) and then the DF-DFERH-01 is still there 😔

How can I get more logs for you? (I don't see anything in logcat)

@rborn
Copy link
Contributor

rborn commented Jun 18, 2019

PR: #535

@alexbazilev
Copy link

alexbazilev commented Jun 18, 2019

@hyochan I can confirm that DF-DFERH-01 still exists in 3.0.0-rc.14 (with #535 update).

As I mentioned above - requestPurchase works correctly (after calling getProducts of course), but requestSubscription shows DF-DFERH-01 error (after calling getSubscriptions)

hyochan added a commit that referenced this issue Jun 19, 2019
hyochan added a commit that referenced this issue Jun 19, 2019
@hyochan
Copy link
Owner

hyochan commented Jun 19, 2019

Sorry guys 😥I was rushing late at night so I couldn't be better. I've just released 3.0.0-rc.16 and I think this must fix DF-DFERH-01.

@hyochan
Copy link
Owner

hyochan commented Jun 19, 2019

Please confirm this since I'm planning to release 3.0.0 this week.

@rborn
Copy link
Contributor

rborn commented Jun 19, 2019

@hyochan no need to be sorry, you are doing a great job ❤️
I ran a very quick test (is too early for me 😅) and it seems that requestSubscription works this time.
Let me please run a more extensive test and I'll report during the day
Thanks a lot 🤗

@hyochan hyochan mentioned this issue Jun 19, 2019
@alexbazilev
Copy link

Great job @hyochan
I finally got subscriptions ready to test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖 android Related to android 🙏 help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants