aframevr / aframevr/aframe

GLTF loader doesn't handle errors properly

Open
#3,237 11 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
17.6k
Forks
4.4k
PR merge metrics
No merged PRs in 30d

Description

When you download a file, at least on mac, by default the disk permissions of an unzipped directory is 700 instead of 755. This will give you a 403 error if you try to load it via a local webserver. However, when using the GLTF loader the console never shows this 403 error. Instead you just get a timeout.

Looking at the code to the GLTF loader:

https://github.com/aframevr/aframe/blob/master/src/components/gltf-model.js

The error handling code is not printing the error message to the console. I'm not sure it's even being called. Does 'warn' need to be upgraded to something stronger?

Also, by default, the model is only visible below the user. Is it being placed at 0,0,0? It's not clear how to move it once loaded.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/components/gltf-model.js and reproduce the 403 response from a local webserver using an unreadable unzipped model directory. Trace the loader's error callback and verify how model positioning is documented or handled. Done means the loading failure is surfaced clearly and the model-placement question has an explicit, tested outcome.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.