I’m still working on repro steps for the Chrome team about this issue. In the meantime, I think I’ve got a way to force the WASM (Ammo and Basis) to always load in the launch tab that I would like you folks to try in the meantime:
(function() {
if (window.location.href.startsWith('https://launch.playcanvas.com')) {
var wasm = window.config.wasmModules;
var timestamp = Date.now();
// Add a timestamp to the end of URLs
for (var i = 0; i < wasm.length; ++i) {
var m = wasm[i];
if (m.wasmUrl.length > 0) {
m.wasmUrl += '&bust=' + timestamp;
}
if (m.glueUrl.length > 0) {
m.glueUrl += '&bust=' + timestamp;
}
if (m.fallbackUrl.length > 0) {
m.fallbackUrl += '&bust=' + timestamp;
}
}
}
})();
Add this as a new script in the Editor and change the loading type to be ‘Before Engine’.
I started off with a project of mine that was failing yesterday. At first it was working fine. I kept monitoring the JS heap, but it was at the normal level all the time. After working on the project for like 10 minutes, changing non-Ammo related variables and refreshing the launcher, after one of the refreshes the app froze.
At that state, the JS heap was at normal level. Closing the browser completely and opening again did not solve the problem - the app was still freezing. After that I added your cache busting script and the app began to start normally. Closing the browser and opening again would not affect the app start - it would work norrmally. After disabling your script the app got back to freezing on start.
I experienced the freezing issue within about 20 mins of a cold boot. Upon first loading my project, it worked fine, no freezes, but just like LeXXik reported, it was only after working on some non-Ammo, non-WASM scripts, I was able to recreate the freeze issue fairly reliably.
Since I added your script, I haven’t had a single freeze! But unlike LeXXik, after disabling your script, I can’t get my project to freeze again. I assume that’s just the randomness of caches. I’ll likely keep your script enabled for the forseeable future, unless there is something specific you’d like us to test for.