google / model-viewer

Easily display interactive 3D models on the web and in AR!
https://modelviewer.dev
Apache License 2.0
6.88k stars 816 forks source link

RangeError: Length out of range of buffer #4674

Closed jawndiego closed 7 months ago

jawndiego commented 7 months ago

Description

having this error: RangeError: Length out of range of buffer

happens when trying to load glb or gltf specifically on mobile browsers. the assets are loading fine on desktop. what's odd is that they load fine (on desktop and mobile) when running on localhost:

here is where im pulling in the model-viewer:

https://github.com/1ifeworld/river/blob/50f4437d4b0b4c2b55e8c8daac6794e7f7ca60bf/apps/site/components/client/renderers/ModelRenderer.tsx

Creating a page for modelRenderer here: https://github.com/1ifeworld/river/blob/50f4437d4b0b4c2b55e8c8daac6794e7f7ca60bf/apps/site/app/channel/%5Bid%5D/%5Bindex%5D/page.tsx

here is the namespace custom jsx i set: https://github.com/1ifeworld/river/blob/50f4437d4b0b4c2b55e8c8daac6794e7f7ca60bf/apps/site/custom-jsx-elements.d.ts

this is all within a next js application.

Version

Browser Affected

OS

jawndiego commented 7 months ago

interestingly enough .. model-viewer works on mobile arc brower. here is an example: https://www.river.ph/channel/bafyreidpiuhgnf3buyewn6r7dajk5nomn7g4uasofc67ta6bwl45o7xezm/2

doesn't load on chrome, safari or firefox

jawndiego commented 7 months ago