Hello,
I have a problem loading the assets when I use Webpack. With cdn and sandcastle, everything is fine. Can you help me how to fix the issue?
Here is the error
“Failed to load model: https://assets.ion.cesium.com/us-east-1/2687385/2/2/1.b3dm?v=1\nFailed to load glTF\nFailed to load vertex buffer”
Here is the link to my code
Thanks in advance
Mohammad
Hi Mohammad,
It looks like the error is due to a mismatched Cesium ion access token and asset ID. But I can verify you are using the same access token and asset ID in the version using the CDN.
I’m thinking this may have to do with the resolve
field in the webpack config. See our recommended webpack config and how it differs slightly.
Alternatively, as a workaround, you could pass in the ion access token directly when creating a 3D tileset. Most of the CesiumJS API will also take a Resource
or IonResource
argument, which allows you to specify the access token to use.
Hope that helps,
Gabby