BabylonJS suddenly broken (no code changes have been made)

Here’s a head scratcher…

So, out of nowhere Babylon is no longer working for me. Like everything went to shit over the last 24 hours and I have NO IDEA what’s going on. I have been using Babylon 3.2 but now no version seems to work without some sort of issue.

NOTE: I tried to use the Debug Overlay via my console, but I’ve since cleared all of my cached data and all javascript variables…

For example, I’m suddenly getting:
babylon.js?v=1548295397:6 Uncaught TypeError: Cannot read property ‘createTexture’ of undefined
at n._createTexture (babylon.js?v=1548295397:6)
at new t (babylon.js?v=1548295397:15)
at n.createDynamicTexture (babylon.js?v=1548295397:7)
at s.i [as constructor] (babylon.js?v=1548295397:33)
at new s (babylon.gui.min.js?v=1548295397:1)
at Function.s.CreateFullscreenUI (babylon.gui.min.js?v=1548295397:1)

The line it’s referencing is:

guiManager = BABYLON.GUI.AdvancedDynamicTexture.CreateFullscreenUI(“UI”);

Comment all of the GUI stuff out annnd:

Uncaught TypeError: Cannot read property ‘vertexArrayObject’ of undefined
at new t (babylon.js?v=1548295615:19)
at r.setVerticesData (babylon.js?v=1548295615:16)
at t._applyTo (babylon.js?v=1548295615:18)
at t.applyToMesh (babylon.js?v=1548295615:18)
at Function.t.CreateSphere (babylon.js?v=1548295615:31)
at app.js?v=1548295615:181

and here’s a straight copy/paste of the scripts I’m using in HTML:

<script src="<?php echo SITE_URL ?>/babylon/dist/gui/babylon.gui.min.js<?php nocache() ?>"></script>
<script src="https://preview.babylonjs.com/loaders/babylonjs.loaders.min.js<?php nocache() ?>"></script>
<script src="https://code.jquery.com/pep/0.4.1/pep.js<?php nocache() ?>"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js<?php nocache() ?>"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js<?php nocache() ?>"></script>
<script type="text/javascript">
  var SITE_URL = "<?php echo SITE_URL ?>";
  var API_URL = "<?php echo API_URL ?>";
  var LAYOUT_ID = "<?php echo isset($_GET["l"]) ? $_GET["l"] : "" ?>";
</script>
<script src="<?php echo SITE_URL ?>/vars.js<?php nocache() ?>"></script>
<script src="<?php echo SITE_URL ?>/functions.js<?php nocache() ?>"></script>
<script src="<?php echo SITE_URL ?>/bunkers.js<?php nocache() ?>"></script>
<script src="<?php echo SITE_URL ?>/app.js<?php nocache() ?>"></script>
<script src="<?php echo SITE_URL ?>/ux.js<?php nocache() ?>"></script>
<script src="<?php echo SITE_URL ?>/ops.js<?php nocache() ?>"></script>

I even have a “test” site with babylon stuff on it that hasn’t been touched in 6 months that has worked FLAWLESSLY up until now.

Someone help me out here…

Are you using all the libraries from the same version ?

Could you try targetting all your babylon dependencies from https://preview.babylonjs.com/ ?

I am wondering if it is because you updated only a subset of the dependencies.

Yep! I also tried uploading 3.0.7, 3.2, & 3.3 and referencing those libs directly.

Same thing.

Thus the head scratcher.

Usually if it’s just an updated script or something all I need to do is upgrade or downgrade to fix the issue, but even when using The Generator and putting EVERYTHING in one spot I still have this issue…

I’ve never encountered anything like this in the 10 years I’ve been developing. I’m truly stumped lol

This is really weird knowing we never touched back already released versions :frowning:

Would be amazing if you could host a repro somewhere so that we can take a look.

Maybe it’s b/c of a browser plugin; does it work on other browsers? Or maybe there’s something interfering with the files/internet, such as a proxy/vpn/antivirus software?

close to impossible to say without a live repo we can debug in browser and see what happens.

Something i notised,
Your snippet is missing the code for loading the babylon.js core file,
you’re using preview.babylonjs.com for babylonjs.loaders.min.js (newest dev version)
while using a stable, local hosted, version of gui

I agree : make sure you download babylon.js core before anything else.