{"record":{"id":"46746aa6ea72c9b0","repo":"emberjs/ember.js","slug":"bug-owner-is-missing-renderer","errorCode":null,"errorMessage":"BUG: owner is missing renderer","messagePattern":"BUG: owner is missing renderer","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/@ember/debug/lib/capture-render-tree.ts","lineNumber":25,"sourceCode":"*/\n/**\n  Ember Inspector calls this function to capture the current render tree.\n\n  In production mode, this requires turning on `ENV._DEBUG_RENDER_TREE`\n  before loading Ember.\n\n  @private\n  @static\n  @method captureRenderTree\n  @for @ember/debug\n  @param app {ApplicationInstance} An `ApplicationInstance`.\n  @since 3.14.0\n*/\nexport default function captureRenderTree(app: Owner): CapturedRenderNode[] {\n  let domRenderer = app.lookup('renderer:-dom') as Renderer;\n\n  if (!domRenderer) {\n    throw new Error(`BUG: owner is missing renderer`);\n  }\n  // SAFETY: Ideally we'd assert here but that causes awkward circular requires since this is also in @ember/debug.\n  // This is only for debug stuff so not very risky.\n  let renderer = domRenderer;\n\n  return renderer.debugRenderTree.capture();\n}\n","sourceCodeStart":7,"sourceCodeEnd":33,"githubUrl":"https://github.com/emberjs/ember.js/blob/26f97246a8bf2e28edf26ac3093da2e86c04ffc5/packages/@ember/debug/lib/capture-render-tree.ts#L7-L33","documentation":"captureRenderTree(owner) looks up the DOM renderer ('renderer:-dom') on the given owner so it can snapshot the render tree for debugging (used by Ember Inspector). If the owner has no DOM renderer registered, the function throws this internal bug report error.","triggerScenarios":"Calling captureRenderTree with an owner that was not fully built as an application/engine instance with DOM rendering — e.g. a bare EngineInstance, a partially booted app, or wrong object passed as owner.","commonSituations":"Test helpers calling captureRenderTree against a non-application owner; using the API with an engine owner instead of the app owner; setup errors where 'renderer:-dom' is not registered.","solutions":["Pass the Application instance (or its owner) that has 'renderer:-dom' registered","Ensure the app is fully booted before capturing the render tree","In tests, make sure the application is set up via the standard setupApplicationContext helpers"],"exampleFix":"// before\ncaptureRenderTree(engineInstance);\n// after\ncaptureRenderTree(getOwner(application) || application);","handlingStrategy":"validation","validationCode":"let renderer = app.lookup && app.lookup('renderer:-dom');\nif (renderer) captureRenderTree(app);","typeGuard":"function hasDomRenderer(owner) { return typeof owner.lookup === 'function' && Boolean(owner.lookup('renderer:-dom')); }","tryCatchPattern":"try { captureRenderTree(app); } catch (e) { if (!/missing renderer/.test(e.message)) throw e; /* owner not app: skip capture */ }","preventionTips":["Only call captureRenderTree with a fully booted Application owner","Never pass engine instances or arbitrary objects as the owner","Use it inside inspector/debug tooling guarded by environment checks"],"tags":["ember","renderer","debug","render-tree","owner"],"backgroundTag":"missing-dom-renderer","analyzedSha":"26f97246a8bf2e28edf26ac3093da2e86c04ffc5","analyzedAt":"2026-09-01T05:01:28.182Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}