401 error loading tiles

Is the retrieval of tiles sessionless or said differently is there some connection state maintained between the unreal app and the cesium servers that might time out? The problem we see is that if our app is running, showing a level with a cesium tileset, but sits idle for some time then when a user tries to interact with it we find the app is sluggish or hangs. In this app we can reload the current level by leaving that level and returning. When we do so the following error is reported for every tile in the scene and there are no tiles showing in the environment:
[error] [Tile.cpp:427] Received status code 401 for tile content
https://assets.cesium.com/1/13/10323/5207.terrain?v=1.2.0&extensions=octvertexnormals-metadata

Reloading the level as described above should unload the cesium actors and reload them, but apparently there are still residual state variables in the game instance itself. The error is unrecoverable until we quit and restart the whole app. Then tiles load normally.

Is there is a technique we should use to “keep alive” the connection or a way to refresh the connection after a long idle period? If so we could avoid the 401 errors and improve the user experience.

Hi @cevanno,

Cesium ion tokens time out after an hour or so, but Cesium for Unreal is supposed to refresh them automatically. It sounds like something may be broken with that process, probably related to Layer.json terrain breaks after Cesium ion token expiration · Issue #551 · CesiumGS/cesium-native · GitHub. Keep an eye on that issue, we should have a fix soon.

Kevin

Is there any internal work happening on this? I grabbed 1.17 from your github since its newer than what is in the marketplace but there are no release notes indicating this issue is addressed and the error is still occurring. Repeating that once the error occurs reloading the level does not fix it. We have to restart the app to fix it.
I am wondering if the refresh that you speak of is a heartbeat initiated from the plugin, or the server?

Is the timeout strictly a clock timeout or is it detecting lack of user interaction? We have not had a person use the app continuously for hours to determine this. If its lack of user interaction maybe a workaround is to get some mouse mover app to try and defeat the cesium detector…but I’m reaching.

Hi @cevanno,

I believe the token times out after 1 hour of real time, after which (due to a bug) the app must be restarted before it will work again. We’re working on a fix, sorry for the delay!

Kevin

Thats great news. Thanks for the update.