Live Update + app update = error

Hello,
I’d like to understand if the current implementation of Live Update has a bug, or is it me who misunderstands it.

Here is a scenario:

App V1:

  • Collection1 :
    • CollectionA
    • CollectionB
  • Collection2 (excluded) :
    • CollectionA
    • CollectionC

App V2:

  • Collection1 :
    • CollectionA
    • CollectionB
  • Collection2 (excluded) :
    • CollectionA
    • CollectionC
  • Collection3 (excluded) :
    • CollectionA
    • CollectionD

Also, in App V2, the collection A has been modified (we changed a script file).

The problem I have is:
User installs App V1.
User updates to AppV2, tries to download the new LU content.
He gets a IO error.

WARNING:RESOURCE: Unable to create resource: /worldmap/stand_shop.rigscenec: IO_ERROR
05-18 14:58:58.906  1108  1210 W defold  : WARNING:RESOURCE: Unable to create resource: /worldmap/floors/2/floor_2_generated_0_generated_0.spinemodelc: IO_ERROR
05-18 14:58:58.906  1108  1210 W defold  : WARNING:RESOURCE: Unable to create resource: /worldmap/floors/2/floor_2_generated_0.goc: IO_ERROR
05-18 14:58:58.906  1108  1210 W defold  : WARNING:RESOURCE: Unable to create resource: /worldmap/recycler.rigscenec: IO_ERROR
05-18 14:58:58.906  1108  1210 W defold  : WARNING:RESOURCE: Unable to create resource: /worldmap/floors/2/floor_2_generated_1_generated_0.spinemodelc: IO_ERROR
05-18 14:58:58.906  1108  1210 W defold  : WARNING:RESOURCE: Unable to create resource: /worldmap/floors/2/floor_2_generated_1.goc: IO_ERROR

Therefore the user can’t use the Collection2

Is this scenario supposed to work? Am I doing anything wrong?
Is it because the excluded collection contains a collection that is also used by a non-excluded collection?

Please help me understand, thank you.

I know our documentation is lacking a bit, so I’ll try to create an example to verify the behavior.

However, in you scenario, the AppV1 doesn’t really contribute to the scenario, right? It doesn’t have any live update content. You should see the same behavior by just starting directly from app V2? Can you confirm this?

Oops you’re right, I actually made a mistake describing the setup.
I updated my post. Let me know if it makes a difference.

It seems more reasonable, yes.

In App V2:

  • Did you download the new manifest?
  • Before loading the Collection2, do you make sure it has no missing resources?
  • In AppV2, I didn’t download a new manifest.
    Am I supposed to download and store the new manifest? Or is it “included” in the new build of the app?

  • Yes, I check and download missing ressources before loading the Collection2

Regarding the manifest, it’s a very good question.
I would assume that the manifest of the app and the downloadable content are the same at this point. I’ll have to double check this.

Hmm, then I don’t exactly know why it doesn’t work.

Another question, does the Collection3 contribute to the problems at all? Since you’re loading Collection2, I would think it could be excluded from this problem? (Less distractions so to speak)

If you already do have a minimal/small repro I can try out, I’d be happy to try it out (saves us a bit of time)

I just verified that after bundling, the game.dmanifest(in the app bundle), and liveupdate.game.dmanifest (in the liveupdate .zip) have the same checksum.
So in this case, dpownloading the manifest shouldn’t matter.

Thanks for checking it.

I tried another scenario that also has a problem, could be the same, might be useful to understand what’s going on:

App V1:

  • Collection1 :
    • CollectionA
    • CollectionB
  • Collection2 (excluded) :
    • CollectionA
    • CollectionC
  • Collection3 (excluded) :
    • CollectionA
    • CollectionD

Now, we modify the content of CollectionA (let’s say we add some sprites, and update a script file). Let’s call this collection A’

App V2:

  • Collection1 :
    • CollectionA’
    • CollectionB
  • Collection2 (excluded) :
    • CollectionA’
    • CollectionC
  • Collection3 (excluded) :
    • CollectionA’
    • CollectionD

Scenario:

  1. User installs the App V1, downloads the Collection2 correctly.
  2. User updates to App V2.
  3. User loads collection2, working OK (already previously downloaded)
  4. User downloads Collection3, download is OK but fails to load. (IO error)

Could the reason be that we modified the collectionA between Version1 and Version2?

Yes, the fact that Collection A has changed into Collection A´ should make the list of missing resources for Collection 2 different in App V2.
The resource names are the checksum of the contents of the file)

If you print out the list of missing resources for “App V1: Collection 2”, then compare it to the list of missing resources of “App V2: Collection 2” (make sure you have a clean install of App V2, with no liveupdate content previously downloaded).

If you compare these two lists och checksums, there must be at least one file that differs (the script file you’ve changed)?

I’ll ask again, the Collection 3 doesn’t really affect the scenario?

In my first scenario it does not, you’re correct.

But does it affect the scenario in your last example?

Yes it does, because Collection3 can’t be loaded properly.

Thanks for checking it.

Please bear with me :sweat_smile:
I just played this scenario:

App V1:

  • Collection1 :
    • CollectionA
    • CollectionB
  • Collection2 (excluded) :
    • CollectionA
    • CollectionC

Now, we modify the content of CollectionA (I added a Game Object that contains a Sprite), let’s call it A’

App V2:

  • Collection1 :
    • CollectionA’
    • CollectionB
  • Collection2 (excluded) :
    • CollectionA’
    • CollectionC

Scenario:

  1. User installs the App V1, downloads the Collection2 correctly.
  2. User updates to App V2.
  3. User tries to access Collection2, we detect some missing ressources (probably because A just became A’). We download the missing ressoures.
  4. Collection2 fails to load because a Game Object from Collection2 is not readable.

Could not instantiate game object from prototype /worldmap/floors/2/proxy_floor_2_generated_0.goc.

So basically, adding a new sprite inside a collection is breaking my Live Update.

I will continue to investigate this.

1 Like

What I meant is that you said you’re loading Collection 2. Then Collection 3 doesn’t contribute to the issue.

When installing and updating AppV1 with liveupdate content, do you download the manifest file?

No I don’t

It seems related to this issue: HTML5 and live update

Current workaround: I download and update the full archive using

resource.store_archive(response.path, store_archive_cb)

This way I don’t get the error later when loading the collection. I still ignore what’s the problem when downloading missing ressources one by one.