Failed to parse Manifest data

Hello,
I have an old compiled version, let’s call it v1. It uses liveupdate to progress through levels.
I have a new version, v2.

When I open v2 from a clean phone (no previous app installed), it works.

When I open v2 on a phone that already has v1 installed (and liveupdate used), I get a crash at opening, with the following:

10-15 16:23:12.791 25391 25477 I defold  : INFO:ENGINE: Loading data from: dmanif:game.dmanifest
10-15 16:23:15.659 25391 25477 I defold  : INFO:LIVEUPDATE: Found /data/user/0/com.mygame/files/liveupdate.ref
10-15 16:23:15.660 25391 25477 I defold  : INFO:LIVEUPDATE: Found zip archive reference to /data/user/0/com.mygame/files/archive.zip
10-15 16:23:15.685 25391 25477 E defold  : ERROR:RESOURCE: Failed to parse Manifest data (2)

archive.zip is the name of the file I use to download my live update, with the resource.store_archive
function

v1 was build with defold version 1.2.185
v2 is built with defold version 1.2.186

edit: I tried building v2 using 1.2.185, the problem persists.

The error code 2 seems to mean RESULT_WIRE_FORMAT_ERROR
What does it mean?

This error is coming from our data format parser. It seems like there’s a mismatch between the engine you are running and the version of live update content that you are downloading.

image
Could it come from V2 not having the v1 defold engine number in this section?

With V1, I created an archive.zip file, I am downloading it, saving it locally, and then passing it in the resource.store_archive(archive.zip) function.

When I open V2, at opening, it will look for the archive.zip file, as the logs show us:

 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/com.mygame/files/archive.zip
 ERROR:RESOURCE: Failed to parse Manifest data (2)

So I understand a probable explanation would be for V2 to be compiled with a different Defold version, is that correct? That situation is fixable by putting the right Defold version in the Supported versions of liveupdate settings, right?

Other question: is there any downside to list all of defold version in the Supported versions field? Also, what about the alpha versions? Can I put 1.2.185-alpha in the Supported versions parameter?

OK, so I compiled V2 with the same Defold engine as V1 (1.2.182), and V2 can run after upgrading from V1.

Am I stuck forever with building the game with 1.2.182, because the already existing users won’t be able to upgrade to an app compiled with a different Defold engine?

Not sure. I need to review some of the code and test a bit myself. Maybe you could create a ticket on GitHub with all of the info?

OK thanks, just opened a Github issue: https://github.com/defold/defold/issues/6103

Hoping you can take a look, as I’m sure Liveupdate users want to also upgrade to the latest Defold engine and take advantage of all the latest features.

I don’t dispute this, but I wonder how we can support old data “forever”.

As you say, we want to upgrade our engine with fixes and features, and that may include updating the archive format (which we did recently).
As we don’t want to keep all code in the engine forever (we want a minimal runtime), we remove the support for the old archive, especially as it’s (currently) expected to bundle the game with each new release.

I think a big oversight from our part was not to communicate properly that we updated the archive format, and it could have this effect. And I don’t think we (I) thoroughly understood the side effects it would have.

I’m merely wondering how to avoid such scenarios in the future, while also improving on the LiveUpdate feature :thinking:

Maybe the user could re-download the archive, if the installed archive is not compatible with the new engine that build the update?

I think we already have some of these mechanics in place.
Is this the problem?
You’ve played the game with V1, and dowloaded an archive. Then updated to V2, and V2 cannot properly load the downloaded archive?

The intended behavior here is that the downloaded data should not be used by the engine, thus allowing you to download new data from your server.

You’ve played the game with V1, and dowloaded an archive. Then updated to V2, and V2 cannot properly load the downloaded archive?

That’s correct.

The intended behavior here is that the downloaded data should not be used by the engine, thus allowing you to download new data from your server.

Then there an issue, because it does try to load the archive, and fails at parsing it as you can see from those logs:

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/com.mygame/files/archive.zip
 ERROR:RESOURCE: Failed to parse Manifest data (2)

I can’t even try to re-download it because the app crashes right at startup.

Then I agree that it’s a bug, and one that we should fix.
Added issue here:

2 Likes

We now have a pull request waiting for approval.
We should be able to merge it into the dev branch tomorrow.

Or, you can try it later when it has built on CI.
(The download links might be a bit difficult to find, but they’re there)

Awesome, can’t wait to try it out!

There is now a new alpha build for you to try here:

1 Like

Please try the beta version instead now:

1 Like

The build now works, and the liveupdate works as well!
Thanks so much!

3 Likes

Wait, it seems there is quite big issue.

When I update my app, all of my files (saved with defsave) seem to have been erased… and the game acts as if I open it for the first time!

Not sure what happens there, as the live update will only remove the old live update files:

Where were your files stored?
And where are they stored now?

My files are stored in this folder:
/data/user/0/com.mygame/files/user

It’s in the same folder as my archive file /data/user/0/com.mygame/files/archive.zip