Request Timeout only in Unity

I’ve been seeing an odd error since last Thursday when I try to use the Cesium plugin for Unity. The trace runs deep into interop and stops making sense very quickly.

Exception: Request for `https://api.cesium.com/appData` failed: Request timeout
UnityEngine.Debug:LogError (object)
Reinterop.ReinteropInitializer:UnityEngine_Debug_CallLogError_FA05wu8x__otZNsgdHTnU9A (intptr) (at Library/PackageCache/com.cesium.unity@1.14.1/Editor/generated/Reinterop.RoslynSourceGenerator/ReinteropInitializer.cs:6463)
CesiumForUnity.CesiumIonSession:Tick () (at Library/PackageCache/com.cesium.unity@1.14.1/Editor/generated/Reinterop.RoslynSourceGenerator/CesiumIonSession-generated.cs:582)
CesiumForUnity.CesiumEditorUtility:UpdateIonSession () (at Library/PackageCache/com.cesium.unity@1.14.1/Editor/CesiumEditorUtility.cs:26)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()

I have tried a new project with the same effect and a new version of the editor with the same effect. Cesium for Unreal works fine on the same computer.

Here’s the same error in Unity 6 with the 1.24 plugin

Exception while resuming Cesium ion connection: Failed to obtain _appData, can't resume connection
UnityEngine.Debug:LogError (object)
Reinterop.ReinteropInitializer:UnityEngine_Debug_CallLogError_FA05wu8x__otZNsgdHTnU9A (intptr,intptr*) (at ./Library/PackageCache/com.cesium.unity@875D0B042C31/Source/generated/Reinterop.RoslynSourceGenerator/ReinteropInitializer.cs:168857)
CesiumForUnity.CesiumIonSession:Tick () (at ./Library/PackageCache/com.cesium.unity@875D0B042C31/Source/generated/Reinterop.RoslynSourceGenerator/CesiumIonSession-generated.cs:695)
CesiumForUnity.CesiumEditorUtility:UpdateIonSession () (at ./Library/PackageCache/com.cesium.unity@875D0B042C31/Source/Editor/CesiumEditorUtility.cs:27)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()

Hi @wtanis,

Thanks for the detailed traces, and for already testing new projects, editor versions, and both plugin versions.

Some context on what you’re seeing: before connecting (or resuming a session), the plugin requests https://api.cesium.com/appData to learn the server’s authentication mode. When that request fails, the connect flow stops before the sign-in URL is ever generated. That’s why the URL field in the connect panel is empty, and clicking “open web browser again” ends up opening File Explorer (on Windows, opening an empty URL falls back to Explorer). So all of the weirdness you’re seeing I think is caused by HTTPS requests from the Unity Editor to api.cesium.com timing out.

The interesting part is that Cesium for Unreal works on the same machine. Cesium for Unity sends all its HTTP traffic through Unity’s own networking stack (UnityWebRequest), while Cesium for Unreal uses Unreal’s HTTP stack. So something on your machine or network appears to be blocking or intercepting traffic from the Unity Editor specifically. Since this started abruptly last Thursday (I assumed you were using Unity X Cesium before this, please let me know if this was the first time you used the unity plugin) and reproduces across projects and versions, I suspect an environment change (firewall or antivirus update, proxy or VPN policy change, etc.) rather than a plugin bug.

A few things that would help narrow it down:

  1. Run this snippet in your project (drop it in an Editor folder, then Tools > Test Cesium Connectivity). It makes the same request the plugin makes, but with no Cesium code involved, so it tells us whether the problem is Unity’s networking in general or something plugin-specific:
using UnityEditor;
using UnityEngine;
using UnityEngine.Networking;

public static class CesiumNetworkTest
{
    [MenuItem("Tools/Test Cesium Connectivity")]
    public static void Test()
    {
        UnityWebRequest request = UnityWebRequest.Get("https://api.cesium.com/appData");
        UnityWebRequestAsyncOperation op = request.SendWebRequest();
        op.completed += _ =>
        {
            Debug.Log($"Result: {request.result}, HTTP {request.responseCode}, error: {request.error}");
            Debug.Log(request.downloadHandler.text);
            request.Dispose();
        };
    }
}
  1. If that times out too, try the same thing while connected to a different network (a phone hotspot works well). If it succeeds there, the cause is network-level filtering rather than the machine itself.

  2. Are you on a corporate network or using a proxy/VPN? UnityWebRequest picks up Windows system proxy settings, and authenticated proxies or TLS inspection can cause exactly this kind of silent timeout while other apps keep working.

  3. It’s also worth checking whether Windows Firewall or your antivirus has a per-app rule for Unity.exe. A security software update last week could have added one.

If you could confirm if the plugin was working fine in Unity Previously that would be great. You could also try rolling back to an even older version of the plugin as a troubleshooting step.

Let me know if that helps!

Darcy,

Thank you for the information! I traced the problem to some legacy configuration data. Our proxy setup recently migrated and it appears that Unreal was correctly pulling the Windows proxy settings, but Unity was prioritizing the legacy HTTPS_PROXY environment variable. The code snippet you provided was exactly what I needed to find it.

Wes