packager icon indicating copy to clipboard operation
packager copied to clipboard

HTML environment doesn't work in Chrome if project's encoded size exceeds ~512MB

Open Alestore opened this issue 2 years ago • 7 comments

The HTML file is only 3 MB (which is weird as my original .sb3 file is like 600 MB large). Then I get this error: image

Alestore avatar Sep 22 '22 20:09 Alestore

Does it happen if you use an older version of the packager such as https://github.com/TurboWarp/packager/releases/tag/v1.2.0 ?

GarboMuffin avatar Sep 24 '22 04:09 GarboMuffin

Yes, it happens also on this version.

Alestore avatar Sep 24 '22 06:09 Alestore

It looks like the way we generate projects breaks if they get too large

Maybe it works in Firefox instead of Chrome?

You could send the project to the usual place ([email protected]) and I may be able to take a deeper look

GarboMuffin avatar Sep 25 '22 06:09 GarboMuffin

I sent you the email with the project.

Alestore avatar Sep 25 '22 07:09 Alestore

Your project is at an interesting point where its encoded data is larger than Chrome's max string length (~512MB)

For now it should work if you use environments like zip or any of the Electron ones, just not as a single HTML file or using the preview button. If those environments are also broken then there's something else going wrong and I'd like to know about that.

Fixing the HTML environment will require a good bit of work that I don't have much time for (refactor packager internals to generate bytes instead of one big string)

GarboMuffin avatar Sep 25 '22 08:09 GarboMuffin

OK thanks. Others work properly. The idea was to include the packaged project in HTML and insert it in AppInventor to have an Android application. I also found something about being able to unzip .zip archives within AppInventor so I'll take a look.

Alestore avatar Sep 25 '22 09:09 Alestore

OK thanks. Others work properly. The idea was to include the packaged project in HTML and insert it in AppInventor to have an Android application. I also found something about being able to unzip .zip archives within AppInventor so I'll take a look.

Sorry if I am derailing the conversation, but can you please send me a link to where you heard that? I could really use this kind of thing.

PPPDUD avatar Oct 04 '22 18:10 PPPDUD