dotnet/runtime · error · Error

Could not find any object with id ${objectId}

Error message

Could not find any object with id ${objectId}

What it means

Thrown by _get_cfo_res_details() in debug.ts when the objectId (after the dotnet:cfo_res: prefix is added by mono_wasm_get_details) is not in _call_function_res_cache. mono_wasm_get_details is the CDP Runtime.getProperties implementation for cached call-function-on results; it only works on object ids that were previously returned from mono_wasm_call_function_on and cached.

Source

Thrown at src/mono/browser/runtime/debug.ts:285

            subtype: "array",
            className: "Array",
            description: `Array(${fn_res.length})`,
            objectId: fn_res_id
        };
    }
    if (fn_res.value !== undefined || fn_res.subtype !== undefined) {
        return fn_res;
    }

    if (fn_res == proxy)
        return { type: "object", className: "Object", description: "Object", objectId: objId };
    const fn_res_id = _cache_call_function_res(fn_res);
    return { type: "object", className: "Object", description: "Object", objectId: fn_res_id };
}

function _get_cfo_res_details (objectId: string, args: any): ValueAsJsonString {
    if (!(objectId in _call_function_res_cache))
        throw new Error(`Could not find any object with id ${objectId}`);

    const real_obj = _call_function_res_cache[objectId];

    const descriptors = Object.getOwnPropertyDescriptors(real_obj);
    if (args.accessorPropertiesOnly) {
        Object.keys(descriptors).forEach(k => {
            if (descriptors[k].get === undefined)
                Reflect.deleteProperty(descriptors, k);
        });
    }

    const res_details: any[] = [];
    Object.keys(descriptors).forEach(k => {
        let new_obj;
        const prop_desc = descriptors[k];
        if (typeof prop_desc.value == "object") {
            // convert `{value: { type='object', ... }}`
            // to      `{ name: 'foo', value: { type='object', ... }}

View on GitHub (pinned to 290d5ab72c)

Solutions

  1. Only call mono_wasm_get_details on ids returned by a prior mono_wasm_call_function_on in the same page session.
  2. If the object is gone, re-run the originating evaluation to get a fresh id.
  3. Do not release (mono_wasm_release_object) ids you still need to inspect.

Example fix

null
Defensive patterns

Strategy: validation

Validate before calling

null

Type guard

null

Try / catch

try {
  return mono_wasm_get_details(objectId, args);
} catch (e) {
  if (String(e).includes('Could not find any object')) {
    // cache entry gone; caller should re-run the originating evaluation
    return { __value_as_json_string__: '[]' };
  }
  throw e;
}

Prevention

When it happens

Trigger: Calling mono_wasm_get_details(objectId) for an id that was released, never created, or from a previous page load. Expanding an object in DevTools whose backing cache entry no longer exists.

Common situations: Inspecting an object whose group was released between the call and the getProperties. Stale handles across reloads. A custom integration calling mono_wasm_get_details on arbitrary ids.

Related errors


AI-assisted analysis of dotnet/runtime@290d5ab72c (2026-08-06). Data as JSON: /api/errors/89a2191f2addbb3b. Report an issue: GitHub.