1. Hey! Guest! The 35th GMC Jam will take place between November 28th, 12:00 UTC - December 2nd, 12:00 UTC. Why not join in! Click here to find out more!
    Dismiss Notice

Android Suddenly Android IAP's are not working

Discussion in 'GameMaker Studio 2 Community Tech Support' started by spinout, Nov 10, 2019.

  1. spinout

    spinout Member

    Joined:
    Jun 21, 2016
    Posts:
    82
    So everything on the new IAP setup has been working fine. Consumables, non-consumables, subscriptions, but suddenly, I am getting this error: "BILLING: Base64 decoding failed." when calling GPBilling_Purchase_VerifySignature() when nothing has changed in my code.

    Is anyone else seeing any errors suddenly?
     
  2. chirpy

    chirpy Member

    Joined:
    Oct 6, 2016
    Posts:
    163
    Have you recently removed google play public key from your project? I once encountered a similar error because I removed the public key thinking it was for google play licensing only, but it’s not. The public key is required for Billing to work.
     
  3. spinout

    spinout Member

    Joined:
    Jun 21, 2016
    Posts:
    82
    Confirmed it's still in there. It's also happening on other apps. I'll keep investigating and post if I find the cause.
     
  4. Nocturne

    Nocturne Friendly Tyrant Forum Staff Admin

    Joined:
    Apr 13, 2016
    Posts:
    6,984
    It may be that something has changed with how google are sending the receipt data or the verification infrastructure.... If you keep getting this then please contact YoYo Games and include a link to the output log and the project if you can.
     
  5. spinout

    spinout Member

    Joined:
    Jun 21, 2016
    Posts:
    82
    Thanks Noc. I did some more digging and here is what I have found....
    When it tries to grab my public key with:
    public static String getBase64EncodedPublicKey() {
    return RunnerActivity.BASE64_PUBLIC_KEY;
    }
    It returns: "${YYAndroidGoogleLicensingPublicKey}" I'm not sure if this is the correct data to be returning, but I am guessing the actual key is supposed to be returned?
    But if I put my actual public key as a return instead of that, everything works fine.
     
    Nocturne likes this.
  6. Nocturne

    Nocturne Friendly Tyrant Forum Staff Admin

    Joined:
    Apr 13, 2016
    Posts:
    6,984
    Okay... that sounds weird... Please file a bug and include this information and link to this topic. That's definitely not what should be returned.
     
  7. spinout

    spinout Member

    Joined:
    Jun 21, 2016
    Posts:
    82
    Done!
     
  8. spinout

    spinout Member

    Joined:
    Jun 21, 2016
    Posts:
    82
    Ok, looks like the issue was caused by an extension I am using. Will look into that, thanks!
     
    Nocturne likes this.
  9. Mert

    Mert Member

    Joined:
    Jul 20, 2016
    Posts:
    416
    One quick fix I can suggest is to go to the IAP extension's source. You should see some java files, search this getBase64EncodedPublicKey. Once you find the functions responsible for this, change this part (return RunnerActivity.BASE64_PUBLIC_KEY;) to (return "YOURBASE64PUBLICKEY_THAT_YOU_GET_FROM_GOOGLE_PLAY";)

    See if that works
     
  10. spinout

    spinout Member

    Joined:
    Jun 21, 2016
    Posts:
    82
    That exactly what I had to do, thanks!
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice