# GET scene.gltf 404 (Not Found)

**URL:** <https://discourse.threejs.org/t/get-scene-gltf-404-not-found/54575>\
**Category:** Questions\
**Tags:** loaders\
**Created:** [August 2, 2023, 8:33pm UTC](https://discourse.threejs.org/t/get-scene-gltf-404-not-found/54575 "2023-08-02T20:33:42Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wynnyy](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/wynnyy/32/38668_2.png) [@Wynnyy](https://discourse.threejs.org/u/Wynnyy)\
**Post date:** [August 2, 2023, 8:33pm UTC](https://discourse.threejs.org/t/get-scene-gltf-404-not-found/54575/1 "2023-08-02T20:33:42Z")

</div>

Hi guys,  
I tried everything what I found, but nothing happen.  
Here is my GitHub code : [GITHUB CODE](https://github.com/Wynnyy/threeJS/tree/main/ThreeD)

First error is

```javascript
 GET http://127.0.0.1:5500/ThreeD/ThreeD/shiba/scene.gltf 404 (Not Found)
   ProgressEvent {isTrusted: true, lengthComputable: true, loaded: 169, total: 169, type: 'load', …}

```

and when I add back slash behind **ThreeD** here

> loader.load( '/ThreeD/shiba/scene.gltf

got this

```javascript
Uncaught (in promise) ReferenceError: scene is not defined
    at main.js:8:2
    at GLTFLoader.js:119:11
    at GLTFLoader.js:1178:9

```

do you know where is probably problem ?

---

<div class="post-metadata">

**Author:** ![makc3d](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/makc3d/32/10452_2.png) [@makc3d](https://discourse.threejs.org/u/makc3d)\
**Post date:** [August 2, 2023, 9:53pm UTC](https://discourse.threejs.org/t/get-scene-gltf-404-not-found/54575/2 "2023-08-02T21:53:34Z")

</div>

> [@Wynnyy](#):
>
> where is probably problem ?

 ![Screenshot 2023-08-02 at 23-52-55 GET scene.gltf 404 (Not Found) - Questions - three.js forum](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/e/8/e80a680fed5292117881fd4236747cebf09d1d69.png)

---

<div class="post-metadata">

**Author:** ![Wynnyy](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/wynnyy/32/38668_2.png) [@Wynnyy](https://discourse.threejs.org/u/Wynnyy)\
**Post date:** [August 2, 2023, 10:04pm UTC](https://discourse.threejs.org/t/get-scene-gltf-404-not-found/54575/3 "2023-08-02T22:04:51Z")

</div>

this is not solution, if I remove that endpoint ThreeD, have same problem

for example without ThreeD when I use **“/shiba/scene.gltf”**

```javascript
three.js:20044 GET http://127.0.0.1:5500/shiba/scene.gltf 404 (Not Found)
load @ three.js:20044
load @ GLTFLoader.js:116
(anonymous) @ main.js:6
main.js:12 ProgressEvent {isTrusted: true, lengthComputable: true, loaded: 155, total: 155, type: 'load', …}

```

I tried rewrite code to

```javascript
const loader = new GLTFLoader();
var scene = new THREE.Scene();
loader.load( 'shiba/scene.gltf', function ( gltf ) {

	scene.add( gltf.scene );

}, undefined, function ( error ) {

	console.error( error );

} );

```

add scene because wasn’t defined,now I don’t have any error, but nothing appear on my screen.

---

<div class="post-metadata">

**Author:** ![Wynnyy](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/wynnyy/32/38668_2.png) [@Wynnyy](https://discourse.threejs.org/u/Wynnyy)\
**Post date:** [August 3, 2023, 8:34am UTC](https://discourse.threejs.org/t/get-scene-gltf-404-not-found/54575/4 "2023-08-03T08:34:25Z")

</div>

I fix this solution by this code  
anyway, always I have to add camera background screen and render ?

```javascript
import * as THREE from 'https://cdn.skypack.dev/three@0.129.0/build/three.module.js';
import { GLTFLoader } from 'https://cdn.skypack.dev/three@0.129.0/examples/jsm/loaders/GLTFLoader.js';

const loader = new GLTFLoader();
var scene = new THREE.Scene();
var camera = new THREE.PerspectiveCamera( 25, window.innerWidth / window.innerHeight, 1, 20000 );
camera.position.set( 1, 1, 20 );
var renderer = new THREE.WebGLRenderer({ alpha: false });
renderer.setClearColor( 0xC5C5C3 );
renderer.setPixelRatio( window.devicePixelRatio );
renderer.setSize(window.innerWidth, window.innerHeight);
document.body.appendChild(renderer.domElement);

loader.load( 'shiba/scene.gltf', function ( gltf ) {
	gltf.scene.scale.set( 1, 1, 1 );			   
	gltf.scene.position.x = 0; //Position (x = right+ left-) 
    gltf.scene.position.y = 0; //Position (y = up+, down-)
	gltf.scene.position.z = 0;		
	scene.add( gltf.scene );
	
	

}, undefined, function ( error ) {

	console.error( error );

} );

function animate() {
	render();
	requestAnimationFrame( animate );
	}

function render() {
	renderer.render( scene, camera );
	}

render();
animate();

```

---

<div class="post-metadata">

**Author:** ![makc3d](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/makc3d/32/10452_2.png) [@makc3d](https://discourse.threejs.org/u/makc3d)\
**Post date:** [August 3, 2023, 9:19am UTC](https://discourse.threejs.org/t/get-scene-gltf-404-not-found/54575/5 "2023-08-03T09:19:30Z")

</div>

> [@Wynnyy](#):
>
> always I have to add camera background screen and render ?

that is easy to test - do not add it, and observe the result - if it turns out not the way you wanted it - then yes, you had to add it.

---

<div class="post-metadata">

**Author:** ![Wynnyy](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/wynnyy/32/38668_2.png) [@Wynnyy](https://discourse.threejs.org/u/Wynnyy)\
**Post date:** [August 3, 2023, 10:08am UTC](https://discourse.threejs.org/t/get-scene-gltf-404-not-found/54575/6 "2023-08-03T10:08:17Z")

</div>

yap, anyway thanks @makc3d
