mapbox-maps-ios icon indicating copy to clipboard operation
mapbox-maps-ios copied to clipboard

Unknown model file type, if uri has query: `.../sportcar.glb?hash=...`

Open mfazekas opened this issue 2 years ago • 0 comments

Environment

  • Xcode version: 14.3.1
  • iOS version: 16.4
  • Devices affected: all - tested on Simulator iPhone 14
  • Maps SDK Version: 11.0.0-rc.2

Observed behavior and steps to reproduce

I'm getting an error about identifying model file type when the uri has a query:

2023-11-29 11:55:11.716137+0100 RNMapboxGLExample[40604:15486260] [Mapbox] [Error, maps-core]: {}[General]: Unknown model file type: http://localhost:8081/assets/src/assets/sportcar.glb?platform=ios&hash=1357e77512d0025b300817f35c032422

To reproduce apply this change to ModelLayerExample in the Mapbox-maps-ios example app:

- static let duck = "https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Models/master/2.0/Duck/glTF-Embedded/Duck.gltf"
+ static let duck = "https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Models/master/2.0/Duck/glTF-Embedded/Duck.gltf?foo"

I'm getting

2023-11-29 12:02:26.767027+0100 Examples[41114:15498280] [Mapbox] [Error, maps-core]: {}[General]: Unknown model file type: https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Models/master/2.0/Duck/glTF-Embedded/Duck.gltf?foo

Expected behavior

File extension testing should ignore the query part of the uri

Notes / preliminary analysis

Additional links and references

mfazekas avatar Nov 29 '23 11:11 mfazekas