cube-js/cube · error · Error

Cannot access property '${String(prop)}' on ${instanceName}.

Error message

Cannot access property '${String(prop)}' on ${instanceName}. The '${name}' has been cleaned up and is no longer available.

What it means

Lifecycle safeguard in disposedProxy's get trap: code is accessing a property on a proxy that stands in for a service instance (named `name`) after that instance has been disposed/cleaned up. It is a deliberate dangling-reference detector, not a data error — it reveals a use-after-dispose bug in shutdown or restart code paths.

Source

Thrown at packages/cubejs-backend-shared/src/disposedProxy.ts:8

/**
 * Creates a proxy object that throws an error on any property access.
 * Used as a safeguard after disposal to catch dangling references.
 */
export function disposedProxy(name: string, instanceName: string): any {
  return new Proxy({}, {
    get(_target: object, prop: string | symbol): never {
      throw new Error(
        `Cannot access property '${String(prop)}' on ${instanceName}. ` +
        `The '${name}' has been cleaned up and is no longer available.`
      );
    },
    set(_target: object, prop: string | symbol): never {
      throw new Error(
        `Cannot set property '${String(prop)}' on ${instanceName}. ` +
        `The '${name}' has been cleaned up and is no longer available.`
      );
    },
    apply(): never {
      throw new Error(
        `Cannot call method on ${instanceName}. ` +
        `The '${name}' has been cleaned up and is no longer available.`
      );
    },
    has(_target: object, _prop: string | symbol): never {
      throw new Error(

View on GitHub (pinned to 7d981676b3)

Solutions

  1. Find the code holding a stale reference to the disposed instance and stop using it after disposal.
  2. Ensure async operations complete (or are cancelled) before the instance is disposed.
  3. Recreate or re-resolve the instance through the proper lifecycle manager instead of caching the old reference.
Defensive patterns

Strategy: type-guard

When it happens

Trigger: Thrown at packages/cubejs-backend-shared/src/disposedProxy.ts:8 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of cube-js/cube@7d981676b3 (2026-09-02). Data as JSON: /api/errors/f73de1e11c744815. Report an issue: GitHub.