Detect Received status code 4xx for tile content?

Hi, we’ve been receiving some reports from users where parts of the Google 3d tileset won’t load. I’m guessing their session is expiring. I’ve been able to reproduce the issue in editor by leaving Unity in play mode for a few hours. I get the following log in the console when attempting to navigate:

[TilesetJsonLoader.cpp:889] Received status code 400 for tile content https://tile.googleapis.com/v1/3dtiles/datasets/CgA/files/UlRPVEYu

That originates here cesium-native/Cesium3DTilesSelection/src/TilesetJsonLoader.cpp at 544b2b3c108bec58b29f897da0a1e30600ae1e3a · CesiumGS/cesium-native · GitHub (different line number than my log because we are on a fork)

I found this related post: [TilesetJsonLoader.cpp:810] Received status code 429 for tile content - #9 by Kevin_Ring

But if individual tiles are failing with a 429, that’s not going to help. I don’t think there’s currently any way to be notified of those errors from the cesium-unreal side. It will require a change to cesium-native.

I’m looking for a way detect this error in Unity and act on it by manually reloading the tileset. I found OnCesium3DTilesetLoadFailure but I worry that the caveat about individual tiles also applies here.

Hi @WooorldPaul,

Thanks for the detailed write-up! It sounds like you’re running into the problem described in the Github issue below.

Basically, root tile requests for Google Photorealistic 3D Tiles will expire after 3 hours. If your users are running their applications beyond that time, then it’s not surprising that their requests are failing.

Unfortunately, we don’t have an official answer for how we would handle this. But I’ll borrow a potential solution that @Kevin_Ring wrote on that issue:

One option, for example, is to do a full tileset refresh (unload everything and start over) whenever we see a 403 and its either not a Cesium ion tileset, or the normal Cesium ion token refresh procedure doesn’t work. But there are probably better options.

This might be a good start while we investigate other options. If you try to implement this, let us know how it goes!