egametang/ET · error · RpcException

location get failed key: {key} error: {response.Error} messa

Error message

location get failed key: {key} error: {response.Error} message: {response.Message}

What it means

Get received an error from the location server that is neither ERR_Success nor ERR_LocationGetRetry — a terminal, unrecoverable failure. CallPrimaryWithRetry already exhausted its internal retry budget for primary-failover errors, so this is the final error returned. The RpcException wraps the specific server error code and message.

Source

Thrown at Packages/cn.etetet.actorlocation/Scripts/Hotfix/Server/LocationProxyComponentSystem.cs:421

                    int delayMs = self.locationRequestRetryIntervalMs * retryCount;
                    if (delayMs <= 0)
                    {
                        delayMs = 1;
                    }

                    Scene root = self.Root();
                    EntityRef<Scene> rootRef = root;
                    await root.TimerComponent.WaitAsync(delayMs);
                    root = rootRef;
                    if (root == null)
                    {
                        throw new Exception("location proxy root disposed");
                    }
                    continue;
                }

                throw new RpcException(response.Error,
                    $"location get failed key: {key} error: {response.Error} message: {response.Message}");
            }
        }

        public static async ETTask AddLocation(this Entity self, int type)
        {
            await self.Root().GetComponent<LocationProxyComponent>().Add(type, self.Id, self.GetActorId());
        }

        public static async ETTask RemoveLocation(this Entity self, int type)
        {
            await self.Root().GetComponent<LocationProxyComponent>().Remove(type, self.Id, self.GetActorId());
        }
    }
}

View on GitHub (pinned to 5cab01f7a8)

Solutions

  1. Check location server process health and database connectivity.
  2. Verify the proxy and location server run compatible code versions.
  3. Catch RpcException and inspect response.Error and response.Message for the specific server-side failure code.
  4. Verify service discovery returns healthy Location scenes (GetPrimaryLocationSceneName depends on ServiceDiscoveryProxy).
Defensive patterns

Strategy: try-catch

Try / catch

try
{
    ActorId id = await proxy.Get(type, key);
}
catch (RpcException e)
{
    Log.Error($"location get terminal failure key={key} error={e.Error} msg={e.Message}");
    // surface to caller or implement fallback
    throw;
}

Prevention

When it happens

Trigger: Get(type, key) where the location server returns a database error, internal corruption, ERR_LocationPrimaryUnavailable (all primaries down), or an unrecognized error code that isn't the retryable LocationGetRetry.

Common situations: Location server database connectivity failure. Location server process crash with no healthy failover primary. Version mismatch between proxy and server introducing unrecognized error codes. Corrupt location data in the DB.

Related errors


AI-assisted analysis of egametang/ET@5cab01f7a8 (2026-08-13). Data as JSON: /api/errors/3ff6733347ae68e5. Report an issue: GitHub.