I use the google 3d tiles and when I run my app in the editor or build the tiles are loaded normally. But after a while I get spammed with log mesages like this:
[error] [TilesetContentManager.cpp:1049] An unexpected error occurs when loading tile: Request for https://tile.googleapis.com/v1/3dtiles/datasets/CgA/files/....
failed: Unable to complete SSL connection
And then the tiles are no longer updated.
Restartiing playmode does not fix the problem.
I need to close the unity editor and restart it. Builds I have to restart.
Then the tiles are loading normal again, for a while.
But this error always returns!
This are the components settings, mostly standard…
Sometimes the error message differs:
[error] [TilesetContentManager.cpp:1049] An unexpected error occurs when loading tile: Request for https://tile.googleapis.com/v1/3dtiles/datasets/CgA/files/...
failed: Cannot resolve destination host
@krumelmonster that sounds on the surface like a problem with your system or network. Perhaps you can narrow it down by trying a different device on the same network, or using a different network entirely?
I tried two diffrent networks so far, same result.
And if my network would be the issue, why does restarting the editor fix it?
My guess is, that that with one connection, there is a tile download limit or something like that. And google/cesuim rejects further requests.
In the editor I also are not connected zu cesium anymore. But trying to connect also throws an error (I wirite it here when it occurs the next time)
How long does it take for this to start happening? I believe the Google token will time out eventually (on the order of hours), but you should see 401 errors when that happens, not “Unable to complete SSL connection” and “Cannot resolve destination host”. There’s no tile limit that I’m aware of, and in any case Google generally returns 429 errors when rate limit problems occur. Your errors definitely sound more like a broken network connection. Restarting may solve the problem simply by creating a brand new connection to the Google server. Next time it happens, you could try clicking Refresh Tileset (in the Editor) or calling the RefreshTileset method (in a game) and see if that makes it start working again, too.
In the editor I also are not connected zu cesium anymore. But trying to connect also throws an error (I wirite it here when it occurs the next time)
Sorry I don’t understand what you mean here.
When the bug happens, the connection to cesium is also gone. When I click on “Connect to Cesium Ion” I get the error:
"Exception: Request for https://api.cesium.com/appData
failed: Cannot resolve destination host "
in the editor console.
Yes, I am getting same issue. I just put our product live and Cesium tiles keep failing to load after a little while in the game. Many users reporting the issue. I get these errors:
[2024-09-19 12:26:36.078] [error] [SqliteCache.cpp:412] database is locked
UnityEngine.Debug:Log (object)
Reinterop.ReinteropInitializer:UnityEngine_Debug_CallLog_FA05wu8x__otZNsgdHTnU9A (intptr) (at ./Library/PackageCache/com.cesium.unity@1.12.0/Runtime/generated/Reinterop.RoslynSourceGenerator/ReinteropInitializer.cs:61505)
[2024-09-19 12:26:36.108] [error] [TilesetContentManager.cpp:888] An unexpected error occurred when loading tile: Request for https://assets.ion.cesium.com/us-east-1/asset_depot/1/CesiumWorldTerrain/v1.2/layer.json
failed: Cannot resolve destination host
UnityEngine.Debug:Log (object)
Reinterop.ReinteropInitializer:UnityEngine_Debug_CallLog_FA05wu8x__otZNsgdHTnU9A (intptr) (at ./Library/PackageCache/com.cesium.unity@1.12.0/Runtime/generated/Reinterop.RoslynSourceGenerator/ReinteropInitializer.cs:61505)
CesiumForUnity.Cesium3DTileset:Update () (at ./Library/PackageCache/com.cesium.unity@1.12.0/Runtime/generated/Reinterop.RoslynSourceGenerator/Cesium3DTileset-generated.cs:606)
I’m afraid I don’t know what might cause that. Cesium for Unity uses UnityWebRequest to do HTTP requests. If that class suddenly becomes unable to resolve a hostname that should be working, and it’s not a problem with your network or system, then I would have to suspect some kind of bug in Unity itself. I can’t think of what we could do on the Cesium for Unity side that could cause that.
I think we’ll need your help to track this down. Perhaps by providing detailed instructions for reliably reproducing it ourselves? Or by narrowing down its cause further by thoroughly investigating the state of the system while it’s not working. For example, is Unity able to make other non-Cesium requests successfully once it’s in this broken state?
The “database is locked” errors are probably unrelated. That’s usually caused by running two copies of the game from the same directory. A common scenario is sharing a game on a network drive, and running it directly from the network drive on two systems simultaneously. In some cases, it can also be caused by running the Editor and a built game simultaneously. In any case, it shouldn’t be fatal. Performance may be reduced because the request cache is inoperable, but nothing should break otherwise.
Hum, yeah. Unity fails to make any connection to the internet after these error start occurring. So it not just a Cesium issue. It seems to occur when large amounts of web requests are being made a the same time. I found a bug on the Unity Issue Tracker that seems to be the same problem: Unity Issue Tracker - "Unable to complete SSL connection" exceptions are thrown and connection fails when a large amount of WebRequests are made. Please everyone upvote this issue and report it so Unity will fix it. This is really effecting our customers.
I wonder, is there a way to slow down the Cesium web requests being made as to reduce the risk of this occurring?
1 Like
Good find @5DRealities, I’ve upvoted it!
I wonder, is there a way to slow down the Cesium web requests being made as to reduce the risk of this occurring?
Yes, set maximumSimultaneousTileLoads
on Cesium3DTileset or CesiumRasterOverlay to a lower number. This is likely to increase load time, of course.
Man, this is annoying! Unity marked the bug as by design…!? What the. How do we go about getting Unity to fix this issue? I just spent the last weeks upgrading to the latest version of Unity and now I have to find a way to install a pervious version 6 month ago in-order to get rid of this issue? Is there a way you can call Unity or something lol. https://issuetracker.unity3d.com/issues/unable-to-complete-ssl-connection-exceptions-are-thrown-and-connection-fails-when-a-large-amount-of-webrequests-are-made
Also found this thread on the topic: SSL Connection Issues After Upgrading to Unity 6, Resolved by Downgrading to Unity 2021.3.30 - Unity Engine - Unity Discussions
After reading the Unity issues and the forum topic I reduced “Maximum Simultaneous Tile Loads” to 8.
It seam better then, aka after 10 minutes app use, no connection problems. But loading is really slow?
Yeah, I can confirm. The issue doesn’t occur when I set the “Max Simultaneous Tile Loads” to 8. Anything over that the SSL errors occur eventually. Although loading 8 at a time is too slow for the terrain to load in.
Maybe you can all chime in and make sure Unity hears our complaints on this thread: SSL Connection Issues After Upgrading to Unity 6, Resolved by Downgrading to Unity 2021.3.30 - #11 by MartinTilo - Unity Engine - Unity Discussions
I (joeysipos) made my complaints clear near the bottom of the thread lol.
I’m not sure how much pull we have with Unity, but I will chime in on that issue as well. Ultimately, if Unity refuse to fix it, we may have to implement our own libcurl-based network request system, rather than using UnityWebRequest.
Update: well, I would post, except it keeps timing out. Perhaps the Unity forum uses UnityWebRequest too? 
You could move away from UnityWebRequest. There are a lot of alternative solutions out there
That issue makes it sound like they’ve already fixed it! 
The Bug will be fixed in Unity 6000.0.25
1 Like