Expansion File -- works for some testers, broken (assets can not be found) for others

We just built an app whose built-in assets were large enough that we had to use an expansion file (for the first time) to get it in the Play Store.

I tried manually installing the minimal apk and adb pushing the obb file to make sure it worked, and it worked great.  So we submitted it to the store.

It’s made it through the store to availability to testers, and some folks are getting a working app, and others are getting a blank screen because it can’t find our loading screen asset.

This would seem to indicate some problem with the expansion file (since all our assets are in there), but I don’t know where to even begin debugging it.

I did use “adb ls” during the install to confirm the obb file was being downloaded from the play store and that it was exactly the right size in bytes.  So presumably I actually have the odb.

But when I launch the app it’s behaving as if it couldn’t get to the assets in the ODB.

It’s failing on my Nexus 10, running Android 4.2.2.   I’ve reinstalled and restarted it repeatedly, it always errors out when it fails to find that asset.

It ran fine on a Xoom tablet with Android 4.1.2.

It did the blank screen thing at first with a Galaxy S3 running 4.4.2.  But after a few force quits it started working.  Then we uninstalled and reinstalled the app and got the same error, unable to find an asset file.  Force quitting and reinstalling after this point had no effect, we could not get it to work again.

I’m at a loss as to where to even begin debugging this.  Unpacking and making available the contents of the expansion file is out of my control as a programmer, it’s something that Corona is supposed to do for me.  It’s particularly difficult because this problem only appeared once we were distributing (for testing) through the Google Play Store, so its’ not like I could quickly insert some debug or anything.

Any advice would be very much appreciated.

Have you set up your app to use Google Licensing?

I’m guessing you’re not.  You see, Google Play will automatically download your expansion files on some devices, but on other devices it will not and Google makes your app download it via Google Licensing instead.  This is a device specific thing.  Now, Corona will automatically download it for you on startup if you enable Google Licensing.  Please see the linked documentation below.  You’ll need to add the documented permissions and add licensing support via your “config.lua” file.

   https://docs.coronalabs.com/daily/guide/distribution/buildSettings/index.html#expansion-files

   https://docs.coronalabs.com/daily/guide/basics/configSettings/index.html#app-licensing

You’ll also want to test downloading via Google Licensing on that 1 device you have to verify that your set up works.  This means you’ll have to upload your app to Google Play and set up a test account on your device.  Just be aware that you’ll have to wait about 4 hours after uploading your newest apk and obb file in order to test downloading it via Google Licensing.  Google’s servers are a bit slow in syncing/updating to use an app’s newest obb file.  At least that’s been my experience.

Thanks, that has got to be the problem.  We were not using those permissions or Google Licensing!  Will implement those and update the thread.

That was totally it.  Thanks for the advice!

Great!  Happy to help!

Have you set up your app to use Google Licensing?

I’m guessing you’re not.  You see, Google Play will automatically download your expansion files on some devices, but on other devices it will not and Google makes your app download it via Google Licensing instead.  This is a device specific thing.  Now, Corona will automatically download it for you on startup if you enable Google Licensing.  Please see the linked documentation below.  You’ll need to add the documented permissions and add licensing support via your “config.lua” file.

   https://docs.coronalabs.com/daily/guide/distribution/buildSettings/index.html#expansion-files

   https://docs.coronalabs.com/daily/guide/basics/configSettings/index.html#app-licensing

You’ll also want to test downloading via Google Licensing on that 1 device you have to verify that your set up works.  This means you’ll have to upload your app to Google Play and set up a test account on your device.  Just be aware that you’ll have to wait about 4 hours after uploading your newest apk and obb file in order to test downloading it via Google Licensing.  Google’s servers are a bit slow in syncing/updating to use an app’s newest obb file.  At least that’s been my experience.

Thanks, that has got to be the problem.  We were not using those permissions or Google Licensing!  Will implement those and update the thread.

That was totally it.  Thanks for the advice!

Great!  Happy to help!