Android Licensing (LVL) keeps returning Retry (code 291) after publishing app - android

I recently made an update to an existing (paid) app I have had published on Google Play for a while. While I was working on the new version, I thought I'd implement the Google Licensing Verification Library. I followed the instructions from Google at http://developer.android.com/guide/market/licensing/adding-licensing.html . Had things working pretty well at this point - when I changed the test response in the Google Play Developer Console I got a different result in my app. Great!
Then I published this new version.
I installed the signed APK (it's a paid app so I didn't want to download it from Google Play) on my phone (had been testing it on that very same device all along). Now things didn't work at all. I got the "Retry" result from the licensing service all the time. I mean for hours. I went back and fiddled with the source code, changed all kinds of things, nothing worked. The Licensing library always timed out (got a "Check timed out." in from the library in LogCat).
I searched everywhere for an answer, but it wasn't until I ran across this discussion ( http://forum.xda-developers.com/showthread.php?t=1566770 ) and read it to it's very final post that I found the solution.

From the above mentioned post:
"I have just had this issue too & deleting the Google Play Application
data (Settings, Applications, choose Google Play & press Clear Data )
fixed it for me. Clearing Cache is not sufficient. Ihe only impact I
saw of doing this (apart from my App now working again) is that you
have to re-accept Google Play T&C etc when you next use that app and
my search history had gone."
I did it, it worked, and now everything is back to working!

I had the same issue with an app downloaded from google Play Store. In my case the problem was not the storage or cache as in the other answer. I had the Google Play Store Background-Data-Usage restricted, which prevented this API from working. After enabling background data usage, everything worked just fine.

Related

Installing old uploaded APK from Google Play Console not working anymore?

I used to test migration problems via installing old APKs from google play console and then updating to the most recent internal test version.
Since at least a week this doesn't work anymore. Every share link to a specific APK just links me to the latest APK that is published. I'm talking about this share link:
So either the live production version, or as an internal tester the current internal test version.
Anyone else has this problem? I couldn't find anything about it online.
My personal fix now is to manually download the APK, install it via ADB and then update via playstore. But that's of course more annoying than just clicking a link.
I have been in contact with an agent from google for more than 1 month about this issue, first they insisted that it was not a problem, but I helped them to understand this issue with a few images. The agent who took care of me says that their technical team has been investigating this issue for a while.
It seems we have to wait until we get a proper fix. Until that, you can use this area to upload your apk and get a specific link for that:
https://play.google.com/console/u/0/internal-app-sharing
This part gave google play link for that build and still working on android devices without a problem.
Best!

Can't test inApp Transactions with Google App Signing

Inb4 its a duplicate, I know the question is, but they are all older and none seem to help with my issue. Mine seems pretty cut and dry. I have an app that I build with a set of keys and upload to my play console. I have "google signature" enabled so they sign my apps as well. I have products enabled that work when the app is downloaded from google play test track. The SAME EXACT CODE BASE, signed with the SAME EXACT SET OF KEYS I used before uploading to the Play console does not work when I build locally and push it to my device. It says "This device is not configured for transactions" or something along those lines. I'm trying to build out my purchase flows but this is really obstructing me...
Everything is set up according to other answers. Same version code, products active, test track/alpha release are both available. Hell, the purchase flow starts fine when I download the apk from the play store, just not when debugging in AS.
I don't think this is a true answer, or maybe it IS and my symptoms are a bug on googles part, however I seem to have resolved my issue. I'll confirm my answer if this continues to work throughout the day.
For anyone else having a similar issue to me, delete all storage/cache for the app on your phone, then delete the app (NOT USING THE PLAY STORE). Now, install the app from your internal test/alpha track (FROM THE PLAY STORE). Run the app, test the purchase. If it works, close the app and delete all of its storage/cache and the delete the app (NOT USING THE PLAY STORE). At this point you should be able to upload test builds to your devices using Android Studio and have inApp transactions work. Idk why or how this works but YOLO, If it continues to work ill come back and verify this answer. Hopefully this is something google can get streamlined, or maybe I'm doing something wrong and just don't know it. Feel free to answer and I can change my correct answer.

