mapbox / mapbox/mapbox-gl-js

3D: Error first time loading glb model/vector tile datasource

Open
#12,863 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug :lady_beetle: needs investigation :mag:
Dominant language
TypeScript
Stars
12.4k
Forks
2.4k
PR merge metrics
No merged PRs in 30d

Description

I observe the following error on first time loading https://bertt.github.io/mapbox_3dtiles_samples/samples/standard/trees/#15.97/52.089726/5.126581/0/58 , no trees are drawn.

In this site a glTF model (tree.glb) is visualized using vector tiles datasource.

```
Uncaught TypeError: Failed to construct 'Request': Failed to parse URL from tiles/14/8423/5404.pbf
at 06b1c777-7526-4e7e-ad6c-7f98b3e4bf92:1:10799
at we (06b1c777-7526-4e7e-ad6c-7f98b3e4bf92:1:12630)
at Ee (06b1c777-7526-4e7e-ad6c-7f98b3e4bf92:1:13534)
at 06b1c777-7526-4e7e-ad6c-7f98b3e4bf92:3:286706
at Yb.request (06b1c777-7526-4e7e-ad6c-7f98b3e4bf92:3:286208)
at e.VectorTileWorkerSource.Kb [as loadVectorData] (06b1c777-7526-4e7e-ad6c-7f98b3e4bf92:3:286620)
at e.VectorTileWorkerSource.loadTile (06b1c777-7526-4e7e-ad6c-7f98b3e4bf92:3:821505)
at V.loadTile (06b1c777-7526-4e7e-ad6c-7f98b3e4bf92:3:852309)
at Lb.processTask (06b1c777-7526-4e7e-ad6c-7f98b3e4bf92:3:271083)
at cancelCallbacks..scheduler.add.e.metadata.type (06b1c777-7526-4e7e-ad6c-7f98b3e4bf92:3:270591)
```

After reload the trees from vector tiles are drawn with tree.glb model.

![image](https://github.com/mapbox/mapbox-gl-js/assets/538812/5c4fe207-80c3-4d1c-89b1-4acb4f7a5982)

This sample is using v3.0.0-beta.1

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

Reproduce the linked 3D sample with the vector tiles datasource and tree.glb model, focusing on the first-load request path that produces the relative tiles/14/8423/5404.pbf URL. Compare the initial load with a reload, then verify that the sample draws the trees on first load without the Request URL parsing error.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
computer-graphics, frontend, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.