j3k0 / cordova-plugin-purchase

In-App Purchase for Cordova on iOS, Android and Windows
https://purchase.cordova.fovea.cc
1.29k stars 529 forks source link

[ANDROID] [store.js] INFO: plugin -> buy error 6777010 #788

Closed manelclos closed 4 years ago

manelclos commented 5 years ago

System Info

OSX Mojave 10.14.02
Cordova 8.0.0
Device: Android 9
Plugin Version: 7.2.6

Expected behavior

Observed behavior

store.verbosity = store.DEBUG

InAppBilling[js]: buy called!
(Successfully purchased -> OK -> control returned to APP)
[store.js] INFO: plugin -> buy error 6777010
[store.js] DEBUG: store.queries !! '134_xxx.yyy_134 valid'
[store.js] DEBUG: store.queries !! 'quota mensual valid'
[store.js] DEBUG: store.queries !! 'consumable valid'
[store.js] DEBUG: store.queries !! 'valid valid'
[store.js] DEBUG: store.queries !! 'valid'
[store.js] DEBUG: store.queries !! '134_xxx.yyy_134 updated'
[store.js] DEBUG: store.queries !! 'quota mensual updated'
[store.js] DEBUG: store.queries !! 'consumable updated'
[store.js] DEBUG: store.queries !! 'valid updated'
[store.js] DEBUG: store.queries !! 'updated'

And some more info yet from the store.error handler:

ERROR 6777010: Purchase failed: Error purchasing: IabResult: IAB returned null purchaseData or dataSignature (response: 6777010:Error)
manelclos commented 5 years ago

Current workaround is to use store.error(), filter the error code and do a location.reload() to force "app restart". Not perfect, but works in the meantime.

droppy2014 commented 5 years ago

I have the same problem on ionic 3

beisnikosspi commented 5 years ago

Me too...

AthiraWD commented 5 years ago

@j3k0 Im also facing the same issue

manelclos commented 5 years ago

Hi all, this happened to me with version 7.2.6 of the plugin. Can you please say which version are you using/testing? There's been quite a few releases and it would save me some testing time :)

devHamza commented 5 years ago

Facing same issue ! on both version : 7.2.6 and 7.4.3 Any help on this please ?

cordova 8.1.2
ionic 3 cordova-ios 5.0.0

ErxrilOwl commented 5 years ago

+1 Any update?

j3k0 commented 5 years ago

It doesn't happen here. Android is my main dev platform, so I should have noticed. Did you try different version of Android, maybe this happens only on certain devices? Can we get a list of failing devices here (just in case this were we should be looking at)?

nprather commented 5 years ago

I'm getting a similar error. I think this may relate to Android 9. I've had several users complain that they couldn't purchase and all where running Android 9.0. I'm just using simple non-consumable purchases...

manelclos commented 5 years ago

+1 Running Android 9.0 too on testing device!

j3k0 commented 5 years ago

Ok. I don't have a Android 9 device here... Anyone could dig out more data for debugging? logcat trace maybe.

nprather commented 5 years ago

I ordered a new Pixel that's supposed to arrive tomorrow or the next day... Until then I'm doing a less accurate test on my end using Genymotion and gapps: https://www.genymotion.com/blog/2-10-open-gapps-widget/

Aviho-M commented 5 years ago

+1 Any update? please?

j3k0 commented 4 years ago

@nprather So how is the Pixel? ;-) Did you make the plugin work with it?

nprather commented 4 years ago

Not yet, I ended up doing an emergency switch to this plugin from Alex and it worked with Android 9, BUT, it introduced some other bugs that I've been putting out, and it would randomly bomb out on iOS so I've since switched iOS back to your plugin version 7.2.8.

Tomorrow, I'm going to install the latest version of your plugin version 8 and test using the method you documented here so that I can get logcat output to isolate the problem, if it's still there... adb logcat "chromium:I *:E" I'll write back here to let you know how it goes.

On a side note, thanks for all your hard work on this plugin! If I find the bug I will try to get it fixed locally and I guess do a pull request for your review? I've never contributed to github so not sure how it all works. Anyway, I'll keep you posted. Nathan

j3k0 commented 4 years ago

On a side note, thanks for all your hard work on this plugin! If I find the bug I will try to get it fixed locally and I guess do a pull request for your review? I've never contributed to github so not sure how it all works. Anyway, I'll keep you posted.

Welcome, crossing fingers that no fix will be required. Testing is also contributing, so thank you! 😄

nprather commented 4 years ago

I just tested on Android 8 and 9 on real devices and everything worked great! Wish I would have saved myself some work and tested this in Android Studio to try to isolate the bug with logcat before switching all my code to the other plugin but live and learn!

I used a Mac, with the very latest version of Cordova Android (android 8.1.0-dev) for testing : cordova platform add https://github.com/apache/cordova-android.git . Had to use that b/c was getting some errors in Android Studio that the latest version fixed.

I tested the latest pinned version of the Purchase Plugin: cordova-plugin-purchase 8.1.0 "Purchase"

Also works great with Cordova iOS v5.0.1

Thanks for your help! Nathan

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

rcauquil commented 4 years ago

I'm facing the same issue on a P30pro under Android 10 then when I kill the app, relaunch I get the approved event with the transaction payload

rcauquil commented 4 years ago

for anyone facing the same issue, I fixed it by upgrading the module version from 8.x to 10.x

joefaron commented 2 years ago

I'm on 11x, had to register all of my google play in-app products, then try to order them.. finally worked.. didn't work when just registering 1 and trying to test it? was getting "buy error".