Published Android game - XAPK File Validation failed

I originally posted this on Answer Hub a few days ago and have not received any responses. Hopefully someone here will have an answer to this. Added note, i am using engine version 4.8.3.

I have 2 published Android apps on Google Play that is having a weird problem (a Free and a Paid version, both with OBB files). Some people are getting this “Android XAPK File Validation failed” error. For many of them the Free version of the game downloads and plays just fine, but when they would attempt to download the Paid version of the game only the APK would download (no OBB). Then the downloader would load with my image (the one set in the Android Project Settings) and end up going to a black screen and crash. Some would then get the error “Android XAPK File Validation failed”. Also worth noting is that for some people the Paid downloads and installs just fine but the Free will not download the OBB, so it seems to be pretty random when the Google Play store does not download the OBB itself.

We actually had the exact same problem on 1 of our 4 Android test phones when downloading both versions from the Google Play store. One version of the game downloads and runs just fine while the other only downloads the APK then has this same error.

We tried uninstalling and redownloading the game multiple times to see if the OBB would eventually download, but no luck.

Then we downloaded a BETA version of our game from the Google Play beta, and it actually downloaded that OBB from the store and installed just fine. Then when we removed the phone from the BETA and downloaded the PRODUCTION version again from the normal store (which initially did not work), it actually downloaded the OBB and installed just fine.

Would checking “Disable verify OBB on first start/update” in the Android Project Settings help this? I’ve looked around to see what this even does and could not find a definite answer. It’s wording does sound like it could fix my problem, I just want to be sure as I now cannot test this as the game is downloading and installing on all of my devices just fine.

Any information would be very much appreciated. Thanks.

“Disable verify OBB on first start/update” turns off the CRC checking of the contents of the OBB after download. An OBB is an uncompressed ZIP file. In a case where it failed the verify, have you looked to see if the OBB is actually downloaded?

The OBB does not appear to be downloading. The “Failed to Verify” is not always happening. For some the OBB Downloader pops up and the validation progress bar goes to 100% always crashes. For others it just goes to a black screen and crashes immediately.

One scenario for a user. Downloaded the game and just got the black screen immediately and crashes. Then deleted and re-downloaded multiple times with the same scenario. Then on 4th install attempt got the progress bar with the XAPK File Validation failed.

When the OBB downloads from the Google Play store itself it seems to always works fine.

This is no longer an issue for me. I managed to get the APK size under 50mb so I no longer have an OBB.

Can you explain how you solved this? I have the same problem. My game size is around 25 mb. I have screenshots here in this post Would be nice if you could help me as someone who has experienced this problem.

Here is similar issue on Android Open Source Project - Issue Tracker.
Problem can be with Android 6.0 and targetSdkVersion=23 (24?)
They seems to ignore this problem: “This issue could not be reproduced in android N builds. At this point, our eng teams are not prioritizing changes on earlier releases.”
What is going to be better workaround for us? Any suggestions?

4.14 has a modified OBB downloader which should work with 6.0 and targetSdkVersion=23/24 now.

I’m having this bug (XAPK … failed) in 4.14. How do I use the modified OBB downloader?

4.14 has only the updated OBB downloader code; there isn’t anything you need to do to use it. I’m not sure why you have the XAPK error unless you didn’t upload a paired APK and OBB (the CRC information is embedded in the APK so you must update both at the same time if they change).

My users sometimes also have this problem but I don’t know when… Really weird… UE 4.14 and Target API 22.