Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error loadfailure switching glTF models on low-end devices #4981

Open
enzodbspace opened this issue Jan 15, 2025 · 0 comments
Open

Error loadfailure switching glTF models on low-end devices #4981

enzodbspace opened this issue Jan 15, 2025 · 0 comments

Comments

@enzodbspace
Copy link

Hello. I've been working with model-viewer for some time now, and I like it a lot, so, thank you! : )

Recently, a problem has arisen in a client project: on low-end devices, a loadfailure error occurs when changing the source programmatically. This does not always happen in exactly the same way, nor with all 3D models. But if the model is more complex (lots of triangles) or the device's resources are low, it is almost certain. On desktop it works perfectly, fast, without problems, so I suppose it must be a resource issue.

Using Chrome DevTools to monitor the console of a webpage opened in Chrome on Android, I can see this message:

error: "Aborted(). Build with -sASSERTIONS for more info."

Full info:

Image

This error points to this external resource file: CachingGLTFLoader.js, line 152, inside the function preload, with this comment:

Preloads a glTF, populating the cache. Returns a promise that resolves when the cache is populated.

My main test device are:

  • Android 10 (Moto G7 Play, 2 gb ram, old, I know..) - Chrome, Brave

And other similar ones, borrowed, to rule out cache persistence problems.

I'm changing the model with this line:

modelViewer.setAttribute("src", url);

Model-viewer version 4.0.0.

I have tried several approaches, without much success, like changing modelCacheSize to 1 or 2, powerPreference to low-power, or destroying and regenerating the model-viewer using the new source. The error persists.

Any ideas about this?, or should I assume it may fail on older phones?

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant