DOMException in Firefox during initial asset loading

Hi,

For a while now during development, whenever I go to launch and test something in firefox from the editor, whenever my project loads it’s a coinflip as to if I’m going to get spammed with this error or not in the console.

I thought this was editor related until recently when I downloaded a build of a project, hosted on an S3 bucket and QA encountered the issue in that build. It seems to be entirely firefox related as my workaround to this was simply testing my builds in chrome during development. However as I’m nearing a point where I need to deliver a build to a client, asking them not to use firefox may not be a viable option.

I’ve done some research into this issue, and searching the forums does produce a few people encountering similar errors however the use cases all appear different to mine. I specifically get this issue on page refresh, just after the page loads. The bug manifests in missing visual assets, as I’ve noticed missing textures or sprites, seen as just white empty spaces, but the bug can also break script execution, however this might be unrelated.

I did read somewhere in a post unrelated to playcanvas that the issue might be related to caching, and in the limited testing I’ve done so far, if I disable page caching via the network tab in developer tools I’ve yet to be able to repplicate the error.

Any help or feedback would be appreciated.

Thanks

Figured out what this was, posting my solution in case this helps anyone else that encounters this issue.

It would appear that if you have too many assets marked as preload, firefox seems to start throwing out DomException errors during the asset loading process, specifically around the _loadImageBitmap function. I stuck a few breakpoints in the debugging tools and was able to trace which assets this was failing on. Disabling preload on all assets that threw this error was enough to stop firefox from triggering it. I don’t consider this a solution, as I have no idea why these errors are caused during asset load, however switching to loading assets during runtime and not marking them as preload seems to have solved my problem.