Skip to content

Cannot read properties of undefined (reading 'S') Evaluating @react-three/fiber.js #3494

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

Open
qalqi opened this issue Mar 12, 2025 · 8 comments

Comments

@qalqi
Copy link

qalqi commented Mar 12, 2025


Bug Report: @react-three/fiber Canvas Not Working in Expo 52 (Web, iOS, Android)

Description

The Canvas component from @react-three/fiber (version 9.1.0) does not work in Expo 52 across web, iOS, or Android.

Reproduction

I created an [Expo Snack](https://snack.expo.dev/@qalqi/threejs) that demonstrates the issue. The expected behavior is for the Canvas to render a 3D scene, but nothing appears.

Expected Behavior

  • The Canvas should render correctly across all platforms (Web, iOS, and Android).

Actual Behavior

  • The Canvas fails to display any content, with clear error Cannot read properties of undefined (reading 'S') Evaluating @react-three/fiber.js.

Environment

  • Expo SDK: 52
  • @react-three/fiber: 9.1.0
  • Platforms: Web, iOS, Android

Additional Information

  • The issue persists even with basic configurations.
  • Rolling back to an earlier version of @react-three/fiber may resolve the issue (to be tested).
  • Could this be related to Expo's WebGL implementation?

Would appreciate any insights or fixes! 🚀


Image

@ejkkan
Copy link

ejkkan commented Mar 12, 2025

Same error inte NextJS app

@nocodenopain
Copy link

maybe you can use 8.18.0 instead

@simpxlify
Copy link

did you fix it? same error

@asdolo
Copy link

asdolo commented Mar 18, 2025

Same error on desktop with Vite.

@Rengod95
Copy link

any one have been solved? i neeeeeed help

@vvrnck
Copy link

vvrnck commented Mar 19, 2025

Got it working by downgrade to versions 8.18.0 or below:

"@react-three/fiber": "^8.18.0"

@periode
Copy link

periode commented Mar 19, 2025

Also fails with [email protected].

@mzavattaro
Copy link

Same issue here with NextJS 15.3.1 and React 19.1. Works on local dev but if I build a production version, the .glb file does not load and console errors:
Uncaught TypeError: Cannot set properties of undefined (setting 'element')
Uncaught TypeError: Cannot convert undefined or null to object

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

9 participants