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] Authentication required: plugin -> buy error 6777006 #322

Closed mcherubin closed 5 years ago

mcherubin commented 8 years ago

I've this initialization store called after device ready event:

function initializeStore() {

    if (!window.store) {
        console.log('Store not available');
        return;
    }

    store.verbosity = store.DEBUG;

    store.register({
        id:    "12tentativi",
        alias: "12tentativi",
        type:  store.CONSUMABLE
    });

    store.when("12tentativi").approved(function(order) {
        console.log('approved');

        order.finish();
    });

    store.error(function(error) {
        console.log('ERROR ' + error.code + ': ' + error.message);
    }); 

    store.ready(function() {
        console.log("\\o/ STORE READY \\o/");
    });

    store.refresh();
}

console give me

10-20 21:58:46.475:[store.js] DEBUG: store.queries !! '12tentativi registered':460
10-20 21:58:46.480:[store.js] DEBUG: store.queries !! 'consumable registered':460
10-20 21:58:46.480:[store.js] DEBUG: store.queries !! 'registered':460
10-20 21:58:46.485:[store.js] DEBUG: store.queries !! '12tentativi updated':460
10-20 21:58:46.485:[store.js] DEBUG: store.queries !! 'consumable updated':460
10-20 21:58:46.485:[store.js] DEBUG: store.queries !! 'updated':460
10-20 21:58:46.490:[store.js] DEBUG: queries ++ '12tentativi approved':460
10-20 21:58:46.495:[store.js] DEBUG: store.trigger -> triggering action refreshed:460
10-20 21:58:46.500:[store.js] DEBUG: queries !! 'refreshed':460
10-20 21:58:46.500:InAppBilling[js]: setup ok:735
10-20 21:58:46.505:InAppBilling[js]: load ["12tentativi"]:735
10-20 21:58:46.535:OK:860
10-20 21:58:47.365:[store.js] DEBUG: plugin -> ready:460
10-20 21:58:47.365:InAppBilling[js]: getAvailableProducts called!:735
10-20 21:58:47.365:[store.js] DEBUG: plugin -> loaded - []:460
10-20 21:58:47.365:[store.js] DEBUG: store.queries !! '12tentativi invalid':460
10-20 21:58:47.370:[store.js] DEBUG: store.queries !! 'consumable invalid':460
10-20 21:58:47.370:[store.js] DEBUG: store.queries !! 'invalid invalid':460
10-20 21:58:47.370:[store.js] DEBUG: store.queries !! 'invalid':460
10-20 21:58:47.370:[store.js] DEBUG: store.queries !! '12tentativi updated':460
10-20 21:58:47.370:[store.js] DEBUG: store.queries !! 'consumable updated':460
10-20 21:58:47.370:[store.js] DEBUG: store.queries !! 'invalid updated':460
10-20 21:58:47.370:[store.js] DEBUG: store.queries !! 'updated':460
10-20 21:58:47.370:[store.js] DEBUG: store.queries !! '12tentativi loaded':460
10-20 21:58:47.370:[store.js] DEBUG: store.queries !! 'consumable loaded':460
10-20 21:58:47.370:[store.js] DEBUG: store.queries !! 'invalid loaded':460
10-20 21:58:47.370:[store.js] DEBUG: store.queries !! 'loaded':460
10-20 21:58:47.370:[store.js] DEBUG: store.queries !! '12tentativi updated':460
10-20 21:58:47.370:[store.js] DEBUG: store.queries !! 'consumable updated':460
10-20 21:58:47.375:[store.js] DEBUG: store.queries !! 'invalid updated':460
10-20 21:58:47.375:[store.js] DEBUG: store.queries !! 'updated':460
10-20 21:58:47.375:InAppBilling[js]: getPurchases called!:735
10-20 21:58:47.375:\o/ STORE READY \o/:319

in the app I call

store.order('12tentativi');

and the app give me a dialog "Authentication required..." and in the console log: "buy error 6777006"

the plugin was installed with the BILLING_KEY from Play Developer Console

I follow the step:

  1. create signed APK
  2. Upload It in beta on Play developer console
  3. Create '12tentativi' product
  4. Wait over 10 hours
  5. install apk on my device with 'adb install xxxxx.apk'

PS: the same procedure in iOS works.

Could you help me? thanks

itconsulting-live commented 8 years ago

Same problem here.

itconsulting-live commented 8 years ago

mcherubin, were you able to resolve this?

mcherubin commented 8 years ago

I solve uploading a signed APK in the 'Alpha' area, and configuring the 'closing alpha test' with an account different from the developer account. After you'll have to wait some hour (in my case 1,5h but is different I suppose)

osro commented 8 years ago

Same problem here. I'm getting the error even with different account from the developer and signed APK.

gen4sp commented 8 years ago

have the same. APK in alpha and beta already, and nothing (

wirelessdreamer commented 8 years ago

I'm receiving the same error. I've tried in closed alpha, and open beta environments.

JefferE commented 7 years ago

Is there a real solution to this issue yet? (I see it was labeled backlog May 26th).

I've got the same problem now. The app says its available (previously it said it wasn't ready yet) so can't imagine just waiting longer is the problem.

denssle commented 7 years ago

Same problem here.

kaynz commented 7 years ago

+1

faytekin commented 7 years ago

+1

tpanhorst commented 7 years ago

Any updates here?

kaynz commented 7 years ago

@j3k0 ?

elektray commented 7 years ago

+1

kaynz commented 7 years ago

Check that your local testing build number is equal to the one uploaded to the alpha/beta/release channel in the app store. Otherwise you'll get the error mentioned in this issue.

Solves the issue for me.

elektray commented 7 years ago

@kaynz That solved it. Thank you so much.

ilya-git commented 7 years ago

I found one more reason to this issue: if you change the package name you get it (i.e. name of your local package is different from the one that is published). Very misleading errors...

stale[bot] commented 6 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.

ErxrilOwl commented 5 years ago

It's 2019 now. Any update for this issue???

Dexus commented 5 years ago

It's 2019 now. Any update for this issue???

What is your problem? Did you upload a first app to enable the in app purchase functions?

abesiemsen commented 5 years ago

FYI, I had an error that presented very similarly (subscription error 6777006)... turns out I hadn't activated my products on play.google.com. (Sheepish grin.) Just putting this note here so others in the same boat might waste less time than I did!