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

Model Viewer fails to load on some older devices #4986

Open
LuisBoto opened this issue Jan 24, 2025 · 7 comments
Open

Model Viewer fails to load on some older devices #4986

LuisBoto opened this issue Jan 24, 2025 · 7 comments

Comments

@LuisBoto
Copy link

When trying to load model viewer on some old or low end devices (tried an old laptop with intel graphics, a colleague also reported the same behaviour on their 2014 mac, among others) the ARRenderer class fails with an error:

Uncaught TypeError: this.threeRenderer is undefined

Which seems to come from line:

this.threeRenderer.xr.enabled = true;



Could be related to #4972 as the error looks similar. Nothing displays on the page at all after it fails, and the machines I tested seem able to run threeJS just fine otherwise. I managed to reproduce the error on my setup by using a small win7 container using the dockurr/windows Docker image.

@mohammadbaghaei
Copy link

Hi, what browser and what versions did you test with?

@NicoPennec
Copy link

NicoPennec commented Jan 30, 2025

I am encountering the same issue according to my Sentry crash logs across various browsers:

  • Safari 14.1.2
  • Firefox 134.0
  • Chrome 109.0.0, 116.0.0, 125.0.0, 131.0.0, 132.0.0

The stack trace:

TypeError: Cannot read properties of undefined (reading 'xr')

Error: Error creating WebGL context.

THREE.WebGLRenderer: Error creating WebGL context.

THREE.WebGLRenderer: A WebGL context could not be created. Reason:  Failed to create a WebGL2 context.

My npm dependencies are:

    "@google/model-viewer": "4.0.0",
    "three": "0.172.0",

@mohammadbaghaei
Copy link

@NicoPennec

Hi there

Some features are only available over HTTPS. If your page is hosted over HTTP, that might be the issue.

@NicoPennec
Copy link

@mohammadbaghaei I checked the crash logs, and all the pages are in HTTPS.

@mohammadbaghaei
Copy link

mohammadbaghaei commented Feb 1, 2025

@NicoPennec
I just tested this on:

  • Xiaomi 12x 📱
  • Galaxy S24 Ultra 📱
  • Galaxy A23 & A15 📱

Everything works smoothly on these devices! ✔️
Could you check if Google Play Services for AR is pre-installed on your test devices?

@NicoPennec
Copy link

@mohammadbaghaei Thanks for the test, but the issue is on desktop only as explained @LuisBoto, not on android devices.

In my users crash logs, I can see Windows >= 10 and Mac OS X >=10.15.7.

@LuisBoto
Copy link
Author

LuisBoto commented Feb 3, 2025

@mohammadbaghaei Thanks for the test, but the issue is on desktop only as explained @LuisBoto, not on android devices.

In my users crash logs, I can see Windows >= 10 and Mac OS X >=10.15.7.

Indeed, as @NicoPennec points out this seems to be mostly a Desktop issue. So far I haven't been able to reproduce the error on mobile devices.

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

3 participants