I don’t think it’s the liveupdate update that is to blame here.
If you check your logcat, you’ll find “Cleaning up …” output from the engine when cleaning the old live update files. And should also only remove specific files (I.e. not all files or any folders)
Have you checked in Android Studio, if the file is still there?
INFO:LIVEUPDATE: Found /data/user/0/com.mygame/files/liveupdate.ref
INFO:LIVEUPDATE: Found zip archive reference to /data/user/0/com.mygame/files/archive.zip
ERROR:RESOURCE: Failed to parse Manifest data (2)
ERROR:LIVEUPDATE: Could not load manifest: -2
I used to have this error message and crash, now I have this error, it doesn’t crash but my files are erased.
Trying to understand what’s going on.
I updated the app using adb install -r path/to/app.apk
I didn’t uninstall the previous app.
I have the following logs at 2nd app startup (after update):
INFO:ENGINE: Loading data from: dmanif:game.dmanifest
INFO:LIVEUPDATE: Found /data/user/0/com.mygame/files/liveupdate.ref
INFO:LIVEUPDATE: Found zip archive reference to /data/user/0/commygame/files/archive.zip
ERROR:RESOURCE: Failed to parse Manifest data (2)
ERROR:LIVEUPDATE: Could not load manifest: -2
And to be precise, it appears the files haven’t been erased, but they became empty juding by my Defsave logs:
1st install, I see the log DefSave: Loaded file my_file is empty
2d install (update), I don’t see this log anymore. Meaning there is a file, but it’s content is empty.
What I mean is that you updated the code in LULoadManifest_Regular ,
but when upgrading, we’re not calling LULoadManifest_Regular , we’re calling LULoadManifest_Zip
In the scenario we had, that was the use case that produced the repro case.
Before you started using the .zip archive, you used to download files one by one, right?
And if those files were left behind, and the engine tried to load them, the game would exit.
When the game starts, it 1) tries to load the liveupdate .zip file. If it fails, it 2) tries to load the “regular” liveupdate manifest. If that fails it 3) will (after the latest fix) proceed to load the manifest from the bundled game.
Before this fix, your game would shut down, right?
With the latest fix you can get to case 3 without the game shutting down.
Yes. If those files were still there, they would fail the startup process.
Load .zip → fail
Load .dmanifest (regular) → fail
App exit
That is what I fixed (since that was the scenario we didn’t handle.
We already had the check for the .zip archive. We didn’t have the check for the regular live update files.
I mean, you reported that the app exited.
Does it still exit?