Failed to parse Manifest data

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?

Interesting, i don’t see any Cleaning up logs.

I have this:

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.

To be clear, the file itself is erased?
How did you verify this? Using Android Studio?
What was the actual filename?

EDIT:
How did you update the app?
Did you uninstall the previous app?

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.

Also, I don’t see any “Cleaning up” logs.

I see that in your patch, you updated the liveupdate_archive.cpp

But you haven’t touched the liveupdate_zip_archive.cpp

I believe in my case, I’m using the liveupdate_zip_archive.cpp because the LiveUpdate I download is a zip file.

I didn’t uninstall the previous app.

Ok, that’s good, then the files shouldn’t be removed by the installation process.

Also, I don’t see any “Cleaning up” logs.

I’m not sure why the “Cleaning up” isn’t there, but that shouldn’t be a blocker.

Meaning there is a file, but it’s content is empty.

You could perhaps try to load it manually and print out the contents?

I see that in your patch, you updated the liveupdate_archive.cpp

But you haven’t touched the liveupdate_zip_archive.cpp

Correct, it was the old archive files that produced the app exit.

1 Like

It seems like there’s a lot of fallbacks in defsavethat might account for storing the empty file?

1 Like

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

(because we have a .ref archive: https://github.com/defold/defold/blob/7d417dd53770f424cc2fb3aeac5f3fc984335b85/engine/liveupdate/src/liveupdate.cpp#L95)

If I’m not mistaken you made the changes in a part that is not encountered when running the app after an update.

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.

I’m confused, what do you mean? You mean in the past, some months ago?

In my current situation, in v1 we download a zip archive that contains all resources, we don’t download file by file.

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?

1 Like

You’re right, sorry I got confused!

1 Like