I’m trying to use the (rather unfriendly) GooglePlayDownloader script and the built-in Application Binary Splitting support to try and prepare our game for Google Play.
The build splits the binary properly. I update the .apk and .obb to Google Play and publish a beta. I can download this beta from the Google Play Store and it works.
HOWEVER, I have some significant problems testing the code. The main one is that he .obb downloading repeatedly fails and ultimately gives up with a “download failed because the resources could not be found” error.
The way I am trying to test this is as follows
- Download game from Google Play
- Manually delete .obb file from local storage
- Run game
My code calls GooglePlayDownloader.FetchOBB() if the application fails to find the OBB locally (using GetMainOBBPath).
Then the app seems to get caught in a cycle of trying to find the .obb to download and failing repeatedly.
This is what the log looks like:
I/Unity (14583): FETCH OBB NOW
I/Unity (14583):
I/Unity (14583): (Filename: ./artifacts/AndroidManagedGenerated/UnityEngineDebug.cpp Line: 56)
I/Unity (14583):
I/ActivityManager( 508): START u0 {flg=0x10000 cmp=com.tigerstylegames.spider2/com.unity3d.plugin.downloader.UnityDownloaderActivity (has extras)} from pid 14583
D/dalvikvm(14583): GC_CONCURRENT freed 415K, 6% free 7966K/8420K, paused 5ms+3ms, total 31ms
D/dalvikvm(14583): GC_FOR_ALLOC freed 2K, 6% free 7974K/8420K, paused 16ms, total 17ms
I/dalvikvm-heap(14583): Grow heap (frag case) to 19.820MB for 12582928-byte allocation
D/dalvikvm(14583): GC_FOR_ALLOC freed <1K, 3% free 20262K/20712K, paused 18ms, total 18ms
D/dalvikvm(14583): GC_CONCURRENT freed <1K, 3% free 20262K/20712K, paused 2ms+3ms, total 19ms
D/LVLDL (14583): Service Bound
I/LicenseChecker(14583): Binding to licensing service.
I/Keyboard.Facilitator( 9309): onFinishInput()
I/ActivityManager( 508): Displayed com.tigerstylegames.spider2/com.unity3d.plugin.downloader.UnityDownloaderActivity: +1s175ms
I/LicenseChecker(14583): Calling checkLicense on service for com.tigerstylegames.spider2
I/LicenseChecker(14583): Start monitoring timeout.
I/qtaguid (10807): Failed write_ctrl(u 44) res=-1 errno=22
I/qtaguid (10807): Untagging socket 44 failed errno=-22
W/NetworkManagementSocketTagger(10807): untagSocket(44) failed with errno -22
I/LicenseChecker(14583): Received response.
I/LicenseChecker(14583): Clearing timeout.
W/LVLDL (14583): Aborting request for download main.2.com.tigerstylegames.spider2.obb: http error 403
W/System.err(14583): com.unity3d.plugin.downloader.b.o: http error 403
W/System.err(14583): at com.unity3d.plugin.downloader.b.k.a(Unknown Source)
W/System.err(14583): at com.unity3d.plugin.downloader.b.p.a(Unknown Source)
W/System.err(14583): at com.unity3d.plugin.downloader.b.g.handleMessage(Unknown Source)
W/System.err(14583): at android.os.Handler.dispatchMessage(Handler.java:102)
W/System.err(14583): at android.os.Looper.loop(Looper.java:136)
W/System.err(14583): at android.os.HandlerThread.run(HandlerThread.java:61)
I/LicenseChecker(14583): Binding to licensing service.
I/LicenseChecker(14583): Calling checkLicense on service for com.tigerstylegames.spider2
I/LicenseChecker(14583): Start monitoring timeout.
I/qtaguid (10807): Failed write_ctrl(u 44) res=-1 errno=22
I/qtaguid (10807): Untagging socket 44 failed errno=-22
W/NetworkManagementSocketTagger(10807): untagSocket(44) failed with errno -22
I/LicenseChecker(14583): Received response.
I/LicenseChecker(14583): Clearing timeout.
W/LVLDL (14583): Aborting request for download main.2.com.tigerstylegames.spider2.obb: http error 403
That bottom section, where it errors out and then restarts the download, loops about 20 times before the application gives up for good.
Why is it “aborting request” with a 403? I have triple-checked my AndroidManifest, but maybe something is missing there that is interfering with my permissions?
Anyone?