cube-js/cube · error · Error

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

Error message

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

What it means

Lifecycle safeguard in disposedProxy's set trap: code is attempting to write a property on a proxy replacing a disposed instance (`name`). Like the get trap, it detects use-after-dispose — a component kept a reference to the instance after cleanup and tried to mutate it.

Source

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

/**
 * 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(
        `Cannot check property existence on ${instanceName}. ` +
        `The '${name}' has been cleaned up and is no longer available.`
      );
    },
    ownKeys(): never {
      throw new Error(

View on GitHub (pinned to 7d981676b3)

Solutions

  1. Locate the stale reference performing the write and remove or re-point it after disposal.
  2. Guard mutation paths so they do not run once the owning instance has been disposed.
  3. Replace the disposed instance through the lifecycle manager before writing to it.
Defensive patterns

Strategy: type-guard

When it happens

Trigger: Thrown at packages/cubejs-backend-shared/src/disposedProxy.ts:14 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/1adf1e99f8d6dc78. Report an issue: GitHub.