Example of issue shown here → textureloading problem
This bug occurs on desktop versions of Brave / Chromium browsers, untested on other types of browsers.
When the bug occurs, I notice that my callbacks never get called, not even the onError callback. Whats more frustrating with this is how unpredictable it is to replicate.
I suspected it might have been the browser not downloading the image in time for the texture to be created but that cant be the case; TextureLoader.load returns an empty Texture object that gets populated asynchronously, even if used in a shader it will be updated once the image has been downloaded.
So my question is, could there be a silent error going on?
The images are code showing how I am loading the textures and how they are being used.
My repo is → https://github.com/MDouglas345/roargame-threejs
Live site → https://roarthreejs.onrender.com/
Code snippets :
I was not able to reproduce it on my machine. Tried it 10 times with FireFox, 10 with Chrome and 10 with Opera. Worked fine all the times. Only the first run had a small delay (1-2 seconds) for the first load of the texture, the rest 9 runs were immediate (probably cache was used).
Are you sure this is not some Brave-specific issue? Have you tried some of the official texture examples with your Brave browser? Is some Brave setting interfering with async resource loading?
This might be, I tested it on Safari on Desktop and it wasn’t an issue at all. Im doing more testing on other versions of Brave since there is an issue with the discord web app not loading images on the latest versions of Brave and it might be related.
On Chromium 110.x.x.x.x the issue is present, its not present on Chromium 109.x.x.x.x
Hello! Unfortunately during this week i encountered a similar problem:
I have a binary FBX file encoded as base64, it gets decoded and then parsed using FBXLoader.parse().
Sometimes the model texture is decoded and rendered correctly, some other times the texture isn’t loaded at all and the resulting model is completely black.
In this second case, if i edit FBXLoader.js to log to console the fbx binary texture, the “image” field of the texture object is null. Also textureLoader.load( ) callbacks don’t ever return!
Lights are on and the scene setup should be correct.
The program was tested and working until a couple of weeks ago. Do you have any suggestions on how to proceed?
I tried with different browsers: the problem is there for Brave and Chromium browsers, while it never happens in Firefox.
I also can confirm the same behaviour with your live site when using Brave.
The issue has been fixed with the latest Nightly build of Brave
1 Like