Google play console publishing diferent apk then I uploaded

Few weeks back I uploaded first version of my app to google play. Everything, including updates, worked great until now.
When I install apk directly to my phone everything works as expected I have 0 High score, google achievements works and ad is showing.
But when I dowload the SAME apk from google play(after I published it) the game shows highscore of 60 and neither achievements or ad are showing. (I am using Unity and its playerPrefs system of saving data).
I went and investigate the situation and I found out something weird to me.
In the artefact library I downloaded my apk and there are 2 types.
1) The one that I uploaded
2)One tha google somehow edited
Somehow the 2. apk diferes A LOT from what I uploaded.. Namely the uploaded state of highscore(even some other saved stuf)
It is possible that I forget to clear playerPrefs in earlier version, but NOT in this one.
How is it posible that google somehow merges my new apk with older one?
And when I am uploading new apk I dont keep the old ones, I am deactivating them so where is the problem.. It is my first published app and I dont know some of the "advanced wording".So please if you know what is happening go slow on me ;)
(Sure I missed something :/ )
Thanks for all help.
Google doesn't modify APKs uploaded to the Play Console. The fact that you observe a different behaviour of your app related to gaming suggests that maybe your integration with the game library has some issues.
Overall, given that we don't know the setup of your console and your releases, you would have more luck reaching out to the Play Console support team.

"Google Play services are updating" error on release, not emulator (Google Play Services 12.6.73, Huawei devices)

