RangeError: Start offset 12 is outside the bounds of the buffer

So, I’m working on a new script that load the meshes (of furniture objects) into the scene. When I test it on my site (call it B3) using the external link from playcanvas (https://playcanv.as/p/4XS9xrjb/) everything works perfectly. You can try the scene at http://damb3.aareas.com/Load.html?SceneId=4663&Scenesavedid=16058. You will see a house and some chairs (image 1)

But when I download the build and host it on my BETA site I started to get this issue (image 2)


You can use this link for beta: https://dambeta.aareas.com/Load.html?SceneId=1632&Scenesavedid=17144

Some more context: I was given the task to rewrite one of my ex-colleague’s code. He used XMLHttprequest to load the assets, when the arraybuffers are loaded he then utilize a 3rd-party lib called jDataView to get the playcanvas mesh. (the read() function in the image). I haven’t change anything from the read() -> parse() part)

I’m not familiar with this issue here but what would be the differences between B3 and Beta that cause the problem? Because clearly code is the same on both :confused:

Is there a test login we can use for the site?

Have you checked data is coming through correctly to PlayCanvas engine on the hosted build?

It could also be a server configuration issue some files/assets not being served correctly by the server.

Also, can you provide reproduction steps to get to the error?

Thanks for replying. I have disabled the login page. After clearing cache you should be able to access it.

Data looks good

Just load the scene and you shall see that on B3 all the chairs loaded perfectly. But on Beta the chair loads half way then stops, you can see the mentioned issue in the console debugger

How do I verify something like this?

I’m still getting the login page for the beta site.

Check the network tab in devtools and also any warnings in console.

Ok so this one’s also good. I see all the basic assets and scripts.
Please try beta again? There shouldn’t be any log in page. I also pm’d you the credentials just in case.

Keeps taking me to

Looks pretty complex to debug. A couple of things that I would do to make it easier:

  1. Swap out the engine version to use a debug version of the engine: https://code.playcanvas.com/playcanvas-stable.dbg.js

  2. Don’t minify the build on publish

  3. Clean up the 404s and the warnings about mimetypes mismatches on the server:


  4. For some reason, pcvertices is null here

Thanks, appying your suggestions.

Also, maybe try to reduce the problem down to a smaller project and the affected asset/data. That would help a lot too.