Android OBB file fails to download from Play Store

So we packaged for Android: All on a Mac, and uploaded the APK for our game with the expansion file OBB. The APK was around 25mb, and the expansion file around 150mb. When anyone tries to download the OBB and the APK from the google play store over wifi it says, “No OBB found and no store key to try to download. Please set up one in the Android Project settings”. The Keys are set up correctly, and it’s all been tested so I can’t figure out the problem. How do I get the Google play store to download the OBB file?

Thanks,

Danny

Hello dannykana,

I just have some quick questions so I can get some information and help you out.

  • Is this a full source project or a blueprint only project?
  • Did you enable Google Play support?
  • In your project’s ObbDownloaderService.java,located in Build/Android/src/com/// is BASE64_PUBLIC_KEY set equal to your GooglePlayLicenseKey which you have indicated is set in the AndroidRuntimeSettings in Engine.ini?

If this is a full source project

  • Did you add OnlineSubsystemGooglePlay to the DynamicallyLoadedModuleNames in YourProject.Build.cs ?

Hi Jeremiah!

A. It was a blueprint only project.

B. We did not enable google play support.

C. in build/android/src/com/// i do see the obbdownloaderservice.java. In it I see there is a MODIFY FOR YOUR APPLICATION text in the java file. I do not believe the base64_public_key is set? there is just Base64_Public_Key = " ", //

I do not see any reference to the ObbDownloaderService.java or the GooglePlayLicenseKey in the Engine.ini

Thanks Jeremiah,

  • Danny

I had your same problem. As you described, UE4 on packaging re-writes the file “OBBDownloaderService.java”.

my workaround was continuosly overwriting the file with the modified one(the modified file had my playstore key in it so it would download the OBB).You should be able to do that manually with continously copying and pasting while packaging.

You can also write a simple application that does that for you every second. I Had made one but i’ve lost source and executable,i’ll let you know if i find it again .

Hey dannykana,

I’m going to look into this since I haven’t actually tried this with a Blueprint Only project.

For clarification, I am assuming that you are using the alpha or beta testing that is built into Google Play to try to install from the store using a tester account. Are you are saying that you are unable to install your app from the Play store at all?

This was not for an alpha or beta but for an actual production release we had on the store. Apparently the APK an expansion were on the store but our friends couldn’t download the OBB. Yes blueprint only.

This seems like it could be a problem with your store set up. Has anybody been able to install from the store directly?

The Play Store should handle downloading and installing the apk and obb when you click install on the store page and the obb verification should succeed and no download should be necessary.

The reason the obb downloader would need to re-download the obb would be if somebody deleted just the obb off of the device manually.

However, perhaps the verification would still fail if the license key is not getting set properly in OBBDownloaderService.

I am currently in the process of packaging a Blueprint-Only project to test and see what I can come up with.

My Blueprint project package caused a new OBBDownloaderService.java to be created in MyBPProject/Build/Android/src/com/Company/ProjectName/ and that file does have the license key set correctly in it.

I made a point to disable Google Play Support and this still worked.

You are sure that you have set both your Games App ID and Google Play License Key in your Android/GooglePlayServices Settings?

And you are sure that things are set up in the store correctly?

Hey, dannykana

I have still been unable to reproduce your issue. You say your app is live on the store now. Can you let me know what it is and I can get it from the store locally to see if it works for me?

Thanks.

Hey Jeremiah,
direct link
shoot the bullet

Hey dannykana,

This has to be something with your store set up. Make sure that you uploaded your main.obb correctly with you apk. When I downloaded the game from the store it only was about 23-24 MB. Given the numbers from your original post it should have been something like 175 MB.

Your game is failing to verify the obb because it does not download it on install, and the downloader must fail because the obb isn’t actually on the store where it is supposed to be.

Hi Jeremiah,

but we believe we had the keys set up correctly, and uploaded the OBB with the APK file as an expansion successfully. Is there any other step along the way we have to do to get it to work? I should probably let you know we did NOT set up google play services, and also, when we generated a SHAH key, it was the same key as the other two games we created. Do i need a seperate SHAH key for each game generated in the terminal? (we’re on a mac). And if i have the old SHAH key linked to all games does that mean we need to delete and re-publish our apps completely to get them to work?

So the overall steps to get the OBB to work are,

1.) Package with keys setup correctly with OBB enabled
2.) upload APK with expansion file to google play and publish

is this correct or is there an additional step or a line of code we need to add in the engine ini?

Thanks,

Danny

When you say SHAH key, do you mean your Google Play distribution keystore?

I don’t think that should matter. If Google had a problem with your keystore, it wouldn’t have let you upload the apk.

Tell me, when you look on the Google Play Developer Console at your published apk, what does it look like? Is your main.obb listed as an expansion file? Does the version code of your apk match that of the obb (main…com…? What is the size listed for your package? This is what my test app looks like:

Hey Jeremiah,

This is what it looks like.

So, this confirms that you are missing your obb for this build. There are no expansion files listed.

Since you’ve already published this, I’m not sure that you can delete it and re-upload it. You’ll need to make a new Android build with the StoreVersion in AndroidRuntimeSettings set to 2 and upload both apk and obb to the store.

When you upload the apk, before clicking save or publish, above where you can type “What’s new in this version?” text, you should see an option to upload expansion files.

Hmm what’s odd is we did click advanced and uploaded the expansion file previously. Although I did see yesterday in Androidworks that we did not have the APKexpansionLibrary SDK downloaded in Extras. So, I downloaded that. Could that of been the problem? That we didn’t have the SDK file downloaded in androidworks? Where exactly do we change androidruntimesettings or a store version? Is a store version different from a build version? Where is that setting at? Thanks, - Danny

AndroidRuntimeSettings is typically in DefaultEngine.ini. You can also change it in-editor via viewing Project Settings → Android

If you uploaded your apk and obb originally, and then uploaded a new apk, as I’m guessing you may have done due to the “updates added” comment above, you may not have uploaded a new obb with the updated apk.

You will always need to associate an obb with your new apk. This doesn’t appear to have anything to do with your SDKs or local settings. It is just a problem with your build on the store.

How do I upload an OBB file to play store? I’m only able to upload apk files. :confused: