Replies: 27 comments 14 replies
-
Same
|
Beta Was this translation helpful? Give feedback.
-
same
|
Beta Was this translation helpful? Give feedback.
-
Facing the same issue:
|
Beta Was this translation helpful? Give feedback.
-
Same for me: |
Beta Was this translation helpful? Give feedback.
-
I also experienced this in a brand new project that I created today. (8/19/24) Is there an older version to fallback to that works? |
Beta Was this translation helpful? Give feedback.
-
Any solution? |
Beta Was this translation helpful? Give feedback.
-
You can wrap canvas content into Suspense like this:
|
Beta Was this translation helpful? Give feedback.
-
experiencing the same thing
|
Beta Was this translation helpful? Give feedback.
-
Same issue |
Beta Was this translation helpful? Give feedback.
-
Same issue, has anyone found out why this is happening? |
Beta Was this translation helpful? Give feedback.
-
Same issue :( |
Beta Was this translation helpful? Give feedback.
-
Same issue |
Beta Was this translation helpful? Give feedback.
-
same issue "three": "^0.171.0", React Native - Android emulator |
Beta Was this translation helpful? Give feedback.
-
same
|
Beta Was this translation helpful? Give feedback.
-
same "@react-three/drei": "^9.120.4",
"@react-three/fiber": "^8.17.10",
"expo-gl": "~15.0.2",
"three": "^0.171.0" |
Beta Was this translation helpful? Give feedback.
-
I tried every solution but none of them worked.
|
Beta Was this translation helpful? Give feedback.
-
Looks like this is still persisting. Has anyone found a work around? |
Beta Was this translation helpful? Give feedback.
-
same |
Beta Was this translation helpful? Give feedback.
-
When downgrading my project to Expo SDK 51 this error disappears. Unfortunately downgrading is not an option for me. |
Beta Was this translation helpful? Give feedback.
-
same problem, in the end I had to use expo-three and expo-gl instead |
Beta Was this translation helpful? Give feedback.
-
developing a small project i ran through the same error, fixed by going on the file node_modules/three/build/three.cjs and on the function "onFirstUse", inside the first if, theres this line of code: const programLog = gl.getProgramInfoLog( program ).trim(); on the "if ( renderer.debug.checkShaderErrors )" i added the "program" property. Now it is "if ( renderer.debug.checkShaderErrors && program )". solved for me |
Beta Was this translation helpful? Give feedback.
-
Is there any updates on this? I've been trying all day to get three.js or react three fiber working in Expo and nothing is working. Seems like its been broken for a while. |
Beta Was this translation helpful? Give feedback.
-
still the problem till now. |
Beta Was this translation helpful? Give feedback.
-
Still a problem, facing this issue on Android devices as well. |
Beta Was this translation helpful? Give feedback.
-
Seens like my answer solved the problem for some people, but created other problems at the same time. For me everything worked pretty well after patching the lib. I'm at work now, but as soon as I get home i will post the lib solution code, and my project code that worked for me. |
Beta Was this translation helpful? Give feedback.
-
Hi everyone, Expo Go doesn’t support three.js or @react-three/fiber/native because it lacks native WebGL support (expo-gl and expo-gl-cpp). That’s why 3D rendering fails or throws GL errors. To fix this, you need to use a custom Expo dev client built with expo-dev-client and EAS. This includes the required native modules to run Three.js properly or continue using web as a emulator. but ether way the deployment will work Best regards Amr Khamis. |
Beta Was this translation helpful? Give feedback.
-
heres the code that worked for me. that's the code I patched on the lib: if ( renderer.debug.checkShaderErrors && program && glVertexShader && glFragmentShader) { this is the three.js object: import { MeshProps, useFrame } from '@react-three/fiber';
import React, { useRef } from 'react';
import {
BufferGeometry,
Material,
Mesh,
NormalBufferAttributes,
Object3DEventMap,
} from 'three';
type Props = {
color: string;
} & MeshProps;
function Cone({ color, rotation, ...rest }: Props) {
const coneMesh =
useRef<
Mesh<
BufferGeometry<NormalBufferAttributes>,
Material | Material[],
Object3DEventMap
>
>(null);
useFrame((_, delta) => {
if (coneMesh.current) {
const xRotation = rotation[0] * (Math.PI / 180);
const yRotation = rotation[1] * (Math.PI / 180);
const zRotation = rotation[2] * (Math.PI / 180);
coneMesh.current.rotation.x += xRotation * delta;
coneMesh.current.rotation.y += yRotation * delta;
coneMesh.current.rotation.z += zRotation * delta;
}
});
return (
<mesh {...rest} scale={1} ref={coneMesh}>
<coneGeometry args={[0.6, 1, 30]} />
<meshStandardMaterial color={color} />
</mesh>
);
}
export default Cone; this is where im rendering the object, the Object3DFactory just return the object above. const { height, width } = useWindowDimensions();
const canvasHeight = (75 / 100) * height;
<Canvas style={{ height: canvasHeight, width }}>
<ambientLight />
<directionalLight position={[5, 5, 5]} />
{objectConfigs.map((objectConfig, index) => (
<React.Fragment key={objectConfig.shape + index}>
{Object3DFactory.create(objectConfig, index)}
</React.Fragment>
))}
</Canvas> this solved it perfectly for me, if this doesn't work for you, try to run the app on an emulator or build it and run on a real device instead of Expo Go. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to run a basic react-native RTF scene, but I'm getting this error in the console 3 times
ERROR TypeError: Cannot read property 'trim' of undefined, js engine: hermes
and also on the screen.I've followed this guide
I have only one page, and here is its content
its one of those 3 lines
https://github.com/mrdoob/three.js/blob/4f067f0f4dc9e81f7fb3484962f2e973f71fab60/src/renderers/webgl/WebGLProgram.js#L923C23-L923C25
Beta Was this translation helpful? Give feedback.
All reactions