Our game crashes during the loading process, and throws out the error:
TypeError: Cannot read properties of undefined (reading 'getSupportedExtensions'),TypeError: Cannot read properties of undefined (reading 'getSupportedExtensions')
Which traces back to the built framework js file line 4237 specifically this line
var exts = GLctx.getSupportedExtensions();
I am assuming this has something to do with our custom template as we are being forced to update from unity 2019 to 2020 due to some security updates we require. I am assuming it might be a simple overlooked change that is causing this but I cant find anyone else who has experienced a similar error and have run out of ideas.
The script to create our unity instance is as follows(with identifying names removed):
var gameInstance;
var canvas = document.querySelector("#game-container");
var buildUrl = "Build";
var loaderUrl = buildUrl + "/54b0a94d1fe59067ab630f467a377b39.js";
var config = {
dataUrl: buildUrl + "/a866f82a6d184e9ac09252c3939b9824.data",
frameworkUrl: buildUrl + "/0a5162914a20d5855de16b7fe70537e0.js",
codeUrl: buildUrl + "/80aff3f7d0250e8d55c1beddb7528e82.wasm",
streamingAssetsUrl: "StreamingAssets",
companyName: "",
productName: "",
productVersion: ""
};
var script = document.createElement("script");
script.src = loaderUrl;
script.onload = () => {
if (Modernizr.webgl) {
$('#no-support').hide();
$('#game-wrapper').show();
createUnityInstance(canvas, config, (progress) => {
})
.then((unityInstance) => {
}).catch((message) => {
alert(message);
});
} else {
$('#no-support').show();
$('#game-wrapper').hide();
}
//});
};
document.body.appendChild(script);