{"record":{"id":"d27e42278bd34877","repo":"emberjs/ember.js","slug":"object-keys-was-called-on-the-positional-argumen","errorCode":null,"errorMessage":"Object.keys() was called on the positional arguments array for a ${type}, which is not supported. This function is a low-level function that should not need to be called for positional argument arrays. You may be attempting to iterate over the array using for...in instead of for...of.","messagePattern":"Object\\.keys\\(\\) was called on the positional arguments array for a (.+?), which is not supported\\. This function is a low-level function that should not need to be called for positional argument arrays\\. You may be attempting to iterate over the array using for\\.\\.\\.in instead of for\\.\\.\\.of\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/@glimmer/manager/lib/util/args-proxy.ts","lineNumber":165,"sourceCode":"\n  const namedHandler = new NamedArgsProxy(named);\n  const positionalHandler = new PositionalArgsProxy(positional);\n\n  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n  const namedTarget = Object.create(null);\n  const positionalTarget: unknown[] = [];\n\n  if (DEBUG) {\n    const setHandler = function (_target: unknown, prop: symbol | string | number): never {\n      throw new Error(\n        `You attempted to set ${String(\n          prop\n        )} on the arguments of a component, helper, or modifier. Arguments are immutable and cannot be updated directly; they always represent the values that are passed down. If you want to set default values, you should use a getter and local tracked state instead.`\n      );\n    };\n\n    const forInDebugHandler = (): never => {\n      throw new Error(\n        `Object.keys() was called on the positional arguments array for a ${type}, which is not supported. This function is a low-level function that should not need to be called for positional argument arrays. You may be attempting to iterate over the array using for...in instead of for...of.`\n      );\n    };\n\n    namedHandler.set = setHandler;\n    positionalHandler.set = setHandler;\n    positionalHandler.ownKeys = forInDebugHandler;\n  }\n\n  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n  const namedProxy = new Proxy(namedTarget, namedHandler);\n  const positionalProxy = new Proxy(positionalTarget, positionalHandler);\n\n  // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n  setCustomTagFor(namedProxy, getNamedTag);\n  setCustomTagFor(positionalProxy, getPositionalTag);\n\n  return {","sourceCodeStart":147,"sourceCodeEnd":183,"githubUrl":"https://github.com/emberjs/ember.js/blob/26f97246a8bf2e28edf26ac3093da2e86c04ffc5/packages/@glimmer/manager/lib/util/args-proxy.ts#L147-L183","documentation":"Error \"Object.keys() was called on the positional arguments array for a ${type}, which is not supported. This function is a low-level function that should not need to be called for positional argument arrays. You may be attempting to iterate over the array using for...in instead of for...of.\" thrown in emberjs/ember.js.","triggerScenarios":"Thrown at packages/@glimmer/manager/lib/util/args-proxy.ts:165 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"26f97246a8bf2e28edf26ac3093da2e86c04ffc5","analyzedAt":"2026-09-01T05:01:28.182Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}