I'm facing the same issue as in Stack Overflow question "Google Play services are updating" in Google Maps API.
Unfortunately, out of nowhere, some of my users are suffering this issue, as well as my own phone. On the other hand, for other users it seems to work perfectly fine.
This issue appears only on maps in my app.
I've tried to clean Google Services's cache on my own phone - still nothing.
On my emulator it works fine.
I've searched all over the Internet and haven't managed to find a working solution for this.
The most important part is this: Most of the solutions that I've found were ones that needed to be done on a specific device, like cleaning a cache and then restarting the phone. But, when we are talking about an issue that occurs and harm a large portion of my users - there has to be a solution on which I can use in order to help them all at once, by myself, without them needing to do some actions on their own phones.
Otherwise, it would be very frustrating for them, and it would make some of them uninstall my app, and because of what? A bug that I have nothing to do with? Everything worked just perfectly fine until about two days ago, and I didn't make any changes to my app since then at all... so... why?
This bug is reported by many people in the Google issue tracker. It looks like a wide range of Huawei devices is severely impacted by the latest Play Services update to version 12.6.73. Apparently something changed on the Google side and they are currently investigating what is happening.
The issue is tracked in the following bug:
Authorization Failure in Google Maps Android API v2 (Google Play Services 12.6.73, Huawei devices)
Star the bug and follow messages from Google engineers.
UPDATE 2018-05-15
Some messages from the bug
Have just got off the phone to Google and Huawei. Huawei seem to be
admitting responsibility. They told me there is an EMUI update due in 1 to
2 weeks that should fix "all google maps issues".
Also ah...#google.com states
Google has been able to reproduce the problem on a physical device and is now focusing on addressing the root cause through either a fix or other mitigation.
It looks like Google and Huawei have to look into this issue together in order to provide a permanent solution.
UPDATE 2018-05-16
Google posted the following message in the bug
In collaboration with Huawei, Google engineers have identified the root cause of this issue as an unexpected change to the filesystem permissions. The issue can impact any Android app on a Huawei device which renders a Google map.
Our engineers are preparing a new version of Google Play Services which should resolve the problem. It will be targeted to devices running Android 7.0 Nougat, or higher. We will post another update with the status of the rollout.
Thanks for your patience.
UPDATE 2018-05-17
Finally good news from Google
We are pleased to report that a beta version of Google Play Services is ready. We believe this version mitigates the issue on Huawei devices running Android 7.0 Nougat, or higher. An important caveat is that each time the device is rebooted, you will need to wait about one minute before launching the affected applications.
Starting today at midnight (Pacific Time), the beta will be rolled-out to a segment of the community that has signed-up for the Google Play Services Public Beta Program. It will ramp to increasing segments of the beta audience over the next few days. We invite you to join the beta program at https://developers.google.com/android/guides/beta-program to obtain an early release of this and future versions of Google Play Services. Once beta testing is complete it will be rolled out in stages to all users.
UPDATE 2018-05-18
As a follow-up to our last update (comment#342), we believe this issue is fixed in Google Play Services version 12.6.85. If you are still encountering the problem, please ensure your device has this version installed.
As previously noted, there can be a delay (usually less than one minute) between the time the OS is finished booting and Google Play Services starts. If you launch one of the affected apps during this window, it may not render a map. If this happens, re-launch the app after a minute or so. Subsequent launches of the app should succeed every time.
FINAL UPDATE 2018-05-22
As of 10:00 AM (PDT) on May 21, 2018, Google Play Services version 12.6.85 was pushed to 100%, following the initial beta rollout. We believe this resolves the Google Play Services issue on all impacted Huawei devices.
Huawei is working on a longer term solution which is beneficial to its users and developers.
We apologize for this incident and the impact it may have caused. We are conducting an internal investigation of this issue and will make appropriate improvements to our systems to help prevent future recurrence. Stay tuned for an Incident Report.
AFAICT there is nothing an app developer can do to fix it. As #xomena mentions in her answer Google is working on it.
Just to add the complete solution for an end-user here:
go to Settings > Apps & Notifications > App > Google Play Services > Storage
click Clear Cache
go to Manage Space and click Clear all data
Be aware that the issue reappears if you reboot your device
Someone created a video you can refer your users to at https://youtu.be/VgMtZnyem5Y
It's is going to be fixed soon, guys:
https://issuetracker.google.com/issues/79405933
Go to Settings → App → Google Play Services, and disable it to go back to the factory version.
Restart the phone and go to Google Play Store to do the update on Google Play Services.
It works for me. I can see the Google map again in a third-party app. If it says uninstall/disable, do that.
There is nothing you can do at this time, except clear Google Play Service data (without rebooting the phone). At the next reboot, maps services get updated, and the issue will be there again.
We just can wait for Google to fix it with a mitigation update, and Huawei give users new firmware via OTA that better comply with the last Google API without what seems like an "authorization" issue.
Today Google released version 12.6.85 on the beta channel which fixes the map bug.
You can suggest your user to subscribe as a beta tester:
https://play.google.com/apps/testing/com.google.android.gms
Or direct download on APK mirror:
https://www.apkmirror.com/apk/google-inc/google-play-services/google-play-services-12-6-85-release/google-play-services-12-6-85-040408-197041431-android-apk-download/
I tried disabling to restore to the factory version - unfortunately this means most of my apps required Play Services will not run, and I can't seem to reinstall the latest version.
I am using Honor 7x.

In-app Billing - Item requested not available for purchase

I am working on learning in-app billing but I am having a problem with the google's in-app billing example, the Dungeon one.
I have already set up the application, added my public key, and changed the API_VERSION to 1 in the makeRequestBundle().
I have already exported and signed the application and uploaded it onto Google Play and saved it as a draft with a few pictures and activated the apk. I also added both the sword_001 and potion_001 as published in-app purchases!
Next I installed the signed app onto my phone but when I try to purchase either the sword or the potion I get an Item unavailable error
The item you requested is not available for purchase.
I even tried on a different device to make sure it wasn't because developer's can't purchase their own products, and I get the same message on both devices.
What have I missed?
Check your versionCode. It can't be higher than the last published/unpublished version in any of your distribution channels (prod/beta/alpha).
In app billing seems fraught with pitfalls, but this is what I found that affected availability of items for purchase and also suitability of application:
My code for what it was worth was strongly based on the Google Android demo, but I stripped out a lot of the complexity. I have a feeling that having got it to work a better result would be produced by writing it all again from scratch.
I got the static test product ids going first.
Despite what the documentation says, it seemed to me that the purchase item(s) must be published, even when using a test account. Mine didn't work when they weren't, anyway, and I waited quite a long time to see if they would start to work as others have suggested - they still didn't.
You (I anyway) can't publish a purchase item without publishing the app, so what I did was upload and publish the app, create the purchase items, publish them (big button at the bottom of the page), then unpublish the app again. This seems to leave the items published.
The app must be signed in the usual way (I did this by exporting from Eclipse) before uploading, but what isn't so obvious is that the app you load to the mobile MUST also be signed in the same way - ie a (debug signed) version loaded to the device by Eclipse - run or debug - isn't going to work.
They also both need the same version number, I think. Not 100% sure. If so that would unfortunately kind of imply that customers with old versions installed can't purchase anything without upgrading.
When the app is uploaded to Google, it can take several hours before it becomes available and you get all the right responses for the in-app billing. I find 1-2 hours typically.
I suspect the other comments on this subject about whether you use a gmail or googlemail test account might be red herrings, but for what it is worth, my test account is gmail.
I did come across a useful little note on the internet somewhere about how to change your primary account on the mobile without having to do a hard reset (and consequently losing everything), but unfortunately I haven't managed to find it again.
What I did find though is that one can have several google accounts on the mobile, and then select the one to be used by Google Play.
Hope this helps somebody. I have to say its a pretty complicated system, with not many switten down answers, and I nearly gave up on it.
If your app are on closed alpha testing, you have to sign in with your test account to Opt-in URL; https://play.google.com/apps/testing/{your.app.namespace}
My experience on this error is:
Make sure to upload the signed APK to developer console.
Make sure to install the signed APK on your device not launch the app in the debugger.
Make sure to create a test account in your developer console.
Make sure to sign in your device with your test account.
Make sure to create in app billing in your developer console and finally activate the item from the console!!! (this is the one that got me after fully following google's tutorial)
It's no longer sufficient to just upload an unpublished draft apk to test in-app billing. What you need to do is upload an apk to the alpha or beta apk section on the Developer Console. Then, you need to publish it. If you also have a draft apk in the Production APK section, be sure to delete it before you publish. Otherwise it will be available to everyone.
Publishing an alpha or beta apk makes that apk available to only those testers that you specify/allow.
Here is Google's documentation on this:
https://support.google.com/googleplay/android-developer/answer/6062777?rd=1
Well I found a solution to my problem. I wasn't able to get Google's in app purchasing example to work but I was able to get this InApp Billing Tutorial to work using the steps I mentioned in my original post.
If nothing else this may be helpful to someone to see all of the steps that need to be done to test one of the in-app billing examples.
Also had this problem for a couple of days and searched around a lot. I found this guy who said deleting the app and then reuploading fixed his problem, and that actually worked for me aswell.
Try that, delete your app from the developer console entirely. And reuppload a new signed apk and set it up all over again
Publishing the app did the trick for me(and leaving it published (!)). I had to wait a bit for Google to update their database as well, as mentioned elsewhere, changes on Google Play are not immediate.
Anecdotal Supplement: If you have an existing app in the portal already and you want to test a signed version, but not upload it into the portal for distribution. Do the normal steps to build a signed version BUT use your latest version code that is uploaded into the portal. You will will be able to do a quick and dirty test of purchasing (you can't upload this version on the Google Play portal, but it's a means to an end for a localized test (or even as a way to allow side loaded distributed versions/flavors that use Google Play for billing legitimately.)
3:)
Check if your device have more than one account then remove other accounts and keep the account you have entered in play console then it will be solved.

Categories

Resources