BabylonJS/Babylon.js · error

Path ${path} is invalid

Error message

Path ${path} is invalid

What it means

InteractivityAssetPathToObjectConverter resolves virtual KHR_interactivity pointers for asset capabilities and runtime limits. For `/extensions/KHR_interactivity/limits/<NAME>`, the name must be one of the RuntimeLimits keys (maxActiveAnimations, maxActiveDelays, maxActivePropertyInterpolations, maxActiveVariableInterpolations). An unknown limit name is rejected with this error.

Source

Thrown at packages/dev/loaders/src/glTF/2.0/Extensions/interactivityAssetPathToObjectConverter.ts:93

     * by this loader
     */
    public constructor(
        private _gltf: IGLTF,
        private _isExtensionEnabled: (name: string) => boolean
    ) {}

    /**
     * @param path the JSON Pointer to resolve
     * @returns an object accessor for the addressed capability
     * @throws if the path does not address a known capability, which `pointer/get` surfaces as `isValid = false`
     */
    public convert(path: string): IObjectInfo<IObjectAccessor> {
        const normalized = path.endsWith("/") ? path.slice(0, -1) : path;

        if (normalized.startsWith(InteractivityLimitsPrefix)) {
            const limit = RuntimeLimits[normalized.substring(InteractivityLimitsPrefix.length)];
            if (limit === undefined) {
                throw new Error(`Path ${path} is invalid`);
            }
            return this._createAccessor("number", () => limit);
        }

        const capability = normalized.substring(InteractivityAssetCapabilitiesPrefix.length);
        if (capability === "majorVersion" || capability === "minorVersion") {
            return this._createAccessor("number", () => GetEffectiveGltfVersion(this._gltf.asset?.version)[capability === "majorVersion" ? "major" : "minor"]);
        }

        // `extensions/<EXTENSION_NAME>/enabled`. The extension name itself may not contain a slash.
        const segments = capability.split("/");
        if (segments.length === 3 && segments[0] === "extensions" && segments[2] === "enabled") {
            const extensionName = segments[1];
            return this._createAccessor("boolean", () => this._isExtensionEnabled(extensionName));
        }

        throw new Error(`Path ${path} is invalid`);
    }

View on GitHub (pinned to 0592b347b8)

Solutions

  1. Use one of the supported limit names: maxActiveAnimations, maxActiveDelays, maxActivePropertyInterpolations, maxActiveVariableInterpolations
  2. Fix typos in the limit pointer inside the interactivity JSON
  3. Check the KHR_interactivity spec §4.2 and confirm Babylon supports that limit; upgrade Babylon.js if it is newer
  4. Note trailing `/` is tolerated (normalized away), so the issue is the limit name itself

Example fix

// before
pointer = "/extensions/KHR_interactivity/limits/maxNodes";
// after
pointer = "/extensions/KHR_interactivity/limits/maxActiveAnimations";
Defensive patterns

Strategy: validation

Validate before calling

const KNOWN_LIMITS = ["maxActiveAnimations", "maxActiveDelays", "maxActivePropertyInterpolations", "maxActiveVariableInterpolations"];
function isKnownLimitPointer(path: string): boolean {
    const prefix = "/extensions/KHR_interactivity/limits/";
    return path.startsWith(prefix) && KNOWN_LIMITS.includes(path.slice(prefix.length).replace(/\/$/, ""));
}

Type guard

function isSupportedRuntimeLimit(name: string): name is "maxActiveAnimations" | "maxActiveDelays" | "maxActivePropertyInterpolations" | "maxActiveVariableInterpolations" {
    return ["maxActiveAnimations", "maxActiveDelays", "maxActivePropertyInterpolations", "maxActiveVariableInterpolations"].includes(name);
}

Try / catch

try {
    accessor = interactivityConverter.convert(path);
} catch (e) {
    if (String(e.message).includes("is invalid")) {
        accessor = interactivityConverter.convert("/extensions/KHR_interactivity/limits/maxActiveAnimations"); // conservative default
    } else throw e;
}

Prevention

When it happens

Trigger: A behavior graph reads a runtime-limit pointer whose name is not in the RuntimeLimits table, e.g. `/extensions/KHR_interactivity/limits/maxBones` or a misspelled `/extensions/KHR_interactivity/limits/maxActiveAnimation`.

Common situations: Asset authored against another implementation's limit names; typo in the limit pointer; spec revision adding limits this Babylon version doesn't know.

Related errors


AI-assisted analysis of BabylonJS/Babylon.js@0592b347b8 (2026-08-30). Data as JSON: /api/errors/2759a9cf12d71e2c. Report an issue: GitHub.