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

License verification not working for in-app purchases #2326

Open
videoman614 opened this issue Apr 18, 2024 · 8 comments
Open

License verification not working for in-app purchases #2326

videoman614 opened this issue Apr 18, 2024 · 8 comments
Labels

Comments

@videoman614
Copy link

Describe the bug
v0.3.1.240913 added support for license verification however it only works with apps with upfront payment such as Tasker.

Apps with in-app purchases cannot have it's license verified even if it has been purchased previously such as Quick Cursor or VTube Studio, it will only produce a "You already own this item" error.

To Reproduce
Steps to reproduce the behavior:

  1. Install app with IAP for example Quick Cursor
  2. Agree to ToS and enable permissions
  3. License isn't verified, click option to enable Pro features
  4. See error "You already own this item"
  5. Cry

Expected behavior
License should be verified.

Screenshots

Screenshot

System
Android Version: 13 and 14
Custom ROM: LineageOS for microG 20 and 21

microG
microG Core version: 0.3.1.240913
microG Self-Check results: All ticked

Additional context
Saw #2254 and decided to make a generic bug report since I can confirm it affects all paid apps that use IAP instead of upfront payment.

To get full context, was the license you want to restore

1. bought with microG Service and microG Companion,
2. bought with microG Service and Play Store, or
3. bought with original Play Services and Play Store

on

1. the same device, or
2. another device?

Quick Cursor and VTube Studio was purchased with MicroG and Play Store on a different device from the one being used now.

@CoelacanthusHex
Copy link
Contributor

I can confirm this issue. I meet it with MacroDroid. My log is in #2254 (comment)

@videoman614
Copy link
Author

Good news! I found a workaround that right now works 100% of the time but in the future will potentially not work anymore.

  1. Uninstall all SafetyNet related modules in Magisk
  2. Install PlayIntegrityFix and PlayIntegrityNEXT in Magisk
  3. Download the app you want with IAP license verification
  4. Tap the "upgrade" or "verify" option that "pays" for the IAP
  5. See error "You already own this item"
  6. Suddenly the IAP will go through and the license will verify
  7. Cry (for happiness that it works and you don't need gapps or the Play Store)

Unfortunately this workaround requires Play Integrity to pass and this unfortunately is subject to change as time goes on, hopefully we'll be able to figure out something, MicroG has come a long way and I'm certain all these issues will be fixed.

IAP.mp4

@CoelacanthusHex
Copy link
Contributor

This is referring to a feature (fetching licenses from server that were not purchased on the device itself), that is not yet implemented in microG at all.

Originally posted by @mar-v-in in #2321 (comment)

@videoman614
Copy link
Author

This is referring to a feature (fetching licenses from server that were not purchased on the device itself), that is not yet implemented in microG at all.

Having some difficulty parsing what's being said here.

VTube Studio wasn't purchased on panther (Pixel 7), installing the two Magisk modules, the error still occurs however the license does verify when it didn't before.

I'm not sure why it works, would be great if it can be looked in to though.

@pSub
Copy link

pSub commented May 3, 2024

Verifying licenses that were not purchased on my current device (FP5 with CalyxOS) do work now for me. As @videoman614, I still get an error message telling me, that I already purchases the feature when activating it. However it worked with aCalendar and Symphonium. I updated to CalxyOS 5.6.3 and updated Aurora to 4.4.4. Not sure which update fixed it.

@videoman614
Copy link
Author

More experimentation and observations.
LineageOS for MicroG 21 (Android 14) 20240416 panther (Pixel 7), Aurora Store updated to v4.4.4.

Without PlayIntegrityFix and PlayIntegrityNEXT, VTube Studio license verifies without issue but Quick Cursor's license doesn't verify.

Installing PlayIntegrityFix and PlayIntegrityNEXT Quick Cursor still doesn't verify, the error doesn't even occur so I'm assuming it's some incompatibility with Android 14 because it worked on 13.

@jmichel-h
Copy link

Hi there,
I have an issue with restoring a purchase in an app (Kanji Study) but I'm not sure if it's the same as the one described in here.
My logs for billing are similar to the ones in #2254:

05-29 21:01:45.328 25000 26688 D Billing : Result: Bundle[{DEBUG_MESSAGE=Client does not support the requesting billing API., RESPONSE_CODE=3}]
05-29 21:01:45.328 25000 26688 D Billing : isBillingSupported(apiVersion=22, packageName=com.mindtwisted.kanjistudy, type=subs)=Bundle[{DEBUG_MESSAGE=Client does not support the requesting billing API., RESPONSE_CODE=3}]
05-29 21:01:45.334 25000 26688 D Billing : Result: Bundle[{DEBUG_MESSAGE=Client does not support the requesting billing API., RESPONSE_CODE=3}]
05-29 21:01:45.334 25000 26688 D Billing : isBillingSupported(apiVersion=21, packageName=com.mindtwisted.kanjistudy, type=subs)=Bundle[{DEBUG_MESSAGE=Client does not support the requesting billing API., RESPONSE_CODE=3}]
05-29 21:01:45.340 25000 26688 D Billing : Result: Bundle[{DEBUG_MESSAGE=Client does not support the requesting billing API., RESPONSE_CODE=3}]
05-29 21:01:45.341 25000 26688 D Billing : isBillingSupported(apiVersion=20, packageName=com.mindtwisted.kanjistudy, type=subs)=Bundle[{DEBUG_MESSAGE=Client does not support the requesting billing API., RESPONSE_CODE=3}]
05-29 21:01:45.347 25000 26688 D Billing : Result: Bundle[{DEBUG_MESSAGE=Client does not support the requesting billing API., RESPONSE_CODE=3}]
05-29 21:01:45.347 25000 26688 D Billing : isBillingSupported(apiVersion=19, packageName=com.mindtwisted.kanjistudy, type=subs)=Bundle[{DEBUG_MESSAGE=Client does not support the requesting billing API., RESPONSE_CODE=3}]
05-29 21:01:45.352 25000 26688 D Billing : Result: Bundle[{DEBUG_MESSAGE=Client does not support the requesting billing API., RESPONSE_CODE=3}]
05-29 21:01:45.353 25000 26688 D Billing : isBillingSupported(apiVersion=18, packageName=com.mindtwisted.kanjistudy, type=subs)=Bundle[{DEBUG_MESSAGE=Client does not support the requesting billing API., RESPONSE_CODE=3}]
05-29 21:01:45.360 25000 26702 D Billing : isBillingSupported(apiVersion=17, packageName=com.mindtwisted.kanjistudy, type=subs)=Bundle[{DEBUG_MESSAGE=, RESPONSE_CODE=0}]
05-29 21:01:45.366 25000 26702 D Billing : Result: Bundle[{DEBUG_MESSAGE=Client does not support the requesting billing API., RESPONSE_CODE=3}]
05-29 21:01:45.366 25000 26702 D Billing : isBillingSupported(apiVersion=22, packageName=com.mindtwisted.kanjistudy, type=inapp)=Bundle[{DEBUG_MESSAGE=Client does not support the requesting billing API., RESPONSE_CODE=3}]
05-29 21:01:45.372 25000 26688 D Billing : Result: Bundle[{DEBUG_MESSAGE=Client does not support the requesting billing API., RESPONSE_CODE=3}]
05-29 21:01:45.373 25000 26688 D Billing : isBillingSupported(apiVersion=21, packageName=com.mindtwisted.kanjistudy, type=inapp)=Bundle[{DEBUG_MESSAGE=Client does not support the requesting billing API., RESPONSE_CODE=3}]
05-29 21:01:45.378 25000 26688 D Billing : Result: Bundle[{DEBUG_MESSAGE=Client does not support the requesting billing API., RESPONSE_CODE=3}]
05-29 21:01:45.379 25000 26688 D Billing : isBillingSupported(apiVersion=20, packageName=com.mindtwisted.kanjistudy, type=inapp)=Bundle[{DEBUG_MESSAGE=Client does not support the requesting billing API., RESPONSE_CODE=3}]
05-29 21:01:45.386 25000 26702 D Billing : Result: Bundle[{DEBUG_MESSAGE=Client does not support the requesting billing API., RESPONSE_CODE=3}]
05-29 21:01:45.386 25000 26702 D Billing : isBillingSupported(apiVersion=19, packageName=com.mindtwisted.kanjistudy, type=inapp)=Bundle[{DEBUG_MESSAGE=Client does not support the requesting billing API., RESPONSE_CODE=3}]
05-29 21:01:45.392 25000 26688 D Billing : Result: Bundle[{DEBUG_MESSAGE=Client does not support the requesting billing API., RESPONSE_CODE=3}]
05-29 21:01:45.392 25000 26688 D Billing : isBillingSupported(apiVersion=18, packageName=com.mindtwisted.kanjistudy, type=inapp)=Bundle[{DEBUG_MESSAGE=Client does not support the requesting billing API., RESPONSE_CODE=3}]
05-29 21:01:45.398 25000 26702 D Billing : isBillingSupported(apiVersion=17, packageName=com.mindtwisted.kanjistudy, type=inapp)=Bundle[{DEBUG_MESSAGE=, RESPONSE_CODE=0}]
05-29 21:01:45.417 25000 26702 D Billing : getPurchasesExtraParams(apiVersion=9, packageName=com.mindtwisted.kanjistudy, type=inapp, continuationToken=null, extraParams=Bundle[{playBillingLibraryVersion=6.2.0, enablePendingPurchases=true}])

Is it the same issue or should I open a new one?
Thanks for your work on microG!

@videoman614
Copy link
Author

GmsCore and Companion updated to latest v0.3.2.240913.

VTube Studio verifies automatically when installed, don't even need to "activate" the license but I did install this previously on barbet, will have a new test device soon with a fresh install of LineageOS for MicroG to test this again.

For another test I uninstalled PlayIntegrityFix and PlayIntegrityNEXT and left it alone for 6+ hours so the fingerprint doesn't refresh, uninstalled VTube Studio and after 6+ hours reinstalled and license still verified. Seems like this isn't necessary anymore.

@jmichel-h Is it the same issue or should I open a new one?

Potentially the same issue as I couldn't get Quick Cursor to verify.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants