Trying to use live update to create loader (Issue-4387) (SOLVED)

#1

I’m trying to create a simple loader which then loads the rest of the game using live update feature.
But as soon as I try to get current manifest: local manifest = resource.get_current_manifest(), the project fails to load on html5 with the error:
“Resource not found: /main/loader.scriptc”. loader.script is the main script for it. And then there’s bunch of other error messages like “Unable to create resource: /main/loader.collectionc” and “Pure virtual function called!” in the console.

I’ve created test project to show this. If you’re going to run it on your server, you will need to replace SERVER_URL variable in the loader.script, pointing to a folder with the index.html file (and the rest of the bundle)

Or you can try run it on my server: https://dev.low-entropy.com/static/test/index.html

If you comment out 30 line, everything loads just fine. What am I doing wrong?

test.zip (3.8 KB)

1 Like

#2

Hmm, this sounds like a typical use-case for the LiveUpdate. I’ll take a look as soon as I have some time available.

2 Likes

#3

Created Issue-4387. Will investigate this week.

1 Like

#4

Started investigating the problem. First important thing to note is that it works when bundling and running on macOS. The manifest is found and I can iterate missing resources. Next step is to try HTML5. Will update this post with findings.

2 Likes

#5

Ok, so I bundled an HTML5 version and exported live update content. I unzipped both in the same folder and modified the URL in your example to match the folder where the live update content was located. Next I ran a local HTTP server and ran the game from there and the manifest was found and I could iterate the resources.

Oh, I just tried the URL you shared and everything works fine there as well. Using Google Chrome on a Mac:

1 Like

#6

That’s weird. I’m still getting this error. Although I’m using Firefox.

0 Likes

#7

Ok. Tried this on Chrome and it work for me as well. Not on Firefox though…

0 Likes

Live update and html5
#8

It works on Firefox (68.0.1) as well here:

Maybe you have cached data?

0 Likes

#9

Extensions messing with it?

0 Likes

#10

Nope. Cleared it. I’m using Firefox (68.0.2).

0 Likes

#11

2019-09-04%2003_35_21-About%20Mozilla%20Firefox

Your link appears to be working for me too. I have no extensions installed.

0 Likes

#12

Deleted all extension. Still no luck.

I’ve tried to run it in Firefox on Mac and it works there. But on Windows it doesn’t.

0 Likes

#13

Are you on Mac or Windows?

0 Likes

#14

Are you using your ISP’s DNS? Try Google maybe? I’m on Windows 10. Could try a VPN too.

0 Likes

#15

Google DNS didn’t help. I need to configure VPN to try it.

0 Likes

#16

I’ve tried to open it in the private window and it works. Apparently something interfere. I wander what might it be since I deleted all extensions?

1 Like

#17

Try this? https://support.mozilla.org/en-US/kb/refresh-firefox-reset-add-ons-and-settings

4 Likes

#18

OMG, can’t believe it helped. Thanks a lot!

4 Likes

#19

I still experience this problem from time to time. Not only in Firefox, but on Chrome as well. It happens when I update the game. Once in a while it just stops loading with the error in the console:

WARNING:ENGINE: Unable to load bootstrap data.
27
27
exception thrown: abort(27). Build with -s ASSERTIONS=1 for more info.
INFO:CRASH: Successfully wrote Crashdump to file: /data/.Defold/_crash

Exception thrown, see JavaScript console
Error: WebGL warning: <SetDimensions>: Exceeded 16 live WebGL contexts for this principal, losing the least recently used one.
Error: WebGL warning: getParameter: pname: invalid enum value MAX_ELEMENTS_VERTICES
Error: WebGL warning: getParameter: pname: invalid enum value MAX_ELEMENTS_INDICES
uncaught exception: abort(27). Build with -s ASSERTIONS=1 for more info.

The only thing that helps is to delete storage folder in Firefox. I’ve made it so that the loader and the resources to which archive_location_filter applies always load from the new url to prevent them from caching, but it doesn’t help. What can I do to investigate this problem deeper? Is there any way to find out what bootstrap data it cannot load?

1 Like

#20

Unfortunately I had to give up on live update feature and not use it since I cannot force users delete browser storage folder.

1 Like