Expected behaviour
The app should not crash if initializing PlayAssetDelivery or calling its functions fetchAssetPack() or getAssetPackStatus().
Actual behaviour
I made a demo to test PlayAssetDelivery and am experiencing crashes the first several times I open the app and try to initialize PlayAssetDelivery. Usually the first time I start the app, I can call initAssetDelivery(). Then if I call fetchAssetPack(), the app will crash and close a few seconds later. I then restart the app and it will usually crash and close after I all initAssetDelivery(). After a few more crashes, the crashes stop, and PlayAssetDelivery is working as it should (I can access my asset packs).
This only seems to occur if I install from the Google Play Store internal testing. It does not occur if I install it directly on the device using bundletool. I have tested it on a Galaxy Tab A (8.0", 2019) Android version 11 and Galaxy S8 Android version 9.
I am only using fast-follow.
Environment
- AIR SDK version: 33.1.1.856
- Device OS: Android
- Device version: 11
- Development IDE: Flash Builder
- Development OS: Windows 10
Logs
Here is my logcat log:
05-23 13:45:27.907 854 26118 I DropBoxManagerService: add tag=data_app_crash isTagEnabled=true flags=0x2
05-23 13:45:27.908 854 2033 D Debug : low && ship && 3rd party app crash, so skip dump
05-23 13:45:27.908 854 2033 W ActivityManager: crash : [APP ID],10347
05-23 13:45:27.921 854 2033 W ContextImpl: Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:1162 com.android.server.am.AppErrors.crashApplicationInner:579 com.android.server.am.AppErrors.crashApplication:443 com.android.server.am.ActivityManagerService.handleApplicationCrashInner:12392 com.android.server.am.ActivityManagerService.handleApplicationCrash:12327
05-23 13:45:27.922 854 2033 W ActivityTaskManager: Force finishing activity [APP ID]/.AIRAppEntry
05-23 13:45:27.927 854 2033 V WindowManager: Prepare app transition: transit=TRANSIT_CRASHING_ACTIVITY_CLOSE mNextAppTransition=TRANSIT_UNSET alwaysKeepCurrent=false displayId=0 Callers=com.android.server.wm.DisplayContent.prepareAppTransition:5809 com.android.server.wm.DisplayContent.prepareAppTransition:5803 com.android.server.wm.ActivityStack.finishTopCrashedActivityLocked:2733 com.android.server.wm.RootWindowContainer.finishTopCrashedActivities:2654 com.android.server.wm.ActivityTaskManagerService$LocalService.finishTopCrashedActivities:8921
05-23 13:45:27.930 854 2033 V WindowManager: Prepare app transition: transit=TRANSIT_TASK_CLOSE mNextAppTransition=TRANSIT_CRASHING_ACTIVITY_CLOSE alwaysKeepCurrent=false displayId=0 Callers=com.android.server.wm.DisplayContent.prepareAppTransition:5809 com.android.server.wm.DisplayContent.prepareAppTransition:5803 com.android.server.wm.ActivityRecord.finishIfPossible:3181 com.android.server.wm.ActivityRecord.finishIfPossible:3053 com.android.server.wm.ActivityStack.finishTopCrashedActivityLocked:2735
05-23 13:45:27.930 854 2033 D WindowManager: isScreenshotDisabledLocked - win: Window{7bfc5fe u0 InputMethod}
05-23 13:45:27.930 854 2033 D WindowManager: isScreenshotDisabledLocked: userId = 0, disabled =false
05-23 13:45:27.930 854 2033 D WindowManager: isScreenshotDisabledLocked - win: Window{b13ed63 u0 [APP ID]/[APP ID].AIRAppEntry}
05-23 13:45:27.930 854 2033 D WindowManager: isScreenshotDisabledLocked: userId = 0, disabled =false
05-23 13:45:27.942 517 523 E statsd : Predicate 5980654721335871649 dropping data for dimension key (10)0x2010101->10347[I] (10)0x30000->launch[S]
05-23 13:45:27.943 517 523 E statsd : Predicate -7037417284711607308 dropping data for dimension key (10)0x2010101->10347[I] (10)0x30000->launch[S]
05-23 13:45:27.950 854 2033 V WindowManager: Setting visibility of Window{8596e19 u0 com.android.vending/com.google.android.finsky.activities.MainActivity}: true, caller=com.android.server.wm.WindowContainer.sendAppVisibilityToClients:1004 com.android.server.wm.ActivityRecord.setClientVisible:6391 com.android.server.wm.ActivityRecord.setVisibility:4866 com.android.server.wm.ActivityRecord.setVisibility:4764 com.android.server.wm.ActivityRecord.makeVisibleIfNeeded:5409
05-23 13:45:27.951 854 2033 D MARsPolicyManager: onPackageResumedFG pkgName = com.android.vending, userId = 0
Here is my manifest.
<manifestAdditions><![CDATA[
<manifest android:installLocation="auto">
<uses-sdk android:minSdkVersion="17" android:targetSdkVersion="30" />
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="android.permission.DISABLE_KEYGUARD"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<supports-screens android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:xlargeScreens="true" />
<meta-data android:name="android.max_aspect" android:value="2.16" />
<activity
android:name="com.google.android.play.core.common.PlayCoreDialogWrapperActivity"
android:enabled="false"
android:exported="false"
android:stateNotNeeded="true" />
<service
android:name="com.google.android.play.core.assetpacks.AssetPackExtractionService"
android:enabled="false"
android:exported="true" />
<service
android:name="com.google.android.play.core.assetpacks.ExtractionForegroundService"
android:enabled="false"
android:exported="false" />
</application>
</manifest>
]]></manifestAdditions>
The anes in my project are:
- androidx.core
- androidx.appcompat
- com.harman.PlayAssetDelivery
- com.google.android.play
These are bundletool commands I am using.
java -jar bundletool-all.jar build-apks --bundle=[BUNDLE NAME].aab --output=output.apks --ks=[KEYSTORE NAME].jks --ks-key-alias=[ALIAS] --local-testing --connected-device --adb=[ADB PATH]
java -jar bundletool-all.jar install-apks --apks=output.apks --adb=[ADB PATH]