Basis module not found?


I’m finding that none of my basis compressed textures seem to be loading in any type of build, I tried deleting the basis folder, then re-importing it from the rendering tab. I also tried checking “preload” on the scripts inside the basis folder but I continue to get this error.

Basis module not found. Asset "Rectangle 216.png" basis texture variant will not be loaded.

Is there any way to force it to include it with build? I also didn’t see the wasm scripts for basis in the network tab of the web inspector.


1 Like

That’s weird. Are you able to share the project or add yaustar to it for me to take a look?

1 Like

Hey @yaustar

I believe my team is in discussion about giving access, but I’m not sure the status of that. That being said I’d like to give more info on the issue from my side.

One thing I noticed is that whenever I clear cache and refresh in my test window, is when I seem to get the issue. (then my ui elements are completely white because nothing loaded). But on 2nd refresh after the cache clear, I’ve noticed that it resolves itself, and the affected textures load as expected. Obviously this is still an issue as every user would encounter it on their first open of the app.

I’ve tried also forking the project and deleting everything but the basis folder and one of the affected textures. But now I don’t see the issue occurring anymore. I’m not sure how it fixed itself but I figured maybe forking the project fixed some pathing or re-initialized the files (or similar), but after doing this with our main project and testing immediately after, without deleting anything, I still encounter the issue. first load basis doesn’t load, second load everything loads.

Let me know if that gives any insight into the issue. Thanks.

I’ve spoken with someone from your company and there’s a MNDA in progress from our side.

I can’t really think of anything offhand and we’ve not had this issue being reported before.

It sounds like a race condition but again, difficult to really diagnose without a repro. Are there any other libraries used that could be an issue?

I assume it’s a branding issue that prevents it from being shared? Does the issue still occur if all the branded content is replaced with placeholders (eg from

Side note: There is a engine release due next week that does some basis refactoring: Basis worker fixes by slimbuck · Pull Request #3277 · playcanvas/engine · GitHub

This PR could help with the issue and will be able to check once I have a repro/access to the project.

1 Like

I am also getting this issue.

The project where I’m testing this is sadly also not a project I am able to share publically.
But I’ve made sure to set preload to true for all three basis related scripts.
I can see basis.js and basis.wasm.js getting loaded in the network tab, this is however done after a couple of textures has already been loaded.

I don’t know if this is what is causing the problem.
Because even after I see that the basis scripts have been loaded in the network tab, the error stil persists claiming that basis module has not been found.

I’m using the engine 1.46.5 version.

*Edit: I upgraded to 1.53.4 but it made no difference

I bit difficult without seeing the project. Could you fork it and strip it all out apart from the basis modules and a single basis texture? That will help a lot.

Otherwise, the setup that we recommend be used is to have basis.js, basis.wasm.js and basis.wasm.wasm to not preload.

It shouldn’t make a different but have seen cause issues under some conditions.

How the basis module works is that the first basis texture asset that is loaded, it will async download the basis module and them transcodes the texture.

The other issue I’ve seen is that some people accidentally change the name of the WASM module in basis.wasm.wasm

It should look like the